Skip to content

perf(ssm-deploy): one runner per deploy, spot-safe CI gate - #24

Merged
Kartik4152 merged 4 commits into
mainfrom
perf/ssm-deploy-single-job
Nov 11, 2026
Merged

Kartik4152 merged 4 commits into
mainfrom
perf/ssm-deploy-single-job

Conversation

@Kartik4152

Copy link
Copy Markdown
Contributor

Summary

  • One job instead of three. resolve → ci-gate → deploy each took a fresh ephemeral runner, at about 1 min to acquire each. Measured on 13 days of Curator and Pay deploys, runner acquisition is the largest share of deploy time (Curator 4.7 of 13.9 min mean, Pay 3.3 of 12.2). The single deploy job resolves, waits for CI, and only then assumes the deploy role, so the 7200 s session is untouched by the gate.
  • The CI gate survives spot kills. 14% of Pay release deploys needed a manual rerun because the gate failed as soon as CI failed. In most cases that failure was a reclaimed spot runner (138 of 170 support-shard failures had no failed step), which the org's re-run Lambda retries within 1–2 min. If every failed job in the newest attempt has no failed step and the attempt is below 3, the gate now waits up to 10 min after that run's updated_at. A failed step anywhere still fails immediately.
  • Opt-in ci-tree-reuse. When the SHA has no green CI, the gate also passes on a green run of the same CI workflow whose head_commit.tree_id equals the SHA's tree. Pay squash merges keep the PR head's tree (13 of the last 15), so a release push can stop waiting for a fresh 10-min CI run on identical code. The log names the reused run. Any lookup error falls back to normal SHA behaviour. Default false.

Compatibility

  • Callers pin by SHA, so nothing changes until a caller bumps.
  • Failed-job names become <caller job> / deploy. The reconciler handles both shapes in zkp2p/peer-infra#158, which must be applied before any caller bumps.
  • Inputs, modes (including EIF/parent), validations and receipts are unchanged. The job timeout is a static 190 min; the real bounds stay at step level (gate 50 min, follow uses the computed timeout).

Test Plan

  • python3 scripts/test-ssm-deploy.py: 73 passed
  • bash scripts/test-ci-gate.sh: 17 passed (new cases cover the runner-loss grace, real failures, attempt 3, and tree-reuse match / mismatch / error / disabled)
  • actionlint
  • First live run: Curator staging deploy after bumping the pin

🤖 Generated with Claude Code

https://claude.ai/code/session_012KwNzh1Tp9wjEpuc7YgjBk

Kartik4152 and others added 4 commits November 11, 2026 11:01
Allow the existing hosted image label with actionlint 1.7.12.

Co-Authored-By: Codex <noreply@openai.com>
Resolve the environment and wait for CI in the deploy job before assuming the role. Keep step bounds, parent gating and per-attempt parameters intact.

Co-Authored-By: Codex <noreply@openai.com>
Inspect all jobs in the newest run attempt before allowing a ten-minute runner-loss grace period. Preserve immediate failures for failed steps and the third attempt.

Co-Authored-By: Codex <noreply@openai.com>
Check successful workflow runs on the initial poll and after every five further polls. Log reused evidence and fall back to SHA decisions on lookup failures.

Co-Authored-By: Codex <noreply@openai.com>
@Kartik4152
Kartik4152 merged commit 4f10acf into main Nov 11, 2026
2 checks passed
@Kartik4152
Kartik4152 deleted the perf/ssm-deploy-single-job branch November 11, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant