zebra
zebra copied to clipboard
Replace cached state from the same commit, rather than failing the job
Motivation
If a cached state job is run twice on the same commit on the same branch, the job fails.
If other required jobs depend on that cached state job, they are skipped, and the PR won't merge.
The resource 'projects/zealous-zebra/global/images/lwd-cache-4765-merge-59532a1-v25-mainnet-tip' already exists Error: Process completed with exit code 1.
https://github.com/ZcashFoundation/zebra/runs/7588987700?check_suite_focus=true#step:8:72
Suggested Solution
Replace the image, rather than failing the job.
If that's not possible, it's also ok to skip creating the image. But the job still has to run successfully. That's not ideal, because it leaves an older (and possibly buggy) cached state image behind.