Public: anyone can read this; the crew can change it.

A roll that cannot surge waits for the owner's yes to that roll #1653

Closed opened this
Closed without merging

A roll with no surge headroom now needs the owner's yes to that exact version, or the roll step exits 3 and does not go. bun test test/roll.test.ts test/check-list.test.ts and tsc --noEmit pass. I didn't run the full check.

Notes

stopped closed without shipping deploy 5d432cf

opened this

A roll with no surge headroom now needs the owner's yes to that exact version, or the roll step exits 3 and does not go. bun test test/roll.test.ts test/check-list.test.ts and tsc --noEmit pass. I didn't run the full check.

What changed

  • scripts/dark-roll.ts is new. decide allows a roll when a surge pod fits. Otherwise it allows one only if docs/ops/dark-rolls.log holds a line <version> yes <owner> <YYYY-MM-DD> for exactly that version. Wildcards, prefixes, comments, malformed lines and other versions don't count.
  • scripts/roll-preflight.ts takes three new optional flags: --version, --yes-file and --dark-seconds.
    • With no fit and no matching yes it exits 3 and prints "NOT rolling <version>", the seconds dark and the headroom short.
    • With a matching yes it exits 0 and prints "dark roll of <version> allowed: <owner> said yes on <date>".
  • docs/ops/ROLL.md has a new step 2, the release checklist. It refuses a dark roll without the yes, says a yes is for one version and never standing, and says to record it in docs/ops/dark-rolls.log. The old step 2 is now step 3.
  • docs/ops/dark-rolls.log is new and holds no yes lines. A test checks that.
  • New tests in test/roll.test.ts:
    • no headroom and no yes means no roll;
    • a yes for another version (or a wildcard, a comment line, a no, or a missing date) doesn't count;
    • a yes for exactly this version rolls and names the owner;
    • nothing under charts/, infra/, gitops/ or deploy/ carries maxSurge: 0.
  • No new test file, so GATE is unchanged.

What I chose not to do

  • There is no gitops overlay in this repo. The maxSurge: 0 test scans the chart and the other directories above, and requires at least one file to be found.
  • --dark-seconds is supplied by the operator. Nothing measures it.
  • Nothing appends to the log automatically. The agent writes the yes line by hand after the owner says yes (yesLine builds the line).

Try it bun scripts/roll-preflight.ts --node node.json --pods pods.json --pod ns/pod --steady 3712Mi --version 0.7.104 --yes-file docs/ops/dark-rolls.log --dark-seconds 90

Closes #1589

2 earlier comments
commented

I fixed the failed check and pushed. I haven't seen the forge's check re-run on the new push.

The check failed because test/crew-sandbox-real.test.ts came in from main without an entry in either GATE or EXCLUDED in scripts/gate.ts. I merged origin/main into the branch, which brought that file in, and then added it to EXCLUDED. The reason given is that it needs a real sandbox and skips itself where one can't be made. It is tied to issue 1234, the pull that added it.

I did not run the gate census itself here. Locally, bun x tsc --noEmit is clean, and test/roll.test.ts plus the two gate-named suites pass (39 tests).

Main still has the same missing entry, so main's own check would fail the same way until this lands.

commented

The merge conflict is fixed and pushed. I haven't seen the forge's check re-run on the new push.

Main had meanwhile added its own EXCLUDED entry for test/crew-sandbox-real.test.ts in scripts/gate.ts (issue 1238). That clashed with the entry I added last time. I merged main again and took main's scripts/gate.ts whole, so my entry is gone and this pull no longer changes that file.

Locally, bun x tsc --noEmit is clean and test/roll.test.ts passes (27 tests).

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs