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

Skip symlinks during OCI layer decompression #655

Merged
merged 1 commit into from
Sep 29, 2023
Merged

Conversation

stefanprodan
Copy link
Member

@stefanprodan stefanprodan commented Sep 29, 2023

This is a followup of #653 as pulling any OCI artifact currently fails if it contains symlinks.

Changes:

  • Add WithSkipSymlinks option to tar.Untar
  • Add test to prove that tarballs with symlinks no longer error out during decompression if skip is enabled
  • Use WithSkipSymlinks in oci/client.Pull so that the Flux CLI will not error out if it finds symlinks in the tarball, and instead it will skip them
  • Use WithSkipSymlinks in http/ArchiveFetcher.Fetch to avoid failing to extract artifacts which are not recompiled by source-controller

Ref: #538

@stefanprodan stefanprodan added enhancement New feature or request area/oci OCI related issues and pull requests labels Sep 29, 2023
@stefanprodan stefanprodan requested a review from a team as a code owner September 29, 2023 08:10
@stefanprodan stefanprodan force-pushed the oci-skip-symlinks branch 3 times, most recently from 7d28488 to 433e292 Compare September 29, 2023 08:38
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
@stefanprodan stefanprodan merged commit 57d9588 into main Sep 29, 2023
13 checks passed
@stefanprodan stefanprodan deleted the oci-skip-symlinks branch September 29, 2023 09:39
Copy link
Member

@rashedkvm rashedkvm left a comment

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/oci OCI related issues and pull requests enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants