sigstore / root-signing

TUF repository for Sigstore trust root
Apache License 2.0
80 stars 77 forks source link

Sync to prod unexpectedly occurred #1178

Closed haydentherapper closed 3 months ago

haydentherapper commented 3 months ago

Description

This morning, we merged a root signing event.

Here is the check. We diff what's in repository/repository (which should contain the updated metadata) and in gcs://sigstore-tuf-root, and if any file names are not timestamp.json, snapshot.json, or 0-9.snapshot.json, exit 0.

I tested this locally and it seems to work, exiting since a non-ts/snapshot file was updated.

@lkatalin @kommendorkapten @jku if you have any ideas on why this succeeded? If you have any suggestions on how to simplify this too, let's do that.

lkatalin commented 3 months ago

Hm. It looks like it did detect a least one non-snapshot/non-timestamp file correctly to trigger the exit condition: https://github.com/sigstore/root-signing/actions/runs/8347556789/job/22847432435#step:7:197

It just didn't actually exit, despite the next line being exit 0.

haydentherapper commented 3 months ago

Ah good catch, didn't see that line. Does it have to be exit 1 instead?

lkatalin commented 3 months ago

It looks like exit 1 should work, based on the docs I'm finding. I'm trying to think of a good way to test this, though.

lkatalin commented 3 months ago

I did a few tests of exit codes with GHA and it seems like non-zero exit codes do work properly. PR here to fix this bug: #1180