Make oras-py behave the same way as oras-go for deciding whether to unpack a layer #179
Open
stefansli wants to merge 5 commits into
Open
Make oras-py behave the same way as oras-go for deciding whether to unpack a layer #179stefansli wants to merge 5 commits into
stefansli wants to merge 5 commits into
Conversation
…npack a tar layer or not Signed-off-by: Michael Kopf <michael.kopf@vector.com>
Signed-off-by: Michael Kopf <michael.kopf@vector.com>
vsoch
reviewed
Dec 10, 2024
| # A directory will need to be uncompressed and moved | ||
| unpack_layer = annotations.get(oras.defaults.annotation_unpack, False) | ||
|
|
||
| if unpack_layer and skip_unpack: |
Contributor
There was a problem hiding this comment.
How do we know the filename doesn't already have .tar.gz?
Author
There was a problem hiding this comment.
After thinking about this for a while:
Do we even need the skip_unpack parameter if we support the official annotation?
For special cases, one can always call self.download_blob directly.
To me unpack_layer and skip_unpack reads like a contradiction with behavior that is not obvious and must be documented. So I'd rather leave it out. What do you think?
Contributor
There was a problem hiding this comment.
What does the upstream oras client do?
vsoch
reviewed
Dec 10, 2024
Signed-off-by: Stefan Lietzau <104021830+stefansli@users.noreply.github.com>
Rewrite test to test the functionality to only unpack if the annotation is set. Signed-off-by: Stefan Lietzau <104021830+stefansli@users.noreply.github.com>
f0fa560 to
32982ea
Compare
This file contains hidden or 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
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.
See initial implementation at #170
Fixes #119