-
Notifications
You must be signed in to change notification settings - Fork 38
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
Make oras-py behave the same way as oras-go for deciding whether to unpack a layer #179
base: main
Are you sure you want to change the base?
Conversation
…npack a tar layer or not Signed-off-by: Michael Kopf <[email protected]>
Signed-off-by: Michael Kopf <[email protected]>
oras/provider.py
Outdated
# A directory will need to be uncompressed and moved | ||
unpack_layer = annotations.get(oras.defaults.annotation_unpack, False) | ||
|
||
if unpack_layer and skip_unpack: |
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.
How do we know the filename doesn't already have .tar.gz?
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.
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?
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.
What does the upstream oras client do?
Signed-off-by: Stefan Lietzau <[email protected]>
Rewrite test to test the functionality to only unpack if the annotation is set. Signed-off-by: Stefan Lietzau <[email protected]>
f0fa560
to
32982ea
Compare
See initial implementation at #170
Fixes #119