Skip to content

feat(deploy): platform-native Render rollback via the host API#250

Merged
jsugg merged 2 commits into
mainfrom
feat/render-native-rollback
Jul 8, 2026
Merged

feat(deploy): platform-native Render rollback via the host API#250
jsugg merged 2 commits into
mainfrom
feat/render-native-rollback

Conversation

@jsugg

@jsugg jsugg commented Jul 8, 2026

Copy link
Copy Markdown
Owner

What

A platform-native rollback that redeploys a previous known-good Render deploy through the host API, as an alternative to the git-based Rollback Production.

  • scripts/render/rollback-render-service.js — dry-run-first CLI:
    • lists the service's recent deploys,
    • selects an eligible target (live/deactivated) — either an explicit --to-deploy-id or the most recent successful deploy that isn't the current one,
    • triggers the rollback and polls the resulting deploy to a terminal state,
    • fetch, API key, and logger are injectable for tests.
  • Rollback Render Service workflow (workflow_dispatch, prod-validation environment): inputs to_deploy_id (optional), reason (required), dry_run (default true). Guarded on RENDER_API_KEY + RENDER_SERVICE_ID, sharing the promotion concurrency group so it can't race a promotion.
  • DEVELOPMENT.md documents the path and when to prefer it.

Why

The existing git rollback force-moves the protected production ref, which the branch ruleset rejects (the automation app gets a 403 even as a bypass actor). Redeploying a prior good deploy on the host recovers service instantly and independently of branch protection; the git ref can be realigned separately once the incident is contained.

Operator prerequisites

  • RENDER_API_KEY secret on the prod-validation environment.
  • RENDER_SERVICE_ID repository variable (the target web service id).

The workflow fails fast with a clear message if either is missing.

jsugg added 2 commits July 8, 2026 17:25
The git-based Rollback Production force-moves the protected production ref,
which a branch ruleset rejects. Add a rollback that redeploys a previous
known-good Render deploy through the host API instead: instant recovery,
independent of branch protection.

- scripts/render/rollback-render-service.js: dry-run-first CLI that lists
  deploys, selects an eligible (live/deactivated) target — explicit or the
  latest successful non-current deploy — triggers the rollback, and polls to
  completion. Injectable fetch/apiKey/logger for tests.
- Rollback Render Service workflow (dispatch, prod-validation env), guarded on
  RENDER_API_KEY + RENDER_SERVICE_ID, sharing the promotion concurrency group.
- DEVELOPMENT.md documents the new path and when to prefer it.
Replace the await-in-loop poller with a recursive poll, matching the repo
convention in waitForStableDeploy and clearing no-await-in-loop.
@jsugg jsugg merged commit 638c848 into main Jul 8, 2026
21 checks passed
@jsugg jsugg deleted the feat/render-native-rollback branch July 8, 2026 20: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