René's URL Explorer Experiment
Title: Roll back every switched server when a later one fails its deploy gate by shipmill-romamo[bot] · Pull Request #334 · cloudfall-dev/cloudfall · GitHub
Open Graph Title: Roll back every switched server when a later one fails its deploy gate by shipmill-romamo[bot] · Pull Request #334 · cloudfall-dev/cloudfall
X Title: Roll back every switched server when a later one fails its deploy gate by shipmill-romamo[bot] · Pull Request #334 · cloudfall-dev/cloudfall
Description: Summary
A component on several servers deploys one server at a time (serial: 1). When a later server failed its health gate, only that server was rolled back: the servers that had already switched stayed on the new release, and each server's receipt overwrote the previous one's, so /.json named only the last server. Reproduced first with two stand-in servers: h1 stayed on the new release and the receipt held only h2.
Rollback of the switched servers. The failing server's rescue now rolls back every server that switched earlier in the run and passed its gate, last one first, with each task delegated to that server (tasks/switched_rollback.yml): the previous release and the service unit it ran under come back, a redeploy copy of the rolled-back run is removed, a first release is stopped and a kept hand-made unit put back, as the server's own rescue does (#223's rescue is unchanged). The restored release is gated again; one that fails is named in the failure, and the others are still rolled back. A server that never switched has no entry, so nothing is rolled back there
One receipt per component, one entry per server (D-13). The run's entries are a fact of the controller (localhost), a mapping from server to entry in deploy order; each server records its entry and the controller writes the whole receipt again (tasks/receipt_write.yml), so the receipt is written from one place and, with serial: 1, by one server at a time (no lock needed). spec holds the deployed release, artifactSha256, releaseCommand once, and servers: each with the release it ended on (null for a stopped first release), previousRelease, deployedAt, healthCheckPassed, rolledBack and the command healthCheck. release-receipt.schema.json validates the new shape and still validates a receipt from before (one server), which reads as a one-entry list
The release command already ran. The failure message names the servers rolled back and, for a component with a release command, says it already ran and is not reverted (vars/main.yml). The engine README says a release command must work with the previous release too
Docs: engine/README.md, config/README.md, docs/ci-deploy-guide.md describe the new receipt and the multi-server rollback
No SDK code parses the release receipt: deploy only checks that it exists, cloudfall why reads decision records and the operator its proposals, so no reader changed.
Plan
Serves: G-3
Files: engine/ansible/roles/cloudfall_deploy/tasks/{main,release_receipt,receipt_write,switched_rollback}.yml, engine/ansible/roles/cloudfall_deploy/vars/main.yml, config/schemas/v1/release-receipt.schema.json, engine/tests/{test_deploy_rollback,test_command_health_gate,test_release_command}.py, engine/README.md, config/README.md, docs/ci-deploy-guide.md, changelog.d/222-multi-server-deploy-rollback.md
Order: first a failing test that deploys to two stand-in servers and fails the second one's gate (the first stays switched, the receipt names only the second); then the run's receipt entries on the controller, the rollback and re-gate of the servers that switched earlier, the receipt with one entry per server and its schema (old single-server receipts still valid), the failure message and the docs
Proof: the two-server test passes (both servers back on the previous release, re-gated, one receipt with an entry per server); the single-server tests of the gate, rescue and receipt keep their outcomes; the schema accepts the new receipt and every old single-server receipt
Test plan
New in engine/tests/test_deploy_rollback.py: the role's own gate, rescue, rollback and receipt tasks run under ansible-playbook against two or three stand-in servers on the controller (local connection, one install root each, stand-in systemctl and systemd-run):
test_a_later_server_failing_its_gate_rolls_back_the_earlier_one fails on main (h1 stays on the new release, the receipt names only h2) and passes here
three servers with a first release on h1 (stopped, entry release: null), rollback order last-first; an earlier server whose restored release fails its gate again; a deploy that passes everywhere; a single-server deploy keeps one entry and no new message
which rollback steps run for a switched server (managed unit, redeploy copy, first release with a hand-made unit), that every server step is delegated, the failure's release-command sentence, and the schema's entry rules
Updated: the receipt assertions in test_command_health_gate.py and test_release_command.py read the server's entry; the old-shape schema tests there are unchanged and still pass
Ran: uv run ruff check ., uv run mypy, and uv run pytest on the touched files plus test_deploy_role.py, test_component_hosts.py, test_unsafe_config_values.py, test_artifact_build_steps.py, test_nginx_site_routes.py, test_playbook.py, sdk/tests/test_lifecycle.py, test_deploy_approval.py, test_migrate_approval.py: 347 passed, 1 skipped. The full suite and ansible-lint are left to CI
Not verified: a real multi-host run on Debian servers (delegation over SSH with become)
For review
The receipt layout beyond D-13: component, release, artifactSha256, releaseCommand stay once in spec; server, deployedAt, previousRelease, healthCheckPassed, healthCheck move into each entry, with a new rolledBack. An entry's release is the release the server ended on, so a failed single-server deploy now names the previous release there
A failed deploy of a component with a release command now says, on one server too, that the command already ran and is not reverted
The rollback of earlier servers runs from the failing server's rescue, after their component locks were released: another run could take one of those locks in that window
Specs 005 and 009 still describe the old receipt layout
Fixes #222
🤖 Generated with Claude Code
Open Graph Description: Summary
A component on several servers deploys one server at a time (serial: 1). When a later server failed its health gate, only that server was rolled back: the servers that had already switched ...
X Description: Summary
A component on several servers deploys one server at a time (serial: 1). When a later server failed its health gate, only that server was rolled back: the servers that had already switched ...
Opengraph URL: https://github.com/cloudfall-dev/cloudfall/pull/334
X: @github
direct link
Domain: github.com
IPv4 address: 140.82.113.4
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:3baa87bc-75dd-89f4-42a7-5d1ed2e2f910 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8934:2B3C9F:1BBAA5:2598FA:6B0598E2 |
| html-safe-nonce | ec75ffbbff5f5e8963acafba6a0a0b37c12513817cc45dfc9866dbb1c4e17bed |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTM0OjJCM0M5RjoxQkJBQTU6MjU5OEZBOjZCMDU5OEUyIiwidmlzaXRvcl9pZCI6IjI2NDg2MDcyNTY5MzMxNDQ4MDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 93da96110da9d88c2180729113df013cde2ea84b7342bcfdbd0f82e3f94ec06e |
| hovercard-subject-tag | pull_request:5320674282 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///pull_requests/show/files |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/cloudfall-dev/cloudfall/pull/334/files |
| twitter:image | https://avatars.githubusercontent.com/u/5600783?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/5600783?s=400&v=4 |
| og:image:alt | Summary
A component on several servers deploys one server at a time (serial: 1). When a later server failed its health gate, only that server was rolled back: the servers that had already switched ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3b72fd2385d76a50ce0fe937d50bb4a81434432c4fd47866074a26f6cd03623f |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/cloudfall-dev/cloudfall git https://github.com/cloudfall-dev/cloudfall.git |
| octolytics-dimension-user_id | 339512759 |
| octolytics-dimension-user_login | cloudfall-dev |
| octolytics-dimension-repository_id | 1360999777 |
| octolytics-dimension-repository_nwo | cloudfall-dev/cloudfall |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1360999777 |
| octolytics-dimension-repository_network_root_nwo | cloudfall-dev/cloudfall |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 58e2bd32336f3dcee343ec627a4d09c7c444e214 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Skip to content | https://github.com/cloudfall-dev/cloudfall/pull/334/files#start-of-content |
| https://github.com/ |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcloudfall-dev%2Fcloudfall%2Fpull%2F334%2Ffiles |
| GitHubRepository hosting, code review, and collaboration | https://github.com/platform |
| CopilotAI coding agent for tasks, projects, and automated work | https://github.com/features/copilot |
| ActionsCI/CD and automation | https://github.com/features/actions |
| Code QualityQuality analysis, fixes, and enforcement | https://github.com/features/code-quality |
| CodespacesCloud development environments | https://github.com/features/codespaces |
| Code SecurityVulnerability detection and remediation | https://github.com/security/advanced-security/code-security |
| Secret ProtectionSecret scanning and leak prevention | https://github.com/security/advanced-security/secret-protection |
| All Features | https://github.com/features |
| Documentation | https://docs.github.com/en |
| Training | https://learn.github.com/skills |
| Certifications | https://learn.github.com/credentials |
| Build with Copilot | https://github.com/features/ai |
| Customize Copilot | https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview |
| Integrations | https://github.com/marketplace |
| Trending repos | https://github.com/trending |
| GitHub Sponsors | https://github.com/open-source/sponsors |
| Developer articles | https://github.com/resources/articles |
| ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place. | https://github.blog/changelog/ |
| Enterprises | https://github.com/enterprise |
| Team | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| See all industries | https://github.com/solutions/industry |
| Why GitHub | https://github.com/why-github |
| Customer Stories | https://github.com/customer-stories |
| Business insights | https://github.com/solutions/executive-insights |
| Trust Center | https://github.com/trust-center |
| GitHub Advanced SecurityEnterprise-grade code security | https://github.com/security/advanced-security |
| Copilot for businessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/enterprise/premium-support |
| Documentation | https://docs.github.com/en |
| Resource center | https://github.com/resources |
| Blog | https://github.blog/ |
| Events & webinars | https://github.com/resources/events |
| Community Forum | https://github.com/orgs/community/discussions |
| Customer Stories | https://github.com/customer-stories |
| Integrations | https://github.com/marketplace |
| Customer support | https://help.github.com/ |
| Training | https://learn.github.com/skills |
| GitHub Status | https://www.githubstatus.com/ |
| About | https://github.com/about |
| Partners | https://github.com/partners |
| Changelog | https://github.blog/changelog/ |
| GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub. | https://githubuniverse.com/ |
| Pricing | https://github.com/pricing |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcloudfall-dev%2Fcloudfall%2Fpull%2F334%2Ffiles |
| Sign up | https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=cloudfall-dev%2Fcloudfall |
| Reload | https://github.com/cloudfall-dev/cloudfall/pull/334/files |
| Reload | https://github.com/cloudfall-dev/cloudfall/pull/334/files |
| Reload | https://github.com/cloudfall-dev/cloudfall/pull/334/files |
| cloudfall-dev | https://github.com/cloudfall-dev |
| cloudfall | https://github.com/cloudfall-dev/cloudfall |
| Code | https://github.com/cloudfall-dev/cloudfall |
| Issues76 (76) | https://github.com/cloudfall-dev/cloudfall/issues |
| Pull requests10 (10) | https://github.com/cloudfall-dev/cloudfall/pulls |
| Discussions | https://github.com/cloudfall-dev/cloudfall/discussions |
| Actions | https://github.com/cloudfall-dev/cloudfall/actions |
| Security and quality | https://github.com/cloudfall-dev/cloudfall/security |
| Insights | https://github.com/cloudfall-dev/cloudfall/insights |
| Sign up for GitHub
| https://github.com/signup?return_to=%2Fcloudfall-dev%2Fcloudfall%2Fissues%2Fnew%2Fchoose |
| terms of service | https://docs.github.com/terms |
| privacy statement | https://docs.github.com/privacy |
| Sign in | https://github.com/login?return_to=%2Fcloudfall-dev%2Fcloudfall%2Fissues%2Fnew%2Fchoose |
| shipmill-romamo | https://github.com/apps/shipmill-romamo |
| main | https://github.com/cloudfall-dev/cloudfall/tree/main |
| fix/222-multi-server-deploy-rollback | https://github.com/cloudfall-dev/cloudfall/tree/fix/222-multi-server-deploy-rollback |
|
Conversation
1
| https://github.com/cloudfall-dev/cloudfall/pull/334 |
|
Commits
1
| https://github.com/cloudfall-dev/cloudfall/pull/334/commits |
|
Checks
1
| https://github.com/cloudfall-dev/cloudfall/pull/334/checks |
|
Files changed
| https://github.com/cloudfall-dev/cloudfall/pull/334/files |
| Please reload this page | https://github.com/cloudfall-dev/cloudfall/pull/334/files |
|
Roll back every switched server when a later one fails its deploy gate
| https://github.com/cloudfall-dev/cloudfall/pull/334/files#top |
|
Show all changes
1 commit
| https://github.com/cloudfall-dev/cloudfall/pull/334/files |
|
4234774
Roll back every switched server when a later one fails its deploy gate
shipmill-romamo[bot] Nov 15, 2026
| https://github.com/cloudfall-dev/cloudfall/pull/334/commits/42347747bac484f013d0c27dc184807f4dd1e005 |
|
Clear filters
| https://github.com/cloudfall-dev/cloudfall/pull/334/files |
| Please reload this page | https://github.com/cloudfall-dev/cloudfall/pull/334/files |
| Please reload this page | https://github.com/cloudfall-dev/cloudfall/pull/334/files |
|
222-multi-server-deploy-rollback.md
| https://github.com/cloudfall-dev/cloudfall/pull/334/files#diff-1f867d5c8c0390498355912727986bcb0ae7f5fa0d5eac25d61030a384e91bcd |
|
README.md
| https://github.com/cloudfall-dev/cloudfall/pull/334/files#diff-6e8c7fdec58c9cb55af12d91063af268d43c753cf477bc41ec4e938f1b429b6f |
|
release-receipt.schema.json
| https://github.com/cloudfall-dev/cloudfall/pull/334/files#diff-3a0722ebee5e5f9a027000d72639cec8699071bba376b09af0823cf28bf2f921 |
|
ci-deploy-guide.md
| https://github.com/cloudfall-dev/cloudfall/pull/334/files#diff-758dbfce48556c37a5e2a3456a9900683fc4ae8fc2a809842cdfca3db07b960c |
|
README.md
| https://github.com/cloudfall-dev/cloudfall/pull/334/files#diff-78692e5a5d793b5257775d62b6fb596b7a11b3757d7a9ee0414cbe44b1ef444b |
|
main.yml
| https://github.com/cloudfall-dev/cloudfall/pull/334/files#diff-9b8cc1fc63bcd2865b8e987f6dbc3a5a5fa8e13b04d96fecd6100f117380c887 |
|
receipt_write.yml
| https://github.com/cloudfall-dev/cloudfall/pull/334/files#diff-e17aeef3a12ec7221c932b32361fead18153935d6e718b532c262de0fdc9deed |
|
release_receipt.yml
| https://github.com/cloudfall-dev/cloudfall/pull/334/files#diff-173804dc50d5ec086102e731df83f494fe5d93cbf8a58a1dc146ac8fa20f08f2 |
|
switched_rollback.yml
| https://github.com/cloudfall-dev/cloudfall/pull/334/files#diff-5c123cc66cfee74de5ca79a4e235854c1be9eaab49123a086d881004f80c1c24 |
|
main.yml
| https://github.com/cloudfall-dev/cloudfall/pull/334/files#diff-1d03dfe7f0ee7e059b660023bb6e650952783733601261934ea24b53eefbf397 |
|
test_command_health_gate.py
| https://github.com/cloudfall-dev/cloudfall/pull/334/files#diff-83aac29ba24de79ce7602ddde8af7a853ed0201d40eb7935e70b8bc2e1d13b2a |
|
test_deploy_rollback.py
| https://github.com/cloudfall-dev/cloudfall/pull/334/files#diff-16fa33c035fc5b8b2dc0f444dc5c831cb25e15bf1c9c1c39d82459ee59ca238e |
|
test_release_command.py
| https://github.com/cloudfall-dev/cloudfall/pull/334/files#diff-ac295603afd74510633fb5e9b3315481f5da0e4aa8519913a3ca7f3984246208 |
| changelog.d/222-multi-server-deploy-rollback.md | https://github.com/cloudfall-dev/cloudfall/pull/334/files#diff-1f867d5c8c0390498355912727986bcb0ae7f5fa0d5eac25d61030a384e91bcd |
|
View file
| https://github.com/cloudfall-dev/cloudfall/blob/42347747bac484f013d0c27dc184807f4dd1e005/changelog.d/222-multi-server-deploy-rollback.md |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/cloudfall-dev/cloudfall/pull/334/{{ revealButtonHref }} |
| config/README.md | https://github.com/cloudfall-dev/cloudfall/pull/334/files#diff-6e8c7fdec58c9cb55af12d91063af268d43c753cf477bc41ec4e938f1b429b6f |
|
View file
| https://github.com/cloudfall-dev/cloudfall/blob/42347747bac484f013d0c27dc184807f4dd1e005/config/README.md |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/cloudfall-dev/cloudfall/pull/334/{{ revealButtonHref }} |
|
| https://github.com/cloudfall-dev/cloudfall/pull/334/files#diff-6e8c7fdec58c9cb55af12d91063af268d43c753cf477bc41ec4e938f1b429b6f |
|
| https://github.com/cloudfall-dev/cloudfall/pull/334/files#diff-6e8c7fdec58c9cb55af12d91063af268d43c753cf477bc41ec4e938f1b429b6f |
| Please reload this page | https://github.com/cloudfall-dev/cloudfall/pull/334/files |
| Please reload this page | https://github.com/cloudfall-dev/cloudfall/pull/334/files |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |
Response headers:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width
URLs of crawlers that visited me.