Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a GitHub action to perform validation of params.env file #429

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

jstourac
Copy link
Member

PoC for #304, comments and opinions welcomed 🙂

The branches may be more formalized via something like #309.

Description

This introduces a script that performs checks againts content of the params.env file. It checks its format and referenced images trying to identify eventual wrong references.

At the moment it isn't able to determine whether the referred image is the latest and proper one we want to reference, but it should be able to recognize in case we are referring to a wrong type of image.

How Has This Been Tested?

Simply run ./ci/check-params-env.sh from root dir of your cloned repository to see the code in action. You need to have skopeo and jq tools installed.

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

@@ -0,0 +1,330 @@
#!/bin/bash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great addition to the notebooks repo!

I tested it locally, works as expected in both cases. 🙂

Matched

....
....
Validation of 'manifests/base/params.env' was successful! Congrats :)

Mismached

Checking format of: 'odh-minimal-notebook-image-n-1=quay.io/opendatahub/workbench-images@sha256:f59aa0090a316878e51dbc89234eb3cee189839120a6ab619936872e966b1d5ae'
Checking metadata for image 'odh-minimal-notebook-image-n-1' with URL 'quay.io/opendatahub/workbench-images@sha256:f59aa0090a316878e51dbc89234eb3cee189839120a6ab619936872e966b1d5ae'
FATA[0000] Error parsing image name "docker://quay.io/opendatahub/workbench-images@sha256:f59aa0090a316878e51dbc89234eb3cee189839120a6ab619936872e966b1d5ae": invalid checksum digest length 
Couldn't download image metadata with skopeo tool!
ERROR: Image definition for 'odh-minimal-notebook-image-n-1' isn't okay!
....
....

/LGTM

Copy link
Contributor

openshift-ci bot commented Feb 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 682f653 into opendatahub-io:main Feb 26, 2024
4 checks passed
@jstourac
Copy link
Member Author

That was fast 😄 thank you!

@jstourac jstourac deleted the checkParamsEnv branch February 26, 2024 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants