-
Notifications
You must be signed in to change notification settings - Fork 812
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
Add Hosting Provider guess #34864
Add Hosting Provider guess #34864
Conversation
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 🤖 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 appearing at the bottom of this PR are passing or skipped. 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. Backup plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Boost plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Search plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Social plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Starter Plugin plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Protect plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Videopress plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Migration plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Inspect plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
41da729
to
2771906
Compare
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
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.
Just a few small comments, I think this is a clever solution for giving a basic guess at the host 👍
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.
What would you think about moving some of this to the Status package, where we already have a Host
class?
jetpack/projects/packages/status/src/class-host.php
Lines 12 to 15 in 0817af0
/** | |
* Hosting provider class. | |
*/ | |
class Host { |
@jeherve I think it's a good idea, I've just implemented that, let me know what you think! |
* @param string $domain The domain of the site to check. | ||
* @return string | ||
*/ | ||
private function get_nameserver_dns_records( $domain ) { |
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.
thank you! Do you think you could add some tests for the new method, in projects/packages/status/tests/php/test-host.php
?
8403bfe
to
1b023c5
Compare
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.
This tested as described, the new tests are passing and the code LGTM 👍
This was added in #34864, but never actually used. We can consequently remove it.
…le. (#41890) * Status: add parameter to bring more specificity to host detection In a lot of situations, we are not interested in knowing the exact hosting provider ; we just want to know if the site is on the WordPress.com platform (and if so, which one). * Script data: provide less specific host info for Jetpack Social We do not need to know exactly what host we're with. It's enough to know it's a WordPress.com platform. See #41076 where this was set up. * Boost: be more specific in hosting provider check. We only need to check for specific WordPress.com platforms here (WoA or Atomic), so we can ditch the generic host detection and only look for those 2. This was added in #39155. * My Jetpack: remove unused parameter. This was added in #34864, but never actually used. We can consequently remove it. * Update Phan baseline
…le. (#41890) * Status: add parameter to bring more specificity to host detection In a lot of situations, we are not interested in knowing the exact hosting provider ; we just want to know if the site is on the WordPress.com platform (and if so, which one). * Script data: provide less specific host info for Jetpack Social We do not need to know exactly what host we're with. It's enough to know it's a WordPress.com platform. See #41076 where this was set up. * Boost: be more specific in hosting provider check. We only need to check for specific WordPress.com platforms here (WoA or Atomic), so we can ditch the generic host detection and only look for those 2. This was added in #39155. * My Jetpack: remove unused parameter. This was added in #34864, but never actually used. We can consequently remove it. * Update Phan baseline
Fixes https://github.com/Automattic/jetpack-roadmap/issues/1039
Proposed changes:
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
/wp-admin/admin.php?page=my-jetpack
window.myJetpackInitialState.isUserFromHostPartner
exists