Repository navigation
Conversation
When two site updates from the same bench fail together, Press starts two recovery jobs at once. Each job moves its site back and then rebuilds the nginx config of the bench the sites failed on. One job can list the other site, and that site can then move out before the job reads its site_config.json. The job then fails with FileNotFoundError, and the site stays in maintenance mode. The update pull and migrate jobs already pass ignore_missing_site_configs=True for this race. Pass it in the recover pull and recover migrate jobs too. A site that left the bench does not belong in its nginx config, so skipping it gives the correct result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
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.
Problem
Two sites on the same bench can update to a new bench at the same time. If both updates fail, Press starts two recovery jobs at the same time. Each recovery job:
source.setup_nginx()).The nginx rebuild lists every site in the bench, and then reads each site's
site_config.jsonfor its domains and CORS settings. If the other recovery job moves its site out between these two reads, the read fails:The recovery job then fails. Its nginx reload and "Disable Maintenance Mode" steps do not run, so the site stays in maintenance mode.
Fix
Commit 7b82b1b added
ignore_missing_site_configs=Truefor this race, but only inupdate_site_pull_jobandupdate_site_migrate_job. This PR passes the same flag inupdate_site_recover_pull_jobandupdate_site_recover_migrate_job.With the flag, the rebuild removes the moved site from its list and tries again. A site that left the bench does not belong in that bench's nginx config, so the result is correct.
Tests
Two tests check that both recovery jobs pass the flag to the source bench's
setup_nginx.🤖 Generated with Claude Code