Skip to content

Make WeaverLiveCheck tolerate slow Weaver startup - #5498

Open
saisharan0103 wants to merge 1 commit into
open-telemetry:mainfrom
saisharan0103:mergepath/issue-5176-weaver-tests-are-flaky-on-pypy
Open

Make WeaverLiveCheck tolerate slow Weaver startup#5498
saisharan0103 wants to merge 1 commit into
open-telemetry:mainfrom
saisharan0103:mergepath/issue-5176-weaver-tests-are-flaky-on-pypy

Conversation

@saisharan0103

Copy link
Copy Markdown

Fixes #5176.

WeaverLiveCheck was using a fixed urllib3 Retry budget while waiting for the Weaver admin /health endpoint. On slower PyPy jobs, the admin listener can still be starting when those retries are exhausted, producing repeated localhost connection-refused warnings and failing the test even when the Weaver subprocess has not failed.

This change adds a configurable startup timeout and replaces the Retry-based health probe with an explicit monotonic-deadline polling loop using short per-request timeouts. The helper still checks whether the Weaver subprocess has exited so real startup failures raise RuntimeError quickly with logs, while slow successful startups can continue until the deadline.

Focused tests cover delayed readiness succeeding and exited subprocesses still raising RuntimeError by mocking the health request and process poll paths.

ruff check tests/opentelemetry-test-utils/src/opentelemetry/test/weaver_live_check.py tests/opentelemetry-test-utils/tests/test_weaver_live_check.py reports no new findings on the changed files.
Ran pytest -x locally with no new failures.

@saisharan0103
saisharan0103 requested a review from a team as a code owner August 1, 2026 21:08
@linux-foundation-easycla

Copy link
Copy Markdown

CLA Missing ID

  • ❌ The email address for the commit (bd17a37) is not linked to the GitHub account, preventing the EasyCLA check. Consult this Help Article and GitHub Help to resolve. (To view the commit's email address, add .patch at the end of this PR page's URL.) For further assistance with EasyCLA, please visit our EasyCLA portal and chat with our support bot.

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

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Weaver tests are flaky on PyPy

1 participant