Repository navigation
[google-genai] Remove vcrpy aiohttp stream workaround from test_e2e.py - #819
Merged
aabmass merged 1 commit intoOct 1, 2026
Merged
Conversation
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
|
|
Pull request dashboard statusMerged · refreshed 2026-10-01 16:33 UTC Status above doesn't look right?
|
Contributor
There was a problem hiding this comment.
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
approved these changes
Oct 1, 2026
Merged
via the queue into
open-telemetry:main
with commit Oct 1, 2026
97636a9
77 of 78 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Removes the
patch_vcr_aiohttp_streamfixture from google-genai'stest_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
How has this been tested?
latest(Python 3.10, 3.14) andoldestenvs, offline (--vcr-record=none), on vcrpy 8.3.0 and Fix aiohttp response.content streaming when recording and replaying (#502, #927) kevin1024/vcrpy#1055, with and without aiohttp: all pass.TypeError: MockStream.__init__() missing 1 required positional argument: 'body':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-latestChecklist
Skip Changeloglabel)Assisted-by: Claude Opus 5.5