Skip to content

fix(tests): prevent background uploads from racing VCR replay - #953

Merged
Abhijeet Prasad (AbhiPrasad) merged 1 commit into
mainfrom
abhi/fix-flaky-sdk-test-82fc511d
Oct 16, 2026
Merged

Abhijeet Prasad (AbhiPrasad) merged 1 commit into
mainfrom
abhi/fix-flaky-sdk-test-82fc511d

Conversation

@AbhiPrasad

Copy link
Copy Markdown
Member

Unit tests could leave real background HTTP uploads running into later cassette-backed tests. In the failing Windows Python 3.14 job, test_span_filters_backend_parity escaped VCR replay and received a live API 401 while unrelated uploads were still running.

Make the memory logger fixture provide the same logger to worker threads, and use memory loggers in the span export and project-group tests that were starting real uploads. Tighten the asyncio.to_thread test to require both parent and worker spans; it fails before the fixture fix because only the parent is captured.

Validation:

  • Full test_core session on macOS with Python 3.14.8 and --vcr-record=none: 1,090 passed, 106 skipped, 12 xfailed.
  • Focused regression and affected tests: 11 passed.
  • Diagnostic full-suite run confirmed only cassette-backed tests still use the HTTP background logger.
  • Pre-commit checks passed. Windows validation remains for CI.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T00:18:36.950008Z eef4cbf PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@AbhiPrasad
Abhijeet Prasad (AbhiPrasad) merged commit edc057c into main Oct 16, 2026
98 checks passed
@AbhiPrasad
Abhijeet Prasad (AbhiPrasad) deleted the abhi/fix-flaky-sdk-test-82fc511d branch October 16, 2026 00:31
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