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

jar: Deal with non-sane manifests without erroring #523

Merged
merged 1 commit into from
Dec 6, 2021

Conversation

crozzy
Copy link
Contributor

@crozzy crozzy commented Nov 24, 2021

This is an error seen in the wild where an META-INF/MANIFEST.MF
file does not contain the Manifest-Version. Currently this will
cause an indexing failure (and a 500 response).

Signed-off-by: crozzy joseph.crosland@gmail.com

@crozzy crozzy requested a review from a team as a code owner November 24, 2021 23:10
@crozzy crozzy requested review from hdonnay and removed request for a team November 24, 2021 23:10
@crozzy crozzy marked this pull request as draft November 24, 2021 23:10
@crozzy
Copy link
Contributor Author

crozzy commented Nov 24, 2021

These errors are mildly common in production:

{"level":"error","component":"internal/indexer/controller/Controller.Index","manifest":"sha256:79231af8f0170a588cb2e1ee3c9494d23e297d487316631542f4eb7f68bb41a2","state":"ScanLayers","error":"failed to scan all layer contents: invalid manifest version: \"\"","time":"2021-11-30T15:35:03Z","message":"error during scan"}

image

@crozzy
Copy link
Contributor Author

crozzy commented Nov 24, 2021

Tooling around with the ways to create JARs I haven't able to reproduce or find a wild manifest without Manifest-Version yet

@crozzy
Copy link
Contributor Author

crozzy commented Nov 29, 2021

Another error that would potentially be addressed with this

{"level":"error","component":"internal/indexer/controller/Controller.Index","manifest":"sha256:f7c39d2f065a867b1975eb32748980073a9bb3c618f356e7dabd5ee8e43f0b57","state":"ScanLayers","error":"failed to scan all layer contents: no headers found","time":"2021-11-29T17:52:09Z","message":"error during scan"}

@crozzy crozzy marked this pull request as ready for review November 30, 2021 16:37
@crozzy crozzy force-pushed the crozzy-insane-manifests branch 3 times, most recently from 30de2bd to 41f2fc1 Compare December 2, 2021 19:01
hdonnay
hdonnay previously approved these changes Dec 6, 2021
Copy link
Member

@hdonnay hdonnay left a comment

Choose a reason for hiding this comment

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

LGTM

I'd change the key in that one log line, but that's not a blocker.

java/jar/jar.go Outdated Show resolved Hide resolved
This is an error seen in the wild where an META-INF/MANIFEST.MF
file does not contain the Manifest-Version. Currently this will
cause an indexing failure (and a 500 response).

Signed-off-by: crozzy <joseph.crosland@gmail.com>
@crozzy crozzy merged commit 5542f5a into quay:main Dec 6, 2021
@crozzy crozzy deleted the crozzy-insane-manifests branch December 6, 2021 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants