Skip to content

Add a feature flag to enable using URLSession in WordPressKit - #22540

Merged
crazytonyli merged 3 commits into
trunkfrom
wordpresskit-error-refactor
Feb 7, 2024
Merged

Add a feature flag to enable using URLSession in WordPressKit#22540
crazytonyli merged 3 commits into
trunkfrom
wordpresskit-error-refactor

Conversation

@crazytonyli

@crazytonyli crazytonyli commented Feb 5, 2024

Copy link
Copy Markdown
Contributor

The feature flag is enabled for all non-production builds.

Test Instructions

With the feature flag turned on, try features that involves different kinds of HTTP requests, i.e. using self hosted sites, uploading an image/video, deleting a post, updating a post, etc.

Testing error cases would be super valuable too.

Regression Notes

  1. Potential unintended areas of impact
    None.

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    What's described in the Test Instructions section.

  3. What automated tests I added (or what prevented me from doing so)
    None.

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

UI Changes testing checklist: N/A

@wpmobilebot

wpmobilebot commented Feb 5, 2024

Copy link
Copy Markdown
Contributor
WordPress Alpha📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr22540-1142472
Version24.2
Bundle IDorg.wordpress.alpha
Commit1142472
App Center BuildWPiOS - One-Offs #8710
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@wpmobilebot

wpmobilebot commented Feb 5, 2024

Copy link
Copy Markdown
Contributor
Jetpack Alpha📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr22540-1142472
Version24.2
Bundle IDcom.jetpack.alpha
Commit1142472
App Center Buildjetpack-installable-builds #7737
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@crazytonyli
crazytonyli force-pushed the wordpresskit-error-refactor branch from 76c50cc to 07f528c Compare February 6, 2024 22:19
@crazytonyli crazytonyli self-assigned this Feb 6, 2024
@crazytonyli crazytonyli added this to the 24.3 milestone Feb 6, 2024
@crazytonyli
crazytonyli marked this pull request as ready for review February 7, 2024 01:12
case .newTabIcons:
return true
case .useURLSession:
return BuildConfiguration.current != .appStore

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.

Did you consider making this a remote flag?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

if FeatureFlag.useURLSession.enabled {
WordPressComRestApi.useURLSession = true
WordPressOrgXMLRPCApi.useURLSession = true
}

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.

Nitpick: I liked how the WooCommerce counterpart has this in a dedicated function. I feel like it's a great way to keep the configuration cod eat this level tidier.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

👍 Addressed in 1142472

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants