-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jetpack Backup: Update copy site flow to use the getRestoreProgress selector as restore status source of truth #91145
Conversation
The progress bar is being updated according the getRestoreProgress() selector, so the idea is to consider the `status` value we get from there to validate if the restore is still in progress or it finished, instead of the `getInProgressRewindStatus` that might have some cache issues.
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~15 bytes added 📈 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, tests looked good 👍
Related to p1716438389407439-slack-CS8UYNPEE
Proposed Changes
getRestoreProgress()
fromcalypso/state/selectors/get-restore-progress
as the source of truth of the restore progress.Why are these changes being made?
The clone flow uses two APIs to validate the restore progress:
GET /rewind
— to determine if the restore finished (among other things)GET /rewind/{restoreId}/restore-status
— for the progress bar statusThere are cases where
/restore-status
reports as finished, but/rewind
does not yet due to cache issues or an error fetching the restore status. This will cause the restore progress page to stop querying the restore status and become stuck.So the plan is to use
/restore-status and
its correspondinggetRestoreProgress()
selector to be the source of truth and prevent the progress from becoming stuck.Testing Instructions
Unit tests
Ensure unit tests are passing:
You might see some selectors warning that we should optimize in another iteration.
Test copy site flow
Copy site
at the top right of the pageNew staging site
Enter credentials for a new destination site +
Confirm credentials
Continue
Confirm configuration
Existing staging site
Confirm configuration
Pre-merge Checklist