Repository navigation
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Builds part of spec S-009, docs/specs/009-command-health-check.md (feature issue #152): the acceptance criteria below. Each needs a test that names its id (test_s009_<k>_..., or a proves: S-009-2 comment line).
This is the command check in the deploy's health gate, its rescue, and the release receipt's healthCheck.
- S-009-2: The command check runs after the
Switch the current release symlinkandRestart the component servicetasks, inside the block whoserescuerestores the previous release, as the application'slinuxUser, with working directory<installRoot>/current, the service unit'sEnvironmentFile=-line andRuntimeMaxSec=equal totimeoutSeconds - S-009-3: A relative first element of
commandruns as<installRoot>/current/<element>, and an absolute one runs unchanged - S-009-4: A command check that exits 0 lets
deploy --yesexit 0 with a receipt carryinghealthCheckPassed: trueandhealthCheckwith the command,attempts: 1,exitCode: 0andtimedOut: false - S-009-5: A command check that exits 3 on every attempt makes
deploy --yesexitENGINE_STEP_FAILEDwith anerror.messagenaming the command health check and exit code 3; afterwardscurrentpoints at the previous release, the service was restarted on it, and the receipt at<releases>/<component>.jsonvalidates against the schema withhealthCheckPassed: false,healthCheck.exitCode: 3,releasethe failed release andpreviousReleasethe restored one - S-009-6: The same failure on a first release stops the service and writes a receipt with
healthCheckPassed: falseandpreviousRelease: null - S-009-7: A run still going after
timeoutSecondsis stopped and counts as a failed attempt; when the last attempt timed out, the deploy fails the same way, theerror.messagenames the timeout, and the receipt hastimedOut: trueandexitCode: null - S-009-8: A check that fails twice and then passes with
attempts: 3passes and recordsattempts: 3; a check that always fails runs exactlyattemptstimes, 3 seconds apart - S-009-9: A check that prints a marker string on stdout and stderr and exits 1 leaves the marker in neither the receipt, the
ansible-playbookoutput nor thedeployerror, and the receipt schema refuses ahealthCheckwith any key besidestype,command,attempts,exitCodeandtimedOut - S-009-11: The receipt schema refuses
healthCheckPassed: falsewithout a commandhealthCheck, or withexitCode: 0, and still accepts every receipt the deploy writes today - S-009-12: Components with
type: httpandtype: nonerun the same gate tasks as before, their receipts have nohealthCheckkey, and a failedhttpornonegate writes no receipt
Depends on #161
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity
shipmill-romamo commentedon Oct 30, 2026
Triage: implement. Serves: G-3. A build issue of spec S-009 (
docs/specs/009-command-health-check.md, approved in #153), sub-issue of #152. The criteria above are the scope; each gets a test naming its id. It starts once every issue on itsDepends online has closed.Accept a command health check in the component schema (#170)
Refuse a data copy the target can't hold before dumping it (S-007-6..…
shipmill-romamo commentedon Oct 30, 2026
The build is in #180: a
type: commandhealth check gatesdeploy --yes, run after the switch and restart inside the rescue block, in a transient unit with the command as an argv list; its output stays in the server journal. A failed check rolls back (or stops a first release), writes the receipt withhealthCheckPassed: falseand itshealthCheck, and fails the deploy naming the exit code or the timeout.httpandnonechecks run as before.Trade-offs: the receipt schema is a little stricter than S-009-11's text (a passing
healthCheckmust haveexitCode: 0andtimedOut: false, a timeout needsexitCode: null); every receipt written today still validates. Unverified:systemd-runwas a stand-in in the tests, so the real timeout output wants a live run.restart,rollbackandhealthstill refuse a command check until #166.This issue closes when #180 merges.
Gate a deploy on the command health check and receipt it (S-009-2..9,…
shipmill-romamo commentedon Oct 30, 2026
Released in v0.8.0rc12 (pre-release).
A plain install gets it with the next stable release.
If you filed this: react 👍 on this comment once it works for you, or reply if it doesn't.
Drop the stale refusal notes from the S-009 changelog fragments
Run the command health check in restart, rollback and health (S-009-1…
Hand declared config strings to Ansible as data, never as templates (#…