Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Support manifest lists when referenced by sha256 #1811
Support manifest lists when referenced by sha256 #1811
Changes from all commits
31267e7
856d80b
9eae4d4
c01d8f9
f49b89e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This code would unsafely create template objects that didn't first validate schema and mediatype. So now we always validate the value and then create the objects. Any mismatch will trigger a ClassCastException (indicating programming error or registry error).
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 remember something. This is about whether the registry client API should support the usage of
pullManifest(imageTag, templateClass)
: https://github.com/GoogleContainerTools/jib/blob/v1.3.0-maven/jib-core/src/main/java/com/google/cloud/tools/jib/registry/RegistryClient.java#L196-L197Our plugins don't make use of it, but as an API, it may make sense to keep it.
If we remove this, we can actually clean up a lot more. From what I recall,
ManfiestPuller
won't need to accept themanifestTemplateClass
argument.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.
And it makes sense to update this Javadoc too.
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.
You can still verify that you're actually pulling something you wanted... in which case ManifestPuller should probably still accept a template class. Either way, I think we should do it in a new PR.
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.
Agreed, we can do it later. (It is basically the question of whether we maintain the
RegistryClient
API surface in a sane manner. A library throwing aClassCastException
won't look nice. But we aren't even sure if we will ever release this as a library.)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.
Ah yeah, but a ClassCastException should only happen if something went horribly wrong.