Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

stefansli
Copy link

See initial implementation at #170

Fixes #119

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:
Copy link
Contributor

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?

Copy link
Author

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?

Copy link
Contributor

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?

CHANGELOG.md Outdated Show resolved Hide resolved
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable tgz extraction on pull
3 participants