Skip to main content

The release gate

Approving a release and deploying it are two different acts, done by two different principals. A person with release authority approves a candidate, an exact commit, environment and (where there is one) image digest, with vagaris feature decide <id> --kind APPROVE_RELEASE (see Approvals). The deploy that follows has no release authority of its own. It only asks one question before it ships: was this exact candidate approved?

vagaris release asks that question, and one advisory question before it.

Who must sign: release status​

vagaris release status checkout --kind feature

This prints which departments must sign a release of the subject and why: its risk tier, how many nodes it touches, and the reason each department was pulled in. It is advisory. It approves nothing, and its answer is never an approval. Vagaris keeps "who should sign" apart from "was it signed" on purpose, so a gate can never both decide what it requires and record that the requirement was met.

Was this candidate approved: release verify​

vagaris release verify feature:checkout \
--release-commit-sha 41913843aa0bb093e885d2663100e5281ecfcca6 \
--release-environment production \
--release-image-digest sha256:<64 hex>

The subject is the genome node id, <kind>:<slug>. The candidate flags are the ones feature decide --kind APPROVE_RELEASE takes, with the same checks: the commit must be the full 40-character sha (an abbreviation is a prefix, and a prefix can match two objects), and the digest must be sha256: followed by 64 hex characters.

Run it in your deploy, before the deploy step, and let the exit code decide:

ExitMeaningWhat to do
0This exact candidate was approvedDeploy
2Nobody approved anything for this subject (release_candidate_not_approved)Get the release approved
14A candidate was approved, and this is not it (RELEASE_CANDIDATE_MISMATCH)Do not deploy. The JSON names the approval and which coordinate differs
15You named an image digest, and the approval never pinned one (APPROVED_DIGEST_UNPINNED)Approve a candidate that names this digest, or deploy by commit if your policy accepts that

Exit 14 is the one to page on. It is the case where someone believes they are deploying an approved artifact and is not.

When the approval did not pin the image​

An approval may bind the commit and the environment without naming an image digest. If you pass --release-image-digest, such an approval does not cover your image, and verify exits 15: the object you are deploying was never itself approved. If you deploy by commit and pass no digest, a commit-and-environment approval passes, and the output says digest_bound: false so nothing downstream can read it as more than it is.

There is no flag that turns a refusal into a pass. What to do with exit 15 is a decision for your release policy, written in your deploy script, not an option on the command.

verify needs access to the organization only. The authority was spent by whoever approved, and a deploy runner that also needed release authority would hold the very power the approval keeps with a person.