Repository navigation
fix: Poll for flag updates when the stream sends a ping event - #647
Draft
kinyoklion wants to merge 3 commits into
Draft
kinyoklion wants to merge 3 commits into
kinyoklion wants to merge 3 commits into
Conversation
Generated-by: termag
Generated-by: termag
…eam fails Generated-by: termag
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.
The client SDK ignored the "ping" event, which the Relay Proxy can send in place of flag data, so it did not get the changed flags. On a ping, the streaming data source now polls for the current context with the configured method (REPORT or GET) and reasons setting, and applies the result as a full data set.
One ping poll runs at a time. A ping that arrives during a poll causes one more poll after it completes, so the newest data is applied last and a burst of pings costs at most two polls. A poll result that arrives after shutdown, or after the stream stops on an unrecoverable error, is discarded. A failed poll sets the Interrupted state, the stream stays open, and the next ping polls again. As in the other SDKs, a failed poll is not retried, so a failed first poll leaves the SDK initializing until the next ping. An HTTP 401 or 403 on the poll does not shut the data source down, as in the JS and Android SDKs.
Testing: With Beast and with CURL, new unit tests cover GET, REPORT, reasons, pings during a poll, an error status, a network error, and a poll that completes after shutdown or after the stream stops. They fail without the change. The two harness ping tests change from fail to pass, and the full client contract suite shows no other change.
SDK-3657
Opened from termag