-
Notifications
You must be signed in to change notification settings - Fork 260
adding olm.bundle image/relatedImages pullspec format validation #1905
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
base: master
Are you sure you want to change the base?
adding olm.bundle image/relatedImages pullspec format validation #1905
Conversation
Signed-off-by: grokspawn <jordan@nimblewidget.com> Assisted-By: Claude
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1905 +/- ##
==========================================
+ Coverage 57.44% 57.47% +0.03%
==========================================
Files 139 139
Lines 13323 13334 +11
==========================================
+ Hits 7653 7664 +11
Misses 4488 4488
Partials 1182 1182 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| } | ||
| })}, | ||
| }, | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add here a test to ensure that we still allowing usage of tags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we allow tags, since we have to pin as digests in catalogs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OLM supports this upstream—it's not an OLM limitation. What you’re describing is a downstream requirement specific to Red Hat OCP, mainly because of disconnected environment constraints. OLM can work with tags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on a test showing that tags work. I think it is also valid to have a pullspec that looks like this:
quay.io/example-org/example-repo:v1.2.3@sha256:<digest>
In this case, my understanding is that the tag becomes informational/ignored and the digest is what is used.
| } | ||
|
|
||
| // validateImagePullSpec checks that a non-empty image pull spec is valid | ||
| // using github.com/distribution/reference.ParseNormalizedNamed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we link to the go docs since the above 404's?
| // using github.com/distribution/reference.ParseNormalizedNamed. | |
| // using https://pkg.go.dev/github.com/distribution/reference#ParseNormalizedNamed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest using the parsers from container-lib/image since that's the underlying library that OPM itself uses by default and that most of the rest of the typical OLM ecosystem uses (e.g. skopeo and cri-o).
Assisted-By: Claude
Description of the change:
Motivation for the change:
Reviewer Checklist
/docs