CLI: Handle Reprint retry-later exits without advancing the pull - #4805
Open
adamziel wants to merge 1 commit into
Open
CLI: Handle Reprint retry-later exits without advancing the pull#4805adamziel wants to merge 1 commit into
adamziel wants to merge 1 commit into
Conversation
Collaborator
📊 Performance Test ResultsComparing 4beda45 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
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.
Keeps Studio on the interrupted pull step when Reprint returns exit code
3, instead of treating that step as complete.Related issues
Supports WordPress/reprint#779.
Proposed Changes
Exit
2still resumes immediately, including with older Reprint versions. Exit3waits 15 seconds before retrying the same command, then 45 seconds before one final retry. The progress message explains the wait. Only exit0completes the step; other failures stop the pull and retain the captured error details.For example, if
pull-dbreturns3,3, then0, Studio waits 15 seconds, resumespull-dbfrom its saved state, waits 45 seconds, and resumes it again. Only after the0does Studio move to the next step. A third3stops the pull. An exit2between these failures does not reset the retry limit.The bundled Reprint stays at v0.10.4. This change does not require the new JSON fields, so it can land before a separate Reprint version bump. Both native PHP and Playground use the same retry behavior.
Testing Instructions
Pull a site with the bundled v0.10.4 and confirm it still completes. Then use a PHAR built from Reprint trunk against a disposable remote that returns HTTP 503 during
pull-db. Confirm Studio shows the retry waits and stays on the database step. Restore the remote during a wait and confirm the pull resumes. Keep it unavailable through both retries and confirm Studio stops with the error details instead of proceeding.Pre-merge Checklist