-
Notifications
You must be signed in to change notification settings - Fork 63
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 --include-non-distributable
flag to copy command
#62
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 tasks
- Add test helper to mock registry Co-authored-by: Dennis Leon <[email protected]> Co-authored-by: Cari Dean <[email protected]>
DennisDenuto
force-pushed
the
foreign-layers-176099730
branch
from
February 3, 2021 00:06
a45c712
to
83e196f
Compare
Co-authored-by: Dennis Leon <[email protected]>
- Use go-container registry to create a 'random' layer (instead of creating a layer in our test code) - read the copied tarball using imgpks tar reader (instead of having untar logic in our test code) Authored-by: Dennis Leon <[email protected]>
Co-authored-by: Dennis Leon <[email protected]> Co-authored-by: Garrett Cheadle <[email protected]>
- wire in flag using cobra - add a warning message when a user has provided the non-distributable flag but none of the layers copied were 'non distributable' Co-Authored-By: Dennis Leon <[email protected]>
- delegate checking whether an image layer should be written to tar to a new type 'ImageLayerWriteCheck' - move printing of warning message to top level (tar image writer set) Co-authored-by: Dennis Leon <[email protected]> Co-authored-by: Garrett Cheadle <[email protected]>
- enabled bundles to add their images to the fake registry - images can specify if they have a non-distributable layer Co-Authored-By: Dennis Leon <[email protected]>
Co-authored-by: Dennis Leon <[email protected]> Co-authored-by: Daniel Helfand <[email protected]>
- copy_repo_src_test has a nested test structure - 'foreign_described_layer' that would panic due to not being implemented is deleted and instead a 'described_layer' is used Authored-by: Dennis Leon <[email protected]>
- Make it clear what the 'change' from the default registry config is. In this case, only the manifest url validation regex needs to be changed from the default registry configuration Authored-by: Dennis Leon <[email protected]>
DennisDenuto
force-pushed
the
foreign-layers-176099730
branch
from
February 3, 2021 16:57
1163741
to
59d49a8
Compare
gcheadle-vmware
approved these changes
Feb 3, 2021
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.
Looks great 👍 Let's be sure to squash some of these commits before the merge.
- warning message indicates when a layer has been skipped
- Remove unused field from copy command Authored-by: Dennis Leon <[email protected]>
- when copying to a repo, only push the non-distributable layers individually as blobs. Let the go-container-registry library push the other layers, since it does so in an efficient manner. Authored-by: Dennis Leon <[email protected]>
- move the printing of the non-distributable flag warning message closer to the ui layer and out of the lower layers of the code (registry and tarball writer) Authored-by: Dennis Leon <[email protected]>
- when copying a tarfile that doesn't contain every layer inside of it, stop retrying 5 times. Instead only try once and print a warning message giving a hint to the user about what the issue might be. - Made the image (that contained a non-distributable layer) used in the e2e test, use a correct layer.URL - refactored warning the user so that it can be re-used when the source is a tarfile or a repo. - refactored the Retry function, to allowing writing tests around it to be easier. Co-authored-by: Dennis Leon <[email protected]> Co-authored-by: Cari Dean <[email protected]>
- Move the Retry function into the util package. - Make tar_writer use the common util.Retry function Co-authored-by: Dennis Leon <[email protected]> Co-authored-by: Cari Dean <[email protected]>
Co-authored-by: Dennis Leon <[email protected]> Co-authored-by: Cari Dean <[email protected]>
…user Co-authored-by: Dennis Leon <[email protected]> Co-authored-by: Cari Dean <[email protected]>
- FakeRegistry should keep state of images that are written to it, so that it may serve them later - Registry no longer needs a logger. logging is done in the 'ui' layer Co-authored-by: Dennis Leon <[email protected]> Co-authored-by: Cari Dean <[email protected]>
StevenLocke
force-pushed
the
foreign-layers-176099730
branch
from
February 3, 2021 23:08
59d49a8
to
a5e697a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
To enable an operator wishing to collect a bundle that includes software that includes non-distributable bits (e.g. Windows-based products) for use in an air-gapped scenario
Implements #8