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

Disable tgz extraction on pull #119

Open
daniel-pebble opened this issue Nov 28, 2023 · 3 comments · May be fixed by #170 or #179
Open

Disable tgz extraction on pull #119

daniel-pebble opened this issue Nov 28, 2023 · 3 comments · May be fixed by #170 or #179

Comments

@daniel-pebble
Copy link

It seems that client.pull() automatically extracts archives which is a nice feature however I don't require it so it is possible to disable?

I've also noticed that the result from the pull is an invalid path, the path is actually the path to the extacted folder however the returned path includes the tgz which is infact in another folder (all be it with a random name)

image

image

image

@vsoch
Copy link
Contributor

vsoch commented Nov 28, 2023

It's partially related to this issue: oras-project/oras-go#644. We should possibly follow what they decide to do and then mimic it here.

@daniel-pebble
Copy link
Author

When I use "oras pull" it doesn't unpack the tgz automatically so I thought it was just an issue with the py library.
Looking at the pull function, could we add an argument like "skip_unpack= kwargs.get("skip_unpack", false)" and then check the value of that variable here
if layer["mediaType"] == oras.defaults.default_blob_dir_media_type:

@vsoch
Copy link
Contributor

vsoch commented Nov 28, 2023

Yes absolutely - I think that's the direction the upstream client will go to. Would you care to do a pull request? We can add the argument, and ensure that:

  1. Documentation for usage is added
  2. A test
  3. Update the CHANGELOG.md and version.py

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment