Skip to content

Sync: Add new WP Cli Lets us set disable and enable and reset jetpack sync queues.#12015

Merged
enejb merged 3 commits intomasterfrom
add/wpcli-command-to-disable-sync
Apr 16, 2019
Merged

Sync: Add new WP Cli Lets us set disable and enable and reset jetpack sync queues.#12015
enejb merged 3 commits intomasterfrom
add/wpcli-command-to-disable-sync

Conversation

@enejb
Copy link
Copy Markdown
Member

@enejb enejb commented Apr 10, 2019

This PR make will make it easier to disable, enable, reset jetpack sync and also show the sync settings.

Changes proposed in this Pull Request:

  • Add a new wp cli command that shows the sync settings
  • Add a new wp cli com,and that enables sync
  • Add a new wp cli com,and that disables sync
  • Add a new wp cli com,and that shows the resets/empties sync queues

Testing instructions:

In an environment where wp cli is enabled run the following commands
wp jetpack sync settings
wp jetpack sync enable
wp jetpack sync disable
wp jetpack sync reset --queue=full
wp jetpack sync reset --queue=regular
wp jetpack sync reset

Proposed changelog entry for your changes:

  • Adds new wp cli jetpack sync commands. settings, enable, disable, reset

@enejb enejb added [Status] Needs Review This PR is ready for review. [Feature] Jetpack CLI labels Apr 10, 2019
@enejb enejb added this to the 7.3 milestone Apr 10, 2019
@enejb enejb requested review from a team and ebinnion April 10, 2019 21:59
@enejb enejb self-assigned this Apr 10, 2019
@jetpackbot
Copy link
Copy Markdown
Collaborator

jetpackbot commented Apr 10, 2019

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

Scheduled Jetpack release: April 29, 2019.
Scheduled code freeze: April 22, 2019

Generated by 🚫 dangerJS against 5a0adc0

Copy link
Copy Markdown
Contributor

@kraftbj kraftbj left a comment

Choose a reason for hiding this comment

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

very minor things, reads well.

@enejb enejb dismissed kraftbj’s stale review April 11, 2019 18:31

Addressed the changes

kraftbj
kraftbj previously approved these changes Apr 11, 2019
Copy link
Copy Markdown
Contributor

@kraftbj kraftbj left a comment

Choose a reason for hiding this comment

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

I love the extra details when you're on a staging/development/etc site.

@kraftbj kraftbj added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Apr 11, 2019
@lezama lezama added [Status] Needs Review This PR is ready for review. and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Apr 16, 2019
@kraftbj kraftbj added [Status] Ready to Merge Go ahead, you can push that green button! Enhancement Changes to an existing feature — removing, adding, or changing parts of it and removed [Status] Needs Review This PR is ready for review. labels Apr 16, 2019
@enejb enejb merged commit a35d32c into master Apr 16, 2019
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Apr 16, 2019
kraftbj added a commit that referenced this pull request Apr 30, 2019
@akirk
Copy link
Copy Markdown
Member

akirk commented May 10, 2019

This PR contains many translatable strings with variables that don't have a translators comment explaining them. Could we use PHPCS on Jetpack to remind people to add those comments for placeholders?

  122 | WARNING | [ ] A gettext call containing placeholders was found, but was not accompanied by a "translators:" comment on the line above to clarify
      |         |     the meaning of the placeholders. (WordPress.WP.I18n.MissingTranslatorsComment)

@jeherve jeherve deleted the add/wpcli-command-to-disable-sync branch May 10, 2019 07:22
@jeherve
Copy link
Copy Markdown
Member

jeherve commented May 10, 2019

Could we use PHPCS on Jetpack to remind people to add those comments for placeholders?

We have started adding more and more files to a pre-commit hook that won't let you commit changes if there are phpcs warnings in a file:
https://github.com/Automattic/jetpack/blob/master/bin/phpcs-whitelist.js

Unfortunately, we can't just enable it for all files at once or it would make it very difficult to commit changes to most files in Jetpack today, so that's something that will take time.

Until then, we recommend that everyone install those tools in their editor directly (see our docs here), but that's sometimes not enough, as you've found out.

@enejb Do you think you could fix this in a new PR once #12081 is merged?

@akirk
Copy link
Copy Markdown
Member

akirk commented May 10, 2019

There are tools to limit the scope so that you are not blamed for pre-phpcs code: https://github.com/xwp/wp-dev-lib/blob/master/readme.md#limiting-scope-of-checks

@jeherve
Copy link
Copy Markdown
Member

jeherve commented May 10, 2019

Yes indeed. We've been exploring some options in #11545 (and previously #11515).

@tyxla
Copy link
Copy Markdown
Member

tyxla commented May 10, 2019

@akirk @jeherve here's a follow up PR to fix those errors, among some other i18n-related ones: #12332

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Jetpack CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants