Repository navigation
Conversation
The Download screen kept the download id only in React state, so a reload while WordPress.com built the archive dropped back to the checklist. The screen now reads the site's latest downloads first, through a new /backups/downloads bridge route, and picks up this backup's download if it is still building or ready. While one download builds, WordPress.com answers every new request with that job, whichever backup it is of. The bridge now refuses that reply with a 409 instead of letting the screen follow another backup's archive. An expired link is reported as expired rather than running. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Code Coverage SummaryCoverage changed in 5 files.
|
|
Thanks for this, @dhasilva. The diff looks good. I found no blockers. I read the code only and did not run the tests locally. Verdict: Minor issues. It can merge after you look at the points below. Suggestions (none verified by a run, so these are ideas only):
CI: the only failing check is the code coverage requirement. Please add a test for the uncovered lines, or use the Next step: we are testing this manually now, starting with the reload-while-building flow and the other-backup 409 flow (steps 1–3 and 6–7). I will report back here. Terminator |
A failed lookup now offers the form at once instead of after the query client's retry, since a new request is handed any download still building. The read-route failure tests cover the list route as rows, the newest of several downloads is tested, and the live-region test requires the one hint. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@CGastrell Pushed d251cae.
Coverage: the list route's network and non-200 failures now run as data-provider rows on the status route's tests, and picking the newest of several downloads has a test (reversing the sort fails it). Generated by Claude. |
Fixes JETPACK-3007
Proposed changes
The Download screen kept the download id only in React state, so reloading while WordPress.com built the archive dropped the reader back to the checklist. WordPress.com kept building it, but the dashboard could not find it again.
GET /jetpack/v4/backups/downloadsbridge route reads WordPress.com's latest downloads, in the same shape as the status route plusrewind_id. Before showing the checklist, the screen reads it (shows "Checking for a download in progress…") and picks up this backup's download if it is still building (progress continues) or ready (link shows straight away).download_in_progress, and the screen says "Another download is being prepared for this site. Try again once it finishes." Best effort: the check needs WordPress.com to send backrewindId, which its reply does today. Without it, the bridge returns the download id as it did before.expired, notrunning. WordPress.com keepsvalidUntilafter it withdraws the link, and its list still returns such downloads months later (seen on a dev site: a link that lapsed two months earlier). Read asrunning, a resume would have polled it forever.Known limit, same as the wpcom-backup panel in #53688: asking for the same backup with a different selection while one builds follows the running job, since the list does not carry the selection.
Changelog: one comment-only entry in
packages/backup. The redesigned dashboard has not shipped yet, so the default-on entries from #53443 carry the user-facing text, as with #53790.Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
On a connected site with a Backup plan and some backups, go to Jetpack › VaultPress Backup.
Reload while building
Reload once ready
4. Wait for Your download is ready, then reload.
5. Expect the link and its expiry, with the checklist below. Generate download from there starts a new one.
Another backup's download
6. Start a download of one backup. While it builds, open a different backup's Download and press Generate download.
7. Expect "Could not prepare the download" with "Another download is being prepared for this site. Try again once it finishes." and the code
download_in_progress. On trunk the screen shows the first backup's progress and archive under the second backup's download point.Unchanged paths
8. From the file browser, select files and choose Download: it starts on its own, as before.
9. A backup with no download under way shows the checklist after the brief check.
The route can also be read directly:
GET /wp-json/jetpack/v4/backups/downloads(with a REST nonce) returns a list of{ id, rewind_id, status, progress, url, valid_until, error }.🤖 Generated with Claude Code