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

Connection: send package versions on init hook #21173

Merged
merged 3 commits into from
Sep 27, 2021

Conversation

kbrown9
Copy link
Member

@kbrown9 kbrown9 commented Sep 23, 2021

Fixes #21165

Changes proposed in this Pull Request:

  • Send the package versions to wpcom on the init hook instead of plugins_loaded to prevent a conflict with a third party plugin. The plugin isn't ready until the after_setup_theme action has fired.

  • Is there any reason that we shouldn't move the package version check and wpcom request to the init hook? This seems like a safe change to me.

Jetpack product discussion

  • n/a

Does this pull request change what data or activity we track or use?

  • no

Testing instructions:

  1. On a brand new site, install the Passwords Evolved plugin.
  2. Then, install, activate, and connect Jetpack version 10.0.
  3. Then, change from 10.0 to this branch.
  4. Verify that no fatal errors occur.
  5. Verify that the jetpack_package_versions option has been set: wp option get jetpack_package_versions

Fixes #21165

Send the package versions to wpcom on the init hook instead of plugins loaded
to prevent a conflict with a third party plugin. The plugin isn't ready until the
'after_setup_theme' action has fired.
@kbrown9 kbrown9 added [Type] Bug When a feature is broken and / or not performing as intended [Status] In Progress [Pri] High [Package] Connection labels Sep 23, 2021
@kbrown9 kbrown9 self-assigned this Sep 23, 2021
Copy link

@test-case-reminder test-case-reminder bot left a comment

Choose a reason for hiding this comment

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

Here are some suggested test cases for this PR.

Connection

  • In-place connection with free plan
  • In-place connection with paid plan
  • In-place connection with product purchase
  • Classic connection. Use Safari, or set a constant JETPACK_SHOULD_NOT_USE_CONNECTION_IFRAME to true
  • Disconnect/reconnect connection
  • Secondary user connection
  • Connection on multisite

Verify that the changes are compatible with the plugins that use the connection package.

  • WooCommerce Payments
  • Jetpack Boost
  • Previous versions of Jetpack

If you think that suggestions should be improved please edit the configuration file here. You can also modify/add test-suites to be used in the configuration file.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 23, 2021

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.

@kbrown9 kbrown9 added this to the jetpack/10.2 milestone Sep 23, 2021
@kbrown9 kbrown9 added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. and removed [Status] In Progress labels Sep 24, 2021
@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Sep 27, 2021
@samiff samiff enabled auto-merge (squash) September 27, 2021 19:08
@samiff samiff merged commit 83cbe33 into master Sep 27, 2021
@samiff samiff deleted the update/tracker_send_on_init branch September 27, 2021 19:22
@kraftbj kraftbj removed the [Status] Ready to Merge Go ahead, you can push that green button! label Sep 29, 2021
@kraftbj
Copy link
Contributor

kraftbj commented Sep 29, 2021

@kbrown9 Following up -- could we set this even later? I noticed while testing Jetpack on a site that this API call added about a half-second to the execution time and, as far as I can tell, it isn't providing benefit to the visitor. Could we add this to just shutdown?

retrofox pushed a commit that referenced this pull request Oct 1, 2021
Fixes #21165

Send the package versions to wpcom on the init hook instead of plugins loaded
to prevent a conflict with a third party plugin. The plugin isn't ready until the
'after_setup_theme' action has fired.

Co-authored-by: Jeremy Herve <[email protected]>
Co-authored-by: Samiff <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Connection [Pri] High [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package version tracker: conflicts with third-party plugins
4 participants