Zip archive links without .zip
extension are invalid when using GetAndExtractZip
#796
Labels
area/library
Common devfile library for interacting with devfiles
area/registry
Devfile registry for stacks and infrastructure
kind/bug
Something isn't working
/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#L848To 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=devfileExpected 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.
The text was updated successfully, but these errors were encountered: