Repository navigation
feat: Retry event delivery and flush on close - #282
flagsmithsmith[bot] wants to merge 4 commits into
Conversation
Its entry in Flagsmith/sdk-spec's compatibility matrix at v0.8.0: `core or events or local-evaluation`.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
Event delivery now survives transient failures of the events API, as SDK spec v0.8.0 requires: - A batch is sent up to 3 times with a 3 s request timeout, backing off from 1 s, doubling, with full jitter, one batch in flight at a time. - A batch whose last attempt fails transiently is kept for the next flush, ahead of newer events, unless that attempt got a 500. - A batch the events API rejects is dropped, and a 401/403 stops event tracking. - A full buffer drops its oldest event. `Flagsmith.flush_events()` sends the tracked events and waits for the outcome, and `Flagsmith.close(timeout_seconds)` stops background work and sends the buffered events within the timeout. The spec steps file wires the new steps, and a client with both local evaluation and events. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Implemented SDK spec v0.8.0 in d019e76. The spec job failed because the SDK was missing four steps, and the event delivery behaviour behind them. SDK changes
Spec wiring ( Verification: I ran the spec v0.8.0 locally with tags |
A timer flush running while the client closed scheduled another one, so the client kept flushing after `close()`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Unit tests failed on 3.10/3.12/3.13 (the spec job passed). |
|
Superseded by #283, which carries this pull request's work over to the SDK spec's latest version. |
Contributes to Flagsmith/sdk-spec#23