Skip to content

[FFL-2929] Add assignment request timeout - #3828

Draft
leoromanovsky wants to merge 2 commits into
developfrom
leoromanovsky/flags-initial-request-timeout
Draft

[FFL-2929] Add assignment request timeout#3828
leoromanovsky wants to merge 2 commits into
developfrom
leoromanovsky/flags-initial-request-timeout

Conversation

@leoromanovsky

@leoromanovsky leoromanovsky commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Motivation

Flag assignment requests can wait on a slow or incomplete response without an SDK-level bound.

Changes and Decisions

  • Add an opt-in timeout for each assignment request. Zero preserves current behavior.
  • Include the complete response-body download in the timeout.
  • Preserve a shorter timeout from the HTTP transport.
  • Support an assignment-only custom Call.Factory. The SDK timeout composes with its calls.

Validation

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Tests

All CI checks and tests passed. Datadog automation helped this PR pass.

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog retried 1 test - 1 passed on retry View in Datadog

🎯 Code Coverage (details)
Patch Coverage: 96.00%
Overall Coverage: 71.86% (+0.13%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 9491130 | Docs | View more details | Give us feedback!

@leoromanovsky

leoromanovsky commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Fresh live timeout validation

Validated 949113041 on a Google Android 16 / API 36 emulator with a deterministic local HTTPS fault server. Each timeout-only case ran three times through public Flags APIs. Telemetry uploads were disabled.

Validation Expected behavior Fresh observed result
Timeout disabled A 1.2-second response succeeds without an SDK timeout. 3/3 passed; one request; one completion; ready in 1,219–1,254 ms.
Full-body timeout A stalled response body stops near 500 ms. 3/3 passed; one request; one completion; error in 503–507 ms.
Initial request only HTTP 500 ends after the initial assignment request. 3/3 passed; one request; one completion; error in 50–53 ms.
Custom Call.Factory Apply the public 500 ms timeout to a custom factory. 3/3 passed; one factory call; each call received 500 ms; error in 504–505 ms.
Shorter transport timeout Preserve a custom 250 ms timeout under the 500 ms SDK timeout. 3/3 passed; one factory call; timeout remained 250 ms; error in 252–255 ms.

Result: 15/15 fresh timeout cases passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant