feat(deploy): platform-native Render rollback via the host API#250
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:live/deactivated) — either an explicit--to-deploy-idor the most recent successful deploy that isn't the current one,fetch, API key, and logger are injectable for tests.Rollback Render Serviceworkflow (workflow_dispatch,prod-validationenvironment): inputsto_deploy_id(optional),reason(required),dry_run(defaulttrue). Guarded onRENDER_API_KEY+RENDER_SERVICE_ID, sharing the promotion concurrency group so it can't race a promotion.DEVELOPMENT.mddocuments the path and when to prefer it.Why
The existing git rollback force-moves the protected
productionref, 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_KEYsecret on theprod-validationenvironment.RENDER_SERVICE_IDrepository variable (the target web service id).The workflow fails fast with a clear message if either is missing.