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

improve error messages around bundle != payload hash #3146

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

imjasonh
Copy link
Member

Before this change, when the bundle hash doesn't match the payload hash, the error message is error verifying bundle: matching bundle to payload: %!w(<nil>) which isn't terribly helpful.

This hopes to improve the error experience in this area, by:

  • clearly failing ASAP when bundle hash computation fails
  • clearly failing separately if the bundle algorithm is somehow not sha256
  • clearly failing with both hashes when they don't match, hopefully making debugging easier

Signed-off-by: Jason Hall <jason@chainguard.dev>
Copy link
Contributor

@hectorj2f hectorj2f left a comment

Choose a reason for hiding this comment

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

lgtm, thanks @imjasonh

@hectorj2f hectorj2f enabled auto-merge (squash) July 31, 2023 15:47
@codecov
Copy link

codecov bot commented Jul 31, 2023

Codecov Report

Merging #3146 (059e570) into main (af555d5) will decrease coverage by 0.54%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #3146      +/-   ##
==========================================
- Coverage   30.56%   30.03%   -0.54%     
==========================================
  Files         155      155              
  Lines        9801     9806       +5     
==========================================
- Hits         2996     2945      -51     
- Misses       6359     6432      +73     
+ Partials      446      429      -17     
Files Changed Coverage Δ
pkg/cosign/verify.go 35.25% <0.00%> (-0.19%) ⬇️

... and 4 files with indirect coverage changes

@imjasonh
Copy link
Member Author

imjasonh commented Jul 31, 2023

https://github.com/sigstore/cosign/actions/runs/5716646806/job/15489553850?pr=3146

google.golang.org/grpc/internal/googlecloud: mkdir /tmp/go-build89590620/b1593/: no space left on device

I think I need an adult to retry to workflow.

@haydentherapper
Copy link
Contributor

haydentherapper commented Jul 31, 2023

image

(Ignore if you've never seen Bojack Horseman)

@hectorj2f hectorj2f merged commit b8c5997 into sigstore:main Jul 31, 2023
28 checks passed
@github-actions github-actions bot added this to the v2.2.0 milestone Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants