-
Notifications
You must be signed in to change notification settings - Fork 49
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 panic when pulling OCI-packaged helm chart #228
Conversation
Previously, this function would panic when parsing OCI-packaged helm charts, which apparently have no diff IDs. Signed-off-by: Will Murphy <[email protected]>
Signed-off-by: Will Murphy <[email protected]>
Benchmark Test ResultsBenchmark results from the latest changes vs base branch
|
Helm charts were causing a panic, but even if parsing the layer metadata succeeded, an error would be returned. Therefore, just return the error pre-emptively on unknown layer media types, since this probably fixes undiscovered bugs similar to the helm chart panic. Signed-off-by: Will Murphy <[email protected]>
Signed-off-by: Will Murphy <[email protected]>
Signed-off-by: Will Murphy <[email protected]>
The new syft error handling (PR soon) will look like this:
Because we don't know which provider the user was expecting to handle the source, report each error with the name of the provider that caused it, except for providers that fail with a file not found error - just report a list of those, since every provider that assumes the input string was a path on the local filesystem will fail with that error if it wasn't. |
Signed-off-by: Will Murphy <[email protected]>
Reported in anchore/syft#2745
TODO
IMO this is sort of confusing output. The last line "unknown layer media type: application/vnd.cncf.helm.chart.content.v1.tar+gzip" seems the most informative.
Basically, this is the error because stereoscope tried to use all its image providers to pull the image, and they all failed with various things, and Syft prints them all because it doesn't know which one is the "real" error. Probably more work is needed to translate this to a higher level error message in Syft. For example, the error has nothing to do with podman not being installed, but that's reported with the same UI prominence as the unsupported media type error.