Where agent teams gather. Cross-platform team chat where AI agents are first-class teammates — with cloud or bring-your-own (Claude Code / Codex) brains.
TypeScript
fix(deploy): let a catch-up migration outlive the 10-minute Job deadline (#270)
yetonee11b02437f5c
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.ymlindex 989e280..a9781f4 100644--- a/.github/workflows/deploy.yml+++ b/.github/workflows/deploy.yml@@ -22,6 +22,10 @@ on:default: 'off'type: choiceoptions: ['off', 'archive-detach']+ migration_deadline_seconds:+ description: 'Candidate migration Job deadline in seconds (60-2700). Raise only for a large catch-up migration.'+ required: false+ default: '600'recovery_mode:description: 'Baseline mode (normal requires known-good baseline; forward-only never auto-restores)'required: false@@ -49,10 +53,11 @@ jobs:deploy:name: Roll cumora-serverruns-on: ubuntu-latest- # The candidate rollout, bounded old-image verifier, restore rollout, and- # two authenticated smokes fit inside this job budget. A cancellation- # cannot be relied on to run cleanup, so recovery state remains protected.- timeout-minutes: 45+ # The candidate migration (up to the 2700s input ceiling), candidate+ # rollout, bounded old-image verifier, restore rollout, and two+ # authenticated smokes fit inside this job budget. A cancellation cannot+ # be relied on to run cleanup, so recovery state remains protected.+ timeout-minutes: 75environment:name: productionurl: https://api.cumora.ai@@ -76,13 +81,29 @@ jobs:env:INPUT_TAG: ${{ inputs.tag }}INPUT_INCLUDE_AGENT: ${{ inputs.include_agent || 'Y' }}+ INPUT_MIGRATION_DEADLINE: ${{ inputs.migration_deadline_seconds || '600' }}run: |set -euo pipefailTAG="$INPUT_TAG"INCLUDE_AGENT="$INPUT_INCLUDE_AGENT"case "$INCLUDE_AGENT" in Y|N) ;; *) echo "::error::include_agent must be Y or N"; exit 1 ;; esac+ # Reject anything that is not a plain integer before it can reach+ # activeDeadlineSeconds, where a NaN would silently become the+ # script's 600s default and hide the operator's intent.+ DEADLINE="$INPUT_MIGRATION_DEADLINE"+ case "$DEADLINE" in ''|*[!0-9]*) echo "::error::migration_deadline_seconds must be an integer, got '$DEADLINE'"; exit 1 ;; esac+ if [ "$DEADLINE" -lt 60 ] || [ "$DEADLINE" -gt 2700 ]; then+ echo "::error::migration_deadline_seconds must be between 60 and 2700, got $DEADLINE"+ exit 1+ fi+ # The poller runs at RECOVERY_POLL_MS (3s) and must outlive the Job's+ # own deadline, or a slow migration reports job_timeout instead of the+ # real terminal condition Kubernetes recorded.+ POLL_ATTEMPTS=$(( DEADLINE / 3 + 20 ))echo "tag=$TAG" >> "$GITHUB_OUTPUT"echo "include_agent=$INCLUDE_AGENT" >> "$GITHUB_OUTPUT"+ echo "migration_deadline=$DEADLINE" >> "$GITHUB_OUTPUT"+ echo "migration_poll_attempts=$POLL_ATTEMPTS" >> "$GITHUB_OUTPUT"- uses: google-github-actions/auth@v2with:@@ -144,8 +165,8 @@ jobs:CANDIDATE_SERVER_IMAGE: ${{ steps.digest.outputs.server }}CANDIDATE_AGENT_IMAGE: ${{ steps.digest.outputs.agent }}MIGRATION_REPAIR: ${{ inputs.repair_0002 || 'off' }}- MIGRATION_DEADLINE_SECONDS: '600'- MIGRATION_POLL_ATTEMPTS: '200'+ MIGRATION_DEADLINE_SECONDS: ${{ steps.tag.outputs.migration_deadline }}+ MIGRATION_POLL_ATTEMPTS: ${{ steps.tag.outputs.migration_poll_attempts }}VERIFIER_POLL_ATTEMPTS: '75'RECOVERY_POLL_MS: '3000'ROLLOUT_TIMEOUT_SECONDS: '600'diff --git a/docs/RELEASE.md b/docs/RELEASE.mdindex 42a634f..805809c 100644--- a/docs/RELEASE.md+++ b/docs/RELEASE.md@@ -46,6 +46,13 @@ To deploy a candidate:bundled CLI/runtime, or the agent-computer image. Otherwise use `N`.Leave `repair_0002=off` unless you are clearing the migration 0002precondition — see below.+ Leave `migration_deadline_seconds` at `600` for an ordinary deploy, which+ applies at most one small migration. Raise it (ceiling 2700) only for a+ catch-up deploy that has many pending migrations or a large backfill: a+ Job killed by `DeadlineExceeded` reports as `job_failed`, and a deadline+ sized for the common case is what makes that signal mean "stuck". Every+ migration is either transactional or built to be safely rerun, so a+ deadline kill leaves the Deployment untouched and the schema intact.4. Approve the protected `production` environment. The approver should not bethe person who built the feature for high-risk changes.5. Verify the workflow summary contains the selected digest, a completed