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

The release agent refuses a dark roll unless the owner said yes to that roll #1169

Closed opened this
Closed without merging

Before a release rolls, a new gate checks whether a second forge pod fits beside the first; if not, the roll waits for the owner's yes to that roll. This is the change from pull #980, rebuilt on today's main.

Notes

stopped closed without shipping

opened this

Before a release rolls, a new gate checks whether a second forge pod fits beside the first; if not, the roll waits for the owner's yes to that roll. This is the change from pull #980, rebuilt on today's main. That pull's edit to test/capacity.test.ts is left out: main already removes FORGE_CHECK_SHARDS from the test environment (scripts/test-shards.ts), which was what turned that test red.

What to look at

  • scripts/roll.ts decides whether the pod fits. It takes plain data in and gives plain data out, counting in whole millicores and bytes as the scheduler does.
    • Free room is the node's allocatable minus the requests of every pod on it that has not finished. A pod's request includes init containers, sidecars and runtime overhead.
    • What the second pod needs is the forge pod's CPU request, and for memory the larger of its request and its steady memory.
    • When it doesn't fit, it gives the shortfall (the extra room that would make the roll zero-downtime) and the seconds the roll would be dark: about 215 typical, at most 485 from the chart's grace period and probes.
    • The roll id is a hash of the version and the node's numbers. A yes covers only that id, so it never carries over to the next release, or to this one if the numbers change.
  • scripts/roll-preflight.ts is the command the agent runs. It only reads files and never contacts a cluster. Exit codes:
    • 0: roll — the pod fits, or --yes quotes the right roll id.
    • 3: don't roll — it would go dark; the agent posts the report to the owner and waits.
    • 4: don't roll — an --overlay file carries maxSurge: 0 or type: Recreate as a standing value.
    • 2: the input isn't what kubectl prints.
  • docs/ops/RELEASE.md is the checklist. It has the kubectl commands that collect the inputs, the rule with its units, what each exit code means, and the one-off patch for an approved dark roll, with the step that undoes it.
  • test/roll.test.ts is added to GATE in scripts/gate.ts. Its 17 tests include a hand-worked 8 GB-node case, and they hold the chart to maxSurge: 1, maxUnavailable: 0 and the timing ceilings to the chart's own values.

Not done: the "standby scripts" the issue names are not in this repository, so this checklist and command are the roll recipe here; those scripts need to call roll-preflight wherever they live. Nothing here changes the cluster or the chart.

Testing: bun x tsc --noEmit is clean. bun test on test/roll.test.ts, test/shards.test.ts, test/check-list.test.ts and test/hollow.test.ts passes 86 of 86. test/reserved-names.test.ts and test/studio.test.ts could not run here: the sandbox refuses the Unix socket their test server listens on (EPERM), and they fail the same way on unchanged main. The forge's check will run them.

Try it: bun scripts/roll-preflight.ts --version 0.7.61 --node node.json --pods pods.json --pod forge/<pod> --steady 3712Mi, with the inputs collected as in docs/ops/RELEASE.md.

🤖 Generated with Claude Code

Closes #1072

commented

Parked by the crew: the check failed ("apps that are busy > an open stream keeps the app awake until it closes") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs