Skip to content

feat(openfeature): decrease default initialization timeout to 10s#18169

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
oleksii/jj-pwzqvtvtzmsy
May 19, 2026
Merged

feat(openfeature): decrease default initialization timeout to 10s#18169
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
oleksii/jj-pwzqvtvtzmsy

Conversation

@dd-oleksii
Copy link
Copy Markdown
Member

@dd-oleksii dd-oleksii commented May 19, 2026

Description

We found that 30s timeout doesn't play well with gunicorn, which has 30s initialization timout for the worker.

If the user naively calls openfeature.api.set_provider() at the top-level, RC failing to deliver configuration may bring their whole application down with hard-to-debug [CRITICAL] WORKER TIMEOUT error message.

Decrease default timeout to 10s, which is enough when RC is working but not too long to cause other issues/upstream timeouts.

Testing

Risks

Additional Notes

Part of incident-54756, follow up to #16650

@dd-oleksii dd-oleksii requested review from a team as code owners May 19, 2026 14:48
@dd-oleksii dd-oleksii requested a review from mabdinur May 19, 2026 14:48
@datadog-datadog-prod-us1
Copy link
Copy Markdown
Contributor

datadog-datadog-prod-us1 Bot commented May 19, 2026

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 6df213e | Docs | Datadog PR Page | Give us feedback!

@dd-oleksii dd-oleksii added the changelog/no-changelog A changelog entry is not required for this PR. label May 19, 2026
@dd-oleksii
Copy link
Copy Markdown
Member Author

Setting changelog/no-changelog to silence the warning — I modified the initial release note for the feature.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f1c7f7f1a5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread supported-configurations.json
We found that 30s timeout doesn't play well with gunicorn, which has
30s initialization timout for the worker.

If the user naively calls `openfeature.api.set_provider()` at the
top-level, RC failing to deliver configuration may bring their whole
application down with hard-to-debug `[CRITICAL] WORKER TIMEOUT` error
message.

Decrease default timeout to 10s, which is enough when RC is working
but not too long to cause other issues/upstream timeouts.
@dd-oleksii dd-oleksii force-pushed the oleksii/jj-pwzqvtvtzmsy branch from f1c7f7f to 6df213e Compare May 19, 2026 14:58
@cit-pr-commenter-54b7da
Copy link
Copy Markdown

Codeowners resolved as

ddtrace/internal/openfeature/_provider.py                               @DataDog/feature-flagging-and-experimentation-sdk
ddtrace/internal/settings/openfeature.py                                @DataDog/feature-flagging-and-experimentation-sdk
releasenotes/notes/fix-openfeature-init-blocking-70c8d5a99287cc49.yaml  @DataDog/apm-python
supported-configurations.json                                           @DataDog/apm-sdk-capabilities-python @DataDog/apm-python

@brettlangdon
Copy link
Copy Markdown
Member

PR #18160

Is going to disable FEATURE_FLAGGING_AND_EXPERIMENTATION, once that merges will this PR need to re-enable that scenario?

https://github.com/DataDog/dd-trace-py/pull/18160/changes#diff-3f74be22ab2d868e3d9812082a1635cdf9938e2f1eb18bb3abf4a899fd7837f1R147

@dd-oleksii
Copy link
Copy Markdown
Member Author

@brettlangdon do you mean #18163? Yes, we need to re-enable that scenario after this is merged

@brettlangdon
Copy link
Copy Markdown
Member

@dd-oleksii both PRs are doing the same thing, we'll close #18163 in favor of #18160

Copy link
Copy Markdown
Contributor

@cbeauchesne cbeauchesne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could your remove FEATURE_FLAGGING_AND_EXPERIMENTATION from excluded_scenarios here ? https://github.com/DataDog/dd-trace-py/blob/main/.github/workflows/system-tests.yml#L147C27-L147C63

@dd-oleksii
Copy link
Copy Markdown
Member Author

@cbeauchesne this PR was open and tests ran before that disable landed. #18172 is set up ready to restore the coverage

@github-actions
Copy link
Copy Markdown
Contributor

This change is marked for backport to 4.9, but it conflicts with that branch.
Attempting to cherrypick this change to 4.9 yielded the following error:

Auto-merging supported-configurations.json
CONFLICT (content): Merge conflict in supported-configurations.json
error: could not apply 62acaf83f5... Merge 6df213e72c62e4eb19c2bcb96fa8cf0410139ade into a6282d1660e06ccabbc2435efac1d4af12d3f94f

The command used to test backporting was

git checkout 4.9 && git cherry-pick -x --mainline 1 62acaf83f5928304a7c234bbc6e7f41eb33a27ca

@brettlangdon brettlangdon dismissed cbeauchesne’s stale review May 19, 2026 18:43

Follow-up is scheduled to add back system-tests coverage, we'll get this PR merged and backported to 4.9 quickly to get it into 4.9.0

@github-actions
Copy link
Copy Markdown
Contributor

This change is marked for backport to 4.10, but it conflicts with that branch.
Attempting to cherrypick this change to 4.10 yielded the following error:

Auto-merging supported-configurations.json
CONFLICT (content): Merge conflict in supported-configurations.json
error: could not apply 62acaf83f5... Merge 6df213e72c62e4eb19c2bcb96fa8cf0410139ade into a6282d1660e06ccabbc2435efac1d4af12d3f94f

The command used to test backporting was

git checkout 4.10 && git cherry-pick -x --mainline 1 62acaf83f5928304a7c234bbc6e7f41eb33a27ca

@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit 017bc2a into main May 19, 2026
430 of 432 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the oleksii/jj-pwzqvtvtzmsy branch May 19, 2026 19:20
brettlangdon added a commit that referenced this pull request May 19, 2026
…8169)

<!-- Provide an overview of the change and motivation for the change -->
We found that 30s timeout doesn't play well with gunicorn, which has 30s initialization timout for the worker.

If the user naively calls `openfeature.api.set_provider()` at the top-level, RC failing to deliver configuration may bring their whole application down with hard-to-debug `[CRITICAL] WORKER TIMEOUT` error message.

Decrease default timeout to 10s, which is enough when RC is working but not too long to cause other issues/upstream timeouts.

<!-- Describe your testing strategy or note what tests are included -->

<!-- Note any risks associated with this change, or "None" if no risks -->

<!-- Any other information that would be helpful for reviewers -->
Part of incident-54756, follow up to #16650

Co-authored-by: brett.langdon <brett.langdon@datadoghq.com>
(cherry picked from commit 017bc2a)
vlad-scherbich pushed a commit that referenced this pull request May 20, 2026
…8169)

## Description

<!-- Provide an overview of the change and motivation for the change -->
We found that 30s timeout doesn't play well with gunicorn, which has 30s initialization timout for the worker.

If the user naively calls `openfeature.api.set_provider()` at the top-level, RC failing to deliver configuration may bring their whole application down with hard-to-debug `[CRITICAL] WORKER TIMEOUT` error message.

Decrease default timeout to 10s, which is enough when RC is working but not too long to cause other issues/upstream timeouts.

## Testing

<!-- Describe your testing strategy or note what tests are included -->

## Risks

<!-- Note any risks associated with this change, or "None" if no risks -->

## Additional Notes

<!-- Any other information that would be helpful for reviewers -->
Part of incident-54756, follow up to #16650

Co-authored-by: brett.langdon <brett.langdon@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 4.9 changelog/no-changelog A changelog entry is not required for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants