Skip to content

test(python): let a weblog declare its request timeout, 10s for uwsgi-poc - #7596

Merged
cbeauchesne merged 2 commits into
mainfrom
christophe-papazian/raise-python-weblog-request-timeout
Aug 28, 2026
Merged

test(python): let a weblog declare its request timeout, 10s for uwsgi-poc#7596
cbeauchesne merged 2 commits into
mainfrom
christophe-papazian/raise-python-weblog-request-timeout

Conversation

@christophe-papazian

@christophe-papazian christophe-papazian commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

APPSEC-69833

uwsgi-poc occasionally stalls a few seconds on an early request, exceeding the weblog client's 5s read timeout. The test then gets no response at all and fails on a null status code, though the weblog answered a moment later (seen in CI: 403 after 6517ms, client gave up at 5000ms). The trace was flushed and collected normally, so only the HTTP leg was affected.

Makes the client's default read timeout configurable, declared per weblog in weblog_metadata.yml. Only uwsgi-poc sets one (10s); every other weblog keeps 5s, and explicit per-call timeouts are unchanged.

This reduces flake exposure, it does not explain the stall — still under investigation.

@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

utils/_context/containers.py                                            @DataDog/system-tests-core
utils/_context/weblog_metadata.py                                       @DataDog/system-tests-core
utils/_weblog.py                                                        @DataDog/system-tests-core
utils/build/docker/python/weblog_metadata.yml                           @DataDog/system-tests-reviewers

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Aug 26, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog auto-retried 7 jobs - 7 passed on retry View in Datadog

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

@christophe-papazian
christophe-papazian force-pushed the christophe-papazian/raise-python-weblog-request-timeout branch from 405f3a9 to ef9b450 Compare August 26, 2026 13:44
@christophe-papazian christophe-papazian changed the title test(python): raise weblog request timeout to 10s test(python): let a weblog declare its request timeout, 10s for uwsgi-poc Aug 26, 2026
@christophe-papazian
christophe-papazian force-pushed the christophe-papazian/raise-python-weblog-request-timeout branch from ef9b450 to c3ffad6 Compare August 26, 2026 13:50
@christophe-papazian
christophe-papazian marked this pull request as ready for review August 26, 2026 15:27
@christophe-papazian
christophe-papazian requested review from a team as code owners August 26, 2026 15:27
@christophe-papazian
christophe-papazian requested review from NachoEchevarria and nccatoni and removed request for a team August 26, 2026 15:27

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

Copy link
Copy Markdown

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: c3ffad63a3

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread utils/_weblog.py
…-poc

The uwsgi-poc weblog occasionally stalls for several seconds on a single
early request, which exceeds the 5s read timeout in the weblog client.
The request then has no response at all and the test fails on a null
status code, even though the weblog answered correctly a moment later.

Observed in CI: the whole worker process freezes for ~5s while the first
subprocess is spawned, and the weblog returned 403 after 6517ms while
the client had already given up at 5000ms. The trace itself was flushed
normally and collected mid-run, so only the HTTP leg was affected.

Make the client's default read timeout configurable, and let a weblog
declare its own value in its library's weblog_metadata.yml rather than
being special-cased in containers.py. Only uwsgi-poc declares one; every
other weblog keeps the 5s default, and explicit per-call timeouts are
unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@christophe-papazian
christophe-papazian force-pushed the christophe-papazian/raise-python-weblog-request-timeout branch from c3ffad6 to ab4105e Compare August 26, 2026 15:35

@nccatoni nccatoni left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Did you try using https://github.com/DataDog/system-tests/actions/workflows/debug-harness.yml to confirm that this change resolves the flakiness? I’d like to ensure it addresses the issue reliably before increasing the timeout. Ideally, we should identify the root cause of the delay, since five seconds is already quite long.

@christophe-papazian

Copy link
Copy Markdown
Contributor Author

Did you try using DataDog/system-tests/actions/workflows/debug-harness.yml to confirm that this change resolves the flakiness? I’d like to ensure it addresses the issue reliably before increasing the timeout. Ideally, we should identify the root cause of the delay, since five seconds is already quite long.

@nccatoni The very low flakyness would have been avoided with this change for sure. I tried debug-harness.yml on https://github.com/DataDog/system-tests/actions/runs/32986639106

@cbeauchesne
cbeauchesne disabled auto-merge August 28, 2026 13:04
@cbeauchesne
cbeauchesne merged commit e60c20c into main Aug 28, 2026
2834 of 2837 checks passed
@cbeauchesne
cbeauchesne deleted the christophe-papazian/raise-python-weblog-request-timeout branch August 28, 2026 13:04
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.

3 participants