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

Fix tar.gz support #280

Merged
merged 3 commits into from
Sep 28, 2023
Merged

Fix tar.gz support #280

merged 3 commits into from
Sep 28, 2023

Conversation

reegnz
Copy link
Contributor

@reegnz reegnz commented Aug 8, 2023

Fixes #285

@reegnz
Copy link
Contributor Author

reegnz commented Aug 10, 2023

I haven't tried with other tar.gz files, but it definitely fixed the issue for this particular one of downloading a tar.gz of a github repo. Also the fix was inspired by this code in the go codebase: https://cs.opensource.google/go/x/build/+/2c66d68b:internal/untar/untar.go;l=34-139, particularly line 132 and 133.

@neil-hickey
Copy link
Contributor

hey @reegnz , so this does appear to work on the surface. I think to really validate we are going to want some more e2e tests that cover each use-case. Is this something you would be able to contribute?

@reegnz
Copy link
Contributor Author

reegnz commented Aug 17, 2023

@neil-hickey If you can point me to what exactly you'd like to see I can give it a go.

@joaopapereira
Copy link
Member

I think we need something similar to https://github.com/carvel-dev/vendir/blob/develop/test/e2e/github_release_test.go but for HTTP workflow. We might need to standup a simple HTTP server and serve a tar.gz file from it to test it out.

@reegnz
Copy link
Contributor Author

reegnz commented Sep 20, 2023

I think I'll just fetch a tar.gz from github (from this repo), that's one of those tar.gz-s what's causing the issue anyway, and that's the most life-like test.

@reegnz
Copy link
Contributor Author

reegnz commented Sep 20, 2023

Pushed the e2e test (already had this in the making today, before the local http server idea).

Copy link
Member

@joaopapereira joaopapereira left a comment

Choose a reason for hiding this comment

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

I left a comment. The linter is also failing do you mind giving it a check?

test/e2e/http_tar_test.go Outdated Show resolved Hide resolved
@reegnz
Copy link
Contributor Author

reegnz commented Sep 21, 2023

@joaopapereira fixed.

@joaopapereira
Copy link
Member

@reegnz you need to sign your commits 😄

Signed-off-by: Zoltán Reegn <[email protected]>
Signed-off-by: Zoltán Reegn <[email protected]>
Signed-off-by: Zoltán Reegn <[email protected]>
@reegnz
Copy link
Contributor Author

reegnz commented Sep 27, 2023

@joaopapereira rebased, added signoff to commits.

Copy link
Member

@joaopapereira joaopapereira left a comment

Choose a reason for hiding this comment

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

LGTM

@kumaritanushree
Copy link
Contributor

LGTM

@joaopapereira joaopapereira merged commit 15ded16 into carvel-dev:develop Sep 28, 2023
4 checks passed
@reegnz reegnz deleted the fix_untar branch September 29, 2023 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

http fails to unpack certain tar.gz files
4 participants