-
Notifications
You must be signed in to change notification settings - Fork 820
Full sync: Ensure procesing of start end cancel actions in wpcom #43287
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
Full sync: Ensure procesing of start end cancel actions in wpcom #43287
Conversation
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! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryCoverage changed in 13 files. Only the first 5 are listed here.
Full summary · PHP report · JS report Coverage check overridden by
Covered by non-unit tests
|
…ia status key after resetting the data
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.
Great work here @darssen 👍
Looks and tests well
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.
Tests well :)
Fixes VULCAN-74
Proposed changes:
start_action_processed
: Tracks whether thejetpack_full_sync_start
action has been successfully processed.cancelled_action_processed
: Tracks whether thejetpack_full_sync_cancelled
action has been successfully processed.context
: Stores the original context (e.g., initial-sync ) of the full sync request.maybe_send_cancelled_action()
:jetpack_full_sync_cancelled
action if needed.maybe_send_full_sync_start()
:jetpack_full_sync_start
action if needed.send()
Flow:maybe_send_cancelled_action()
first.maybe_send_full_sync_start()
.send_full_sync_end()
:jetpack_full_sync_end
is sent before marking the sync as finished.finished
status if sendingfull_sync_end
fails.Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
No
Testing instructions:
Run a Full Sync and check nothing major changed
In Debugger, run a Full Sync of Everything and check that all actions are processed as expected.
Try sabotaging the different actions to see that we retry them until they are processed
Similar to what was done in #43229, we will sabotage the processing of full sync actions in WPCOM by adding something like below snippet inside
process_event
after getting the action name.Also, to speed up things, we could lower LOCK_TRANSIENT_EXPIRY to something like 10s. We could also lower the 60 seconds to 10 here since we will be processing WP_Errors and setting the RETRY_AFTER_PREFIX option to not try after 1 minute.
Start
jetpack_full_sync_start
action, start a full sync.start_action_processed
should be set to falseCancelled
jetpack_full_sync_cancelled
action. Change the error message to showTrying cancelled but not allowed
End
jetpack_full_sync_end
action. Change the error message to showTrying end but not allowed