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

added filter argument to tar.extactall when extracting downloaded file in container.download() #56

Merged
merged 1 commit into from
Apr 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions chi/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def create_container(
kwargs["exposed_ports"] = exposed_ports

# Note: most documented args are not on the function signature because there is some special
# handling of it in the Zun client; it is not sent if it is not on kwargs.
# handling of it in the Zu n client; it is not sent if it is not on kwargs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo?

# If it is on kwargs it is expected to be non-None.
container = zun().containers.create(
name=name,
Expand Down Expand Up @@ -236,7 +236,7 @@ def download(container_ref: "str", source: "str", dest: "str"):
res = zun().containers.get_archive(container_ref, source)
fd = io.BytesIO(res["data"])
with tarfile.open(fileobj=fd, mode="r") as tar:
tar.extractall(dest)
tar.extractall(dest, filter="fully_trusted")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this cause any issues if you run an older version of the library?



def wait_for_active(container_ref: "str", timeout: int = (60 * 2)) -> "Container":
Expand Down
Loading