Skip to content

[FFL-2929] Bound Android assignment request latency - #3693

Draft
leoromanovsky wants to merge 1 commit into
developfrom
agent/ffe-precompute-timeout-retry
Draft

[FFL-2929] Bound Android assignment request latency#3693
leoromanovsky wants to merge 1 commit into
developfrom
agent/ffe-precompute-timeout-retry

Conversation

@leoromanovsky

@leoromanovsky leoromanovsky commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Motivation

Precomputed assignment requests can block an Android evaluation-context update while OkHttp waits for a slow or unavailable edge. The SDK needs a bounded default request budget without preventing applications from selecting a different budget.

Changes and Decisions

  • Add assignmentRequestTimeout() and assignmentRequestRetryCount() to FlagsConfiguration.Builder.
  • Use a 1,000 ms total call timeout per attempt and one retry by default. The default budget is two attempts of up to one second each.
  • Apply the OkHttp call timeout to the complete request, including response body reading.
  • Create a fresh OkHttp call for every attempt.
  • Retry I/O failures, HTTP 408, HTTP 429, and HTTP 5xx responses.
  • Do not retry other HTTP 4xx responses or non-I/O failures.
  • Define retry count as retries after the first attempt. Set it to zero to disable retries.
  • Use the default timeout for non-positive values and treat a negative retry count as zero.
  • Preserve the existing logging, telemetry, and cached-assignment fallback after the retry budget ends.
  • Update the generated public API files and SDK documentation.

Jira: FFL-2929

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.70968% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.41%. Comparing base (2dafcfa) to head (36e415d).

Files with missing lines Patch % Lines
...s/internal/net/PrecomputedAssignmentsDownloader.kt 91.49% 0 Missing and 4 partials ⚠️
...in/kotlin/com/datadog/android/flags/FlagsClient.kt 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3693      +/-   ##
===========================================
- Coverage    73.41%   73.41%   -0.00%     
===========================================
  Files          999      999              
  Lines        36564    36589      +25     
  Branches      6181     6190       +9     
===========================================
+ Hits         26842    26859      +17     
+ Misses        8000     7996       -4     
- Partials      1722     1734      +12     
Files with missing lines Coverage Δ
...in/com/datadog/android/flags/FlagsConfiguration.kt 91.84% <100.00%> (+5.79%) ⬆️
...in/kotlin/com/datadog/android/flags/FlagsClient.kt 44.34% <0.00%> (-0.85%) ⬇️
...s/internal/net/PrecomputedAssignmentsDownloader.kt 92.16% <91.49%> (-4.14%) ⬇️

... and 43 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@leoromanovsky leoromanovsky changed the title [FFL-2929] Bound assignment request latency [FFL-2929] Bound Android assignment request latency Aug 3, 2026
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.

2 participants