Skip to content
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

Get In Progress Rewind API Entry Details #47071

Closed
wants to merge 8 commits into from

Conversation

elliottprogrammer
Copy link
Contributor

@elliottprogrammer elliottprogrammer commented Nov 3, 2020

Changes proposed in this Pull Request

This PR allows access to 2 new properties from the rewind API (message and entry) when the rewind status is "active" and "running".

Implementation notes:

  • add the new message and current_entry response fields from the rewind API into schema.js and api-transformer,js to be schema parsed and camel-cased.
  • Create new Calypso data layer selector, getInProgressRewindEntryDetails()

Testing instructions

  1. First checkout/run this patch in your sandbox site: D52234-code
  2. point wordpress.com and public-api.wordpress.com to your sandbox IP (in your hosts file).
  3. checkout and run this this PR.
  4. Select a site with restore credentials (or add restore credentials)
  5. Open the console.
  6. Go to http://calypso.localhost:3000/backup/:site Select a date and click to "Restore to this point"
  7. While site is restoring, you should see the output of the getInProgressRewindEntryDetails() selector. It will be an object with properties: message and entry.

Important note:

the entry response will always be "Unknown" for now, just until an upcoming VaultPress patch is in place coming soon.
But the message response should return values such as, Starting, Parsing Manifest, Streaming files, Importing SQL dump, and Renaming tables.

Fixes #

@matticbot
Copy link
Contributor

Copy link
Collaborator

@wp-desktop wp-desktop left a comment

Choose a reason for hiding this comment

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

WordPress Desktop CI Failure for job "wp-desktop-mac".

@elliottprogrammer please inspect this job's build steps for breaking changes at this link. For temporal failures, you may try to "Rerun Workflow from Failed".

Please also ensure this branch is rebased off latest Calypso.

@wp-desktop wp-desktop dismissed their stale review November 3, 2020 21:41

wp-desktop ci passing, closing review

@elliottprogrammer elliottprogrammer changed the title Add new "message" & "current_entry" api fields to rewind data layer Get In Progress Rewind API Entry Details Nov 4, 2020
@elliottprogrammer elliottprogrammer marked this pull request as ready for review November 4, 2020 19:15
@elliottprogrammer elliottprogrammer requested a review from a team November 4, 2020 19:15
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Nov 4, 2020
getInProgressRewindEntryDetails( state, siteId, rewindId )
);

console.log( inProgressRewindEntryDetails );
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is just temporary, of course. Just for testing.

@matticbot
Copy link
Contributor

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~373 bytes added 📈 [gzipped])

name                    parsed_size           gzip_size
backup                       +787 B  (+0.2%)     +157 B  (+0.1%)
stats                         +79 B  (+0.0%)      +26 B  (+0.0%)
settings-security             +79 B  (+0.0%)      +26 B  (+0.0%)
settings-jetpack              +79 B  (+0.0%)      +26 B  (+0.0%)
settings                      +79 B  (+0.0%)      +28 B  (+0.0%)
scan                          +79 B  (+0.0%)      +26 B  (+0.0%)
plans                         +79 B  (+0.0%)      +30 B  (+0.0%)
jetpack-cloud-settings        +79 B  (+0.0%)      +26 B  (+0.0%)
activity                      +79 B  (+0.0%)      +28 B  (+0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Async-loaded Components (~221 bytes added 📈 [gzipped])

name                                       parsed_size           gzip_size
async-load-signup-steps-rewind-migrate           +79 B  (+0.3%)      +28 B  (+0.4%)
async-load-signup-steps-rewind-form-creds        +79 B  (+0.2%)      +26 B  (+0.2%)
async-load-signup-steps-creds-permission         +79 B  (+0.3%)      +24 B  (+0.3%)
async-load-signup-steps-creds-confirm            +79 B  (+0.3%)      +25 B  (+0.3%)
async-load-signup-steps-clone-ready              +79 B  (+0.3%)      +28 B  (+0.4%)
async-load-signup-steps-clone-point              +79 B  (+0.0%)      +28 B  (+0.1%)
async-load-signup-steps-clone-credentials        +79 B  (+0.1%)      +26 B  (+0.2%)
async-load-calypso-my-sites-sidebar              +79 B  (+0.1%)      +36 B  (+0.1%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

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.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@monsieur-z
Copy link
Contributor

Closing as I'm going through the list of PRs requiring review :)

@monsieur-z monsieur-z closed this Nov 16, 2020
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Backups The Jetpack Backup product Jetpack Rewind
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants