Skip to content

Conversation

@sergeymitr
Copy link
Contributor

@sergeymitr sergeymitr commented Oct 23, 2025

Proposed changes:

  • Modify the /sites/%s endpoint to make is_private property reflect the actual AT privacy model instead of the cache site's blog_public property.
  • Introduce new maybe_fix_private_site_option() function to automatically adjust local blog_public option to match the privacy model.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

https://linear.app/a8c/issue/CONNECT-47

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

No.

Testing instructions:

  1. Create a WoA dev blog (p9o2xV-1r2-p2), install Jetpack Beta.
  2. Use Jetpack Beta to checkout the branch for "Jetpack" and "WordPress.com Site Helper" plugins.
  3. Launch the site, then go to /wp-admin/options-reading.php and make it "private".
  4. Go to /wp-admin/options.php and check the blog_public value. Confirm it's -1, then change it to 1.
  5. Go to https://wordpress.com/sites/your-site-slug. It will send the API request that will trigger the option change.
  6. Refresh the options page, confirm the blog_public value got switched back to -1.
  7. Check log2logstash for feature:atomic_private_site_blog_public_adjusted. Confirm there's a record indicating the option change. Confirm properties.current_value and properties.new_value are correct.
  8. Go back to /wp-admin/options.php and make the site "Public", then repeat steps 4-7 with the different values (change the option to -1, then confirm it got auto-reverted to 1).
  9. Go to /wp-admin/options.php and switch the site to "Coming Soon". Then change the option value to 1 or -1.
  10. Visit https://wordpress.com/sites/your-site-slug and confirm the option value stayed the same (we don't do auto-adjustment for "coming soon" sites).

@sergeymitr sergeymitr self-assigned this Oct 23, 2025
@sergeymitr sergeymitr added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] In Progress [Platform] Atomic labels Oct 23, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2025

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack or WordPress.com Site Helper), and enable the update/atomic-site-endpoint-is-private branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/atomic-site-endpoint-is-private

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions github-actions bot added [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Wpcomsh labels Oct 23, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2025

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.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add a "[Type]" label (Bug, Enhancement, Janitorial, Task).
  • ✅ 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 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

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:

  • WordPress.com Simple releases happen as soon as you deploy your changes after merging this PR (PCYsg-Jjm-p2).
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly:
    • Scheduled release: November 4, 2025
    • Code freeze: November 3, 2025

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.


Wpcomsh plugin:

  • Next scheduled release: Atomic deploys happen twice daily on weekdays (p9o2xV-2EN-p2)

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@jp-launch-control
Copy link

jp-launch-control bot commented Oct 23, 2025

Code Coverage Summary

Coverage changed in 2 files.

File Coverage Δ% Δ Uncovered
projects/plugins/wpcomsh/private-site/private-site.php 61/335 (18.21%) -1.53% 26 💔
projects/plugins/jetpack/sal/class.json-api-site-jetpack.php 2/101 (1.98%) -0.10% 5 💔

Full summary · PHP report · JS report

If appropriate, add one of these labels to override the failing coverage check: Covered by non-unit tests Use to ignore the Code coverage requirement check when E2Es or other non-unit tests cover the code Coverage tests to be added later Use to ignore the Code coverage requirement check when tests will be added in a follow-up PR I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage.

@sergeymitr sergeymitr force-pushed the update/atomic-site-endpoint-is-private branch from 53c422b to d9c0b63 Compare October 24, 2025 00:48
@sergeymitr sergeymitr added [Status] Needs Review This PR is ready for review. and removed [Status] In Progress labels Oct 24, 2025
@sergeymitr sergeymitr requested a review from a team October 24, 2025 13:55
coder-karen
coder-karen previously approved these changes Oct 27, 2025
Copy link
Contributor

@coder-karen coder-karen left a comment

Choose a reason for hiding this comment

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

Tests well! Left a comment, but not a blocker.

)
);

wp_remote_post( 'https://public-api.wordpress.com/rest/v1.1/logstash', array( 'body' => array( 'params' => $data ) ) );
Copy link
Contributor

Choose a reason for hiding this comment

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

This is interesting, I see the same approach to logging was used in another location in wpcomsh as well. Do you think that the number of log entries will be reasonable? Also, what is the purpose of logging the value changes - is it to help debug issues that might arise on individual sites? We could see whether the option was updated via sync, but not what value at what time, so I guess if the history was important it makes sense to log. 🤔

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 for general monitoring and potential debugging, we'll see if we actually need the data.
I don't expect the number to be too big. And since only Atomic is affected, it all should work pretty fast.
Removing it wouldn't be hard either, since Atomic runs on fresh Jetpack versions.

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

Labels

[Platform] Atomic [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] Wpcomsh [Status] Needs Review This PR is ready for review. [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants