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

Zip archive links without .zip extension are invalid when using GetAndExtractZip #796

Closed
michael-valdron opened this issue Mar 7, 2022 · 0 comments
Assignees
Labels
area/library Common devfile library for interacting with devfiles area/registry Devfile registry for stacks and infrastructure kind/bug Something isn't working

Comments

@michael-valdron
Copy link
Member

/kind bug

Which area this bug is related to?

/area library
/area registry

What versions of software are you using?

Operating System: N/A

Go Pkg Version: github.com/devfile/library v1.2.1-0.20220215173721-fc8a5b4f2768

Bug Summary

Describe the bug:

Validation check for if the link contains a .zip extension fails if the link produces server side redirects, problem check can be seen here: https://github.com/devfile/library/blob/0f5995513e920153b646a2ff8743a029ad937876/pkg/util/util.go#L848

To Reproduce:

This can be produced by using GetAndExtractZip on the Quarkus Java link: https://code.quarkus.io/d?e=io.quarkus%3Aquarkus-resteasy&e=io.quarkus%3Aquarkus-micrometer&e=io.quarkus%3Aquarkus-smallrye-health&e=io.quarkus%3Aquarkus-openshift&cn=devfile

Expected behavior

Fixing this issue will allow the GetAndExtractZip function to download and extract zip files from links which do not have to .zip extension directly in them.

Additional context

Suggestion on how to fix the bug

Removing this check seems to be the only way to remove this problem.

@openshift-ci openshift-ci bot added kind/bug Something isn't working area/library Common devfile library for interacting with devfiles area/registry Devfile registry for stacks and infrastructure labels Mar 7, 2022
@michael-valdron michael-valdron changed the title GetAndExtractZip does not work with follow links to zip files. Zip archive links without .zip extension are invalid when using GetAndExtractZip Mar 7, 2022
@michael-valdron michael-valdron self-assigned this Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/library Common devfile library for interacting with devfiles area/registry Devfile registry for stacks and infrastructure kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants