-
Notifications
You must be signed in to change notification settings - Fork 564
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
Refactor the tuf client code. #1252
Conversation
6868353
to
41e66f7
Compare
Test failure looks like it's because the distroless image builds failed: This works: $ COSIGN_EXPERIMENTAL=1 ./cosign verify gcr.io/distroless/base:0a3c30a19ffb51f79c34955fdb9b77b8aa3b4309 This one doesn't: $ COSIGN_EXPERIMENTAL=1 ./cosign verify gcr.io/distroless/base:latest We should probably just pin to a known good signed image here. |
45b7ebe
to
192c31e
Compare
2fadb56
to
6f9ed4c
Compare
3abe1ba
to
187a7c0
Compare
This is my attempt at refactoring the TUF client code to better support the configuration modes we've recently added. This also adds support for SIGSTORE_NO_CACHE, and eliminates most writes to disk from cosign outside of cosign initialize. I think these tests are about equivalent to what we had before, if not a bit better. The coverage is at 72% and hits most non-sporadic errors. Signed-off-by: Dan Lorenc <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, although I am not an expert on the tuf client.
[sigstore#568](sigstore#568) bumps the Go version for tests to 1.17. Now they break for 1.16: ```sh TMPDIR=$(mktemp -d) cd $TMPDIR git clone https://github.com/sigstore/cosign 2> /dev/null cd cosign for go in go_1_16 go_1_17; do nix-shell \ -p ${go} \ -p gnumake \ --command 'make test' \ > /dev/null 2>&1 if [ $? -eq 0 ]; then echo ${go} good else echo ${go} bad fi done ``` [sigstore#1252](sigstore#1252) adds a call to `testing.T.Setenv`, added in [1.17](https://go-review.googlesource.com/c/go/+/326790/3/api/go1.17.txt), which caused this breakage. (We're still testing *builds* on 1.16, so that's fine.)
[sigstore#568](sigstore#568) bumps the Go version for tests to 1.17. Now they break for 1.16: ```sh TMPDIR=$(mktemp -d) cd $TMPDIR git clone https://github.com/sigstore/cosign 2> /dev/null cd cosign for go in go_1_16 go_1_17; do nix-shell \ -p ${go} \ -p gnumake \ --command 'make test' \ > /dev/null 2>&1 if [ $? -eq 0 ]; then echo ${go} good else echo ${go} bad fi done ``` [sigstore#1252](sigstore#1252) adds a call to `testing.T.Setenv`, added in [1.17](https://go-review.googlesource.com/c/go/+/326790/3/api/go1.17.txt), which caused this breakage. (We're still testing *builds* on 1.16, so that's fine.) Signed-off-by: Zachary Newman <[email protected]>
Refactor the tuf client code.
This is my attempt at refactoring the TUF client code to better
support the configuration modes we've recently added.
This also adds support for SIGSTORE_NO_CACHE, and eliminates most
writes to disk from cosign outside of cosign initialize.
I think these tests are about equivalent to what we had before, if not
a bit better. The coverage is at 72% and hits most non-sporadic errors.
Signed-off-by: Dan Lorenc [email protected]
Summary
Ticket Link
Fixes
Release Note