-
Notifications
You must be signed in to change notification settings - Fork 45
chore: Add support for FDv1 polling synchronizer #368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a89650b to
494e635
Compare
15577ce to
a86b02a
Compare
|
|
||
| headers = response.headers | ||
|
|
||
| if response.status == 304: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way, when changing data sources, that this etag could be a problem for us?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like the our payload in the store doesn't have to correspond to the to this etag if there was some data source in the interim. But I think that would be, at worse, a delay and it would require some inconsistent back-end state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we switch over to the polling mode, the etag is empty, ensuring the first request is going to get the full payload. The header from then is only used within the context of this class, I don't think that's problematic. Additionally, when you fallback to FDv1, you don't recover from that. This only happens if FD triggers the fallback, and that's only if something is pretty wrong.
a86b02a to
df5c41c
Compare
Note
Introduces an FDv1 polling fallback and triggers automatic failover from FDv2 based on response headers, with config hooks, parsing, and tests.
X-LD-FD-Fallback: trueand emit updates withrevert_to_fdv1, causing immediate switch to FDv1.FDv2consumesrevert_to_fdv1to switch synchronizers; OFF without fallback no longer implies FDv1.Urllib3FDv1PollingRequesterusingLATEST_ALL_URI.fdv1_polling_payload_to_changesetfor FDv1flags/segmentsfull-transfer parsing.UnsuccessfulResponseExceptionusage; propagateX-LD-EnvIDand fallback flags.Startaction headers; on fallback header emit OFF +revert_to_fdv1.DataSystemConfiggainsfdv1_fallback_synchronizer.ConfigBuilder.fdv1_compatible_synchronizer(...)and wire intodefault(),streaming(), andpolling()(uses FDv1 polling requester).UnsuccessfulResponseExceptionnow carriesheaders;throw_if_unsuccessful_responsepasses them.launchdarkly-eventsourceto>=1.5.0,<2.0.0.Written by Cursor Bugbot for commit df5c41c. This will update automatically on new commits. Configure here.