Repository navigation
fix: Clear empty FDv2 selectors in shared protocol handling - #261
Draft
kinyoklion wants to merge 2 commits into
Draft
kinyoklion wants to merge 2 commits into
kinyoklion wants to merge 2 commits into
Conversation
Co-Authored-By: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com>
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Co-Authored-By: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com>
This branch has not been deployed
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.
Requirements
Related issues
launchdarkly/ld-relay#979 sends FDv2 full transfers with no selector (
payload-transferred {"state":"","version":0}). The sharedFDv2ProtocolHandlerbuiltSelector.make(0, "")from it, and that selector is not empty. As a result, the server SDK and Android sent an emptybasis=on later polls and stream reconnects. The contract test for this is launchdarkly/sdk-test-harness#600.Describe the solution you've provided
FDv2ProtocolHandler(shared internal): an empty transferredstatenow becomesSelector.EMPTY. The existing store assignment then clears the held selector. The server polling and streaming requests already checkisEmpty(), so they leave outbasis.basisonce the selector is empty.Android uses this shared handler. It needs an internal dependency bump after release (it currently pins 1.9.0). The Java server SDK pins 1.12.2.
Describe alternatives you've considered
Guarding each request builder against an empty state. Normalizing once in the shared handler fixes server and Android in one place.
Additional context
I couldn't verify this locally. Maven Central returned HTTP 429 during Gradle dependency resolution, so tests, Checkstyle, and the selectorless contract group did not run. CI is the first real check.
Link to Devin session: https://app.devin.ai/sessions/f3b22e19bdde48f1b39f77808077390b
Open in Devin Desktop: https://app.devin.ai/desktop/session/f3b22e19bdde48f1b39f77808077390b?variant=devin
Requested by: @kinyoklion