chore: Add support for FDv1 polling synchronizer#368
Conversation
a89650b to
494e635
Compare
15577ce to
a86b02a
Compare
|
|
||
| headers = response.headers | ||
|
|
||
| if response.status == 304: |
There was a problem hiding this comment.
Is there any way, when changing data sources, that this etag could be a problem for us?
There was a problem hiding this comment.
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.
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.