Skip to content

Push: Wait for a running import on the live site instead of failing - #6172

Merged
youknowriad merged 1 commit into
trunkfrom
claude/studio-push-sync-stuck-64f62e
Nov 24, 2026
Merged

youknowriad merged 1 commit into
trunkfrom
claude/studio-push-sync-stuck-64f62e

Conversation

@youknowriad

Copy link
Copy Markdown
Contributor

Related issues

  • Related to a support report where every push to a Pressable site failed with "A sync operation is already in progress on this site".

How AI was used in this PR

Claude Code read the WordPress.com sync endpoint and the server logs for the reported site, wrote the change and its tests, and ran two overlapping real pushes against a WordPress.com test site. I reviewed the diff and the test results.

Proposed Changes

  • A WordPress.com or Pressable site runs one import at a time. While one runs, the server refuses the next with a 409, and Studio failed the push with "A sync operation is already in progress on this site. Please wait for it to finish and try again."
  • In the reported case, the first push was still importing (about 90 minutes for a large site) when Studio stopped waiting for it. The user retried, every retry hit the 409, and it looked as if sync jobs were piling up and stuck. In fact the first import finished fine, but Studio never recorded that push.
  • A push that finds an import already running now waits for it, showing "Waiting for another update to the live site to finish…", then applies its own changes from the archive it already uploaded. Retrying no longer fails, and nothing is uploaded twice.
  • The server also refuses an import while the site syncs with its WordPress.com staging site. That lock doesn't expire on its own, so Studio now says "The live site is syncing with its staging site. Wait for that to finish and try again." instead of the generic message.
  • The waiting step can be cancelled, since the push hasn't changed the live site yet.

Testing Instructions

  1. npm run cli:build
  2. Pick a WordPress.com test site you can push to, and two local sites.
  3. Push the first: node apps/cli/dist/cli/main.mjs push --path <first site> --remote-site <site ID> --options all
  4. As soon as its remote backup starts, push the second to the same remote site from another terminal.
  5. The second push uploads, then shows "Waiting for another update to the live site to finish…" until the first finishes. It then backs up, applies its changes and reports "Successfully pushed". The live site shows the second site.
  6. With studio ui running (npm run cli:build:ui && node apps/cli/dist/cli/main.mjs ui --no-open), the second site's publishing notice shows the waiting step.

Tested this way on a WordPress.com Atomic site: the second push waited about 12 minutes, then finished, and both local sites recorded their push. The staging-sync message is covered by unit tests only, because none of my test sites has a staging site.

⚠️ Visual change: needs human review in light + dark mode.

The only visible change is the new waiting text in the publishing notice. I checked it in light and dark in studio ui but couldn't attach the screenshots here.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

🤖 Generated with Claude Code

…h with a 409

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved: youknowriad is a trusted author.

@youknowriad
youknowriad merged commit 644c04a into trunk Nov 24, 2026
13 checks passed
@youknowriad
youknowriad deleted the claude/studio-push-sync-stuck-64f62e branch November 24, 2026 15:46
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