Skip to content

[google-genai] Remove vcrpy aiohttp stream workaround from test_e2e.py - #819

Merged
aabmass merged 1 commit into
open-telemetry:mainfrom
pylaterreur:vcrpy-1055-aiohttp-workaround
Oct 1, 2026
Merged

aabmass merged 1 commit into
open-telemetry:mainfrom
pylaterreur:vcrpy-1055-aiohttp-workaround

Conversation

@pylaterreur

Copy link
Copy Markdown
Contributor

Description

Removes the patch_vcr_aiohttp_stream fixture from google-genai's test_e2e.py, which patches vcrpy's private aiohttp stubs to work around kevin1024/vcrpy#927. It is a no-op in CI (the tox envs that run it don't install aiohttp, and #110 removed the async streaming test it was written for), and with aiohttp installed it breaks the module's four async test cases once vcrpy ships kevin1024/vcrpy#1055.

Known gaps: without the fixture, an async streaming replay through aiohttp would hang on vcrpy 8.3.0 (kevin1024/vcrpy#927). No test here does that; new ones should require a vcrpy release with kevin1024/vcrpy#1055.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How has this been tested?

uv run tox -e py310-test-instrumentation-google-genai-latest
uv pip install --python .tox/py310-test-instrumentation-google-genai-latest/bin/python \
  aiohttp "vcrpy @ git+https://github.com/kevin1024/vcrpy@refs/pull/1055/head"
uv run tox -e py310-test-instrumentation-google-genai-latest

Checklist

  • Followed the style guidelines of this project
  • Changelog updated if the change requires an entry (test-only: needs the Skip Changelog label)
  • Unit tests added
  • Documentation updated

Assisted-by: Claude Opus 5.5

The patch_vcr_aiohttp_stream fixture subclasses vcrpy's private aiohttp
stubs to work around kevin1024/vcrpy#927. It is a no-op in CI, where the
tox envs don't install aiohttp, and open-telemetry#110 removed the async streaming
test it was written for.

kevin1024/vcrpy#1055 changes those stubs (MockStream takes the body and
content becomes a plain attribute), so with it and aiohttp installed the
fixture makes the four async test cases fail with a TypeError. Remove
the fixture and the imports that only it used.

Assisted-by: Claude Opus 5.5
@pylaterreur
pylaterreur requested a review from a team as a code owner September 30, 2026 23:36
Copilot AI balanced review requested due to automatic review settings September 30, 2026 23:36
@linux-foundation-easycla

linux-foundation-easycla Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: pylaterreur / name: Pierre-Yves Le Borgne (95eb532)

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Merged · refreshed 2026-10-01 16:33 UTC

Status above doesn't look right?
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The removed workaround is unused by current streaming tests and conflicts with newer vcrpy behavior.

Review effort: Balanced
Findings: None

What changed in this PR

Removes an obsolete VCR/aiohttp workaround from Google GenAI end-to-end tests.

Changes:

  • Removes optional aiohttp/vcrpy private imports.
  • Removes the autouse monkeypatch fixture targeting resolved vcrpy behavior.
File Description
instrumentation/​opentelemetry-instrumentation-google-genai/​tests/​generate_content/​test_e2e.py Removes the obsolete aiohttp stream replay workaround.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@lmolkova lmolkova added the Skip Changelog PR does not require a changelog entry label Oct 1, 2026

@aabmass aabmass left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@aabmass
aabmass added this pull request to the merge queue Oct 1, 2026
Merged via the queue into open-telemetry:main with commit 97636a9 Oct 1, 2026
77 of 78 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog PR does not require a changelog entry

Development

Successfully merging this pull request may close these issues.

4 participants