Skip to content

Debug Helper IDC Simulator: Add the ability to spoof the home url - #21516

Merged
kbrown9 merged 1 commit into
masterfrom
update/debug_idc_simulator_home
Oct 25, 2021
Merged

kbrown9 merged 1 commit into
masterfrom
update/debug_idc_simulator_home

Conversation

@kbrown9

@kbrown9 kbrown9 commented Oct 23, 2021

Copy link
Copy Markdown
Member

Changes proposed in this Pull Request:

  • The Debug Helper plugin's IDC Simulator module allows the user to spoof the siteurl value. Let's add the ability to also spoof the home value. To do this, add two checkboxes that allow the user to choose whether to spoof the siteurl and/or home values. These checkboxes should be checked by default because the most common use case will be to spoof both values.

Jetpack product discussion

  • n/a

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

  • no

Testing instructions:

  1. Install, activate, and connect Jetpack.
  2. Install and activate this branch of the Debug Helper plugin.
  3. Enable the IDC Simulator module of the Debug Helper plugin.
  4. You can observe the spoofed URLs by:
    a. Pointing your server requests to your sandbox by setting the JETPACK__SANDBOX_DOMAIN constant. This will record request urls in debug.log.
    b. Causing a sync action to occur to trigger the sync request (for example, edit a post). Sync requests will include the siteurl and home values, so you can verify that they change as expected.
    c. Note that your site will stop sending sync requests if it goes into an identity crisis. I prevent this by just leaving my server sandbox disabled.
  5. Test different IDC Simulator settings (spoof siteurl alone, home alone 😄, both siteurl and home, and neither) and verify that the URLs are correct in the sync requests.

The Debug Helper plugin's IDC Simulator module allows the user to spoof the siteurl value. Let's
add the ability to also spoof the home value. To do this, add two checkboxes that allow the user
to choose whether to spoof the siteurl and/or home values. These checkboxes should be checked by
default because the most common use case will be to spoof both values.
@kbrown9 kbrown9 added Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Plugin] Debug Helper Debug Tools plugin labels Oct 23, 2021
@kbrown9
kbrown9 requested a review from zinigor October 23, 2021 02:53
@kbrown9 kbrown9 self-assigned this Oct 23, 2021
@github-actions

github-actions Bot commented Oct 23, 2021 •

Copy link
Copy Markdown
Contributor

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.


Debug Helper plugin:

  • Next scheduled release: November 2, 2021.
  • Scheduled code freeze: October 25, 2021.

@github-actions github-actions Bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Oct 23, 2021
@kbrown9 kbrown9 added [Status] In Progress [Status] Needs Review This PR is ready for review. and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Status] In Progress labels Oct 23, 2021

@zinigor zinigor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, this is a great addition to the tool, and I like how you improved the filter logic! The UI will need some refactoring later on, but it's a debug tool, so it's OK for our purposes.

@kbrown9
kbrown9 merged commit 4520b94 into master Oct 25, 2021
@kbrown9
kbrown9 deleted the update/debug_idc_simulator_home branch October 25, 2021 21:30
@github-actions github-actions Bot removed the [Status] Needs Review This PR is ready for review. label Oct 25, 2021
davidlonjon added a commit that referenced this pull request Oct 26, 2021
* master: (27 commits)
  Admin Page: Update upgrade buttons Tracks events (#21483)
  Debug Helper IDC Simulator: Add the ability to spoof the home url (#21516)
  Map block: Add `address` block attribute (#21412)
  Update wordpress monorepo (#21522)
  Stats Page: Add VideoPress nudge (#21513)
  Improve Jetpack products illustrations file size (#21514)
  Update dependency mediawiki/mediawiki-codesniffer to v38 (#21523)
  Update dependency yoast/phpunit-polyfills to v1.0.2 (#21524)
  Widgets: add Strava to Social Icons Widget and Social Menu (#21518)
  Boost: Add active modules to speed score request (#21471)
  Markdown: Better accessibility for Footnotes (#21495)
  Jetpack Plugin: Add VideoPress upgrade page (#21497)
  Admin Menu: moves Add new (plugin) menu item to the top for Atomic sites (#21506)
  General: Check the return value of get_comment() (#21080)
  Instagram Widget: link to user connection if user is not connected (#21512)
  Search: Create a new search package, rename Search plugin (#21502)
  Identity Crisis: Remove the unused jetpack_idc_option transient (#21492)
  Stats: do not update the wpcom blog details (#21441)
  Admin: do not display upgrade messages when on offline mode (#21444)
  jetpack: Catch calls to `exit()` and `die()` in PHPUnit (#21043)
  ...
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 [Plugin] Debug Helper Debug Tools plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants