feat: Support usePost for FDv2 polling and streaming requests - #341
Merged
Merged
Conversation
kinyoklion
marked this pull request as ready for review
September 21, 2026 22:14
kinyoklion
force-pushed
the
rlamb/sdk-3051/fdv2-use-post
branch
from
September 21, 2026 22:29
ed8292c to
5671348
Compare
joker23
approved these changes
Sep 22, 2026
|
|
||
| /// The definition for [mode]: the user's override if one was given for | ||
| /// it, otherwise the built-in default. | ||
| /// it, otherwise the built-in default, less any sources the platform |
Contributor
There was a problem hiding this comment.
nit: not understanding this comment change.
Member
Author
There was a problem hiding this comment.
There are built-in defaults that get filtered based on what the platform supports.
kinyoklion
pushed a commit
that referenced
this pull request
Sep 25, 2026
🤖 I have created a release *beep* *boop* --- ## [1.15.0](launchdarkly_common_client-v1.14.3...launchdarkly_common_client-v1.15.0) (2026-09-22) ### Features * Support usePost for FDv2 polling and streaming requests ([#341](#341)) ([e52ff32](e52ff32)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Overview** > **Release-only PR** that publishes `launchdarkly_common_client` **1.15.0** via Release Please. > > It updates `.release-please-manifest.json`, `packages/common_client/pubspec.yaml` (1.14.3 → 1.15.0), and adds a **1.15.0** changelog entry. The noted user-facing change in that release is **support for `usePost` on FDv2 polling and streaming requests** ([#341](#341)); this diff does not include the implementation commits. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit c314f90. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
kinyoklion
added a commit
that referenced
this pull request
Sep 25, 2026
## Summary Propagates `usePost` support for FDv2 polling and streaming requests (#341) out to the published Flutter SDK. `flutter_client_sdk` pins `launchdarkly_common_client` exactly, so the new `DataSystemConfig.usePost` option does not reach SDK users until this pin moves. This is the only place in the repo that pins `common_client`. | Package | Version | Status | | --- | --- | --- | | `launchdarkly_common_client` | 1.15.0 | published to pub.dev (#343) | | `launchdarkly_flutter_client_sdk` | 4.21.0 | this PR triggers the release | 1.15.0 is live on pub.dev and `flutter pub get` resolves against it, so there is no publish-ordering constraint: this can merge as soon as CI is green, and the resulting release PR after it. The commit is a `feat` because the SDK gains a new configuration option. Same shape as the prior propagation commits: #339 (`launchdarkly_common_client` 1.14.3) and #331 (1.14.2). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Overview** > Bumps the pinned **`launchdarkly_common_client`** dependency from **1.14.3** to **1.15.0** in `flutter_client_sdk`, so published Flutter SDK consumers pick up the new **`DataSystemConfig.usePost`** option for FDv2 polling and streaming (already in common client 1.15.0 on pub.dev). > > There are no other source changes in this PR—only the dependency pin update, matching prior propagation releases. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 7a2bc06. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The FDv2 data system carried an unwired
usePostflag on each mode-definition entry: the requestor and streaming factories honored it, but the built-in modes hardcoded it tofalseand no configuration exposed it. Under FDv2 the SDK always sent the evaluation context in the URL withGET, anduseReportwas silently ignored.DataSystemConfig.usePost(defaultfalse) switches every FDv2 polling and streaming source toPOSTwith the context JSON in the request body, on the/sdk/poll/evaland/sdk/stream/evalpaths. It replaces the per-entryusePostfields onPollingInitializer,StreamingInitializer,PollingSynchronizerandStreamingSynchronizer, which were not reachable through configuration (the data system is in early access, with no compatibility guarantees). The setting travels throughSourceFactoryContext, so built-in modes and overrides behave the same.EventSourcecannot send aPOST. WhenusePostis set on such a platform the data system drops the streaming sources from every mode and logs a warning, so a streaming mode polls instead. The platform capability is a newstreamingPostSupporteddefault next to the existingstreamingReportSupported.useReporttogether with aDataSystemConfignow logs a warning that the option is ignored and points atusePost.client-use-postand mapsclientSide.usePostontoDataSystemConfig.usePost.usePost. The FDv1 endpoints do not acceptPOST(production returns 404 forPOST /msdk/evalx/contextand 200 forREPORT), so the fallback poller usesREPORTwith the context JSON body whenusePostis set, andGETotherwise.The
POSTrequest variants come from the v3 harness change in launchdarkly/sdk-test-harness#445. With a harness built from that branch the full v3 suite passes against this branch: 844 total, 823 ran, 20 of themPOSTsubtests. CI runs the v2 harness, which this change does not affect.Also verified against production with a mobile key through the contract test service: in polling mode behind a logging proxy the SDK sent
POST /sdk/poll/evalwith the context JSON body and received the environment's flags; in a streaming-only mode (no polling initializer, no cache) withusePostthe stream alone delivered the same 183 flags, matching theGETcontrol runs.Note
Overview
Adds
DataSystemConfig.usePost(default off) so FDv2 polling and streaming send the evaluation context in a POST body instead of a GET URL path. The old per-mode-entryusePostfields are removed; the setting flows throughSourceFactoryContextto all FDv2 sources.On web, where
EventSourcecannot POST, enablingusePoststrips streaming sources from resolved modes, logs a warning, and leaves polling so streaming modes degrade to poll.streamingPostSupportedis added to platform defaults (true on IO, false on JS).FDv1 fallback honors the same flag via REPORT + JSON body (FDv1 does not accept POST).
useReportwith an FDv2 data system now logs that it is ignored and points tousePost.The Flutter contract test service advertises
client-use-postand maps harnessclientSide.usePostontoDataSystemConfig.usePost.Reviewed by Cursor Bugbot for commit 5671348. Bugbot is set up for automated code reviews on this repo. Configure here.