Skip to content

Make pyproject.toml and req.oldest.txt versions match, fix issues, add validation#254

Merged
lmolkova merged 9 commits into
open-telemetry:mainfrom
lmolkova:ensure-oldest-deps-and-pyproject-match
Jul 13, 2026
Merged

Make pyproject.toml and req.oldest.txt versions match, fix issues, add validation#254
lmolkova merged 9 commits into
open-telemetry:mainfrom
lmolkova:ensure-oldest-deps-and-pyproject-match

Conversation

@lmolkova

@lmolkova lmolkova commented Jul 10, 2026

Copy link
Copy Markdown
Member

Align oldest dep versions with pytproject.toml and add script to validate they match so that we actually test what we declare compatibility with.

google genai and langchain got some version bumps and compatibility fixes

@opentelemetry-pr-dashboard

Copy link
Copy Markdown

This PR has review comments. Review suggestions, whether from maintainers or automated reviewers, aren't always correct or required. Please evaluate each comment on its merits, then make sure each thread has a clear outcome.

For example, link to the commit if you applied a suggestion, explain why it wasn't applied, or ask a follow-up question.

Automation flags a PR for human review once every review thread has a reply or is marked as resolved.

Status across open PRs is visible on the pull request dashboard.

"opentelemetry-semantic-conventions ~= 0.64b0",
"opentelemetry-util-genai >= 1.0b0, <2",
"wrapt >= 1.0.0, < 3.0.0",
"wrapt >= 1.17.0, < 3.0.0",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

can't test with wrapt < 1.17 due to some issues and python version incompatibility

Comment thread util/opentelemetry-test-util-genai/src/opentelemetry/test_util_genai/vcr.py Outdated
Comment thread instrumentation/opentelemetry-instrumentation-genai-langchain/tests/conftest.py Outdated

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.

Pull request overview

This PR aligns “oldest dependency” test pins with the minimum versions declared in package pyproject.toml files, and adds CI enforcement to prevent drift—alongside a few compatibility adjustments for google-genai interactions and langchain VCR-backed tests.

Changes:

  • Add a repository script + CI job to validate tests/requirements.oldest.txt pins match pyproject.toml lower bounds.
  • Introduce an oldest/latest unit-test matrix for the LangChain instrumentation and adjust VCR matching/cassettes for version differences.
  • Update Google GenAI “oldest” pins and gate Interactions instrumentation/tests when the underlying SDK version doesn’t support it.

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
uv.lock Regenerated lockfile updates (notably registry URL normalization) and metadata specifier updates reflecting dependency bound changes.
util/opentelemetry-test-util-genai/src/opentelemetry/test_util_genai/vcr.py Adds a custom json_body VCR matcher and request-body normalization to make cassettes resilient to small request-shape differences.
tox.ini Splits LangChain unit tests into {oldest,latest} tox environments and wires requirements files accordingly.
scripts/check_oldest_deps.py New validator script to compare pyproject.toml lower bounds vs tests/requirements.oldest.txt pins/editables.
instrumentation/opentelemetry-instrumentation-google-genai/tests/requirements.oldest.txt Adjusts oldest pins (notably google-genai==1.32.0) and adds wrapt==1.17.0.
instrumentation/opentelemetry-instrumentation-google-genai/tests/interactions/test_parser.py Skips interactions parser tests when the installed google-genai lacks interactions support.
instrumentation/opentelemetry-instrumentation-google-genai/tests/interactions/test_e2e.py Skips interactions E2E tests when unsupported by the installed SDK version.
instrumentation/opentelemetry-instrumentation-google-genai/tests/interactions/base.py Makes interactions test base robust to SDK module moves and to versions without interactions.
instrumentation/opentelemetry-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai/interactions.py Makes interactions instrumentation conditional (_HAS_INTERACTIONS) and safely no-op on unsupported SDK versions.
instrumentation/opentelemetry-instrumentation-google-genai/pyproject.toml Updates OTel dependency bounds and raises the minimum wrapt version.
instrumentation/opentelemetry-instrumentation-genai-langchain/tests/test_llm_call.py Adjusts assertions and VCR cassette selection to support older/newer LangChain integrations.
instrumentation/opentelemetry-instrumentation-genai-langchain/tests/requirements.oldest.txt Adds a dedicated oldest-pins file for LangChain unit tests.
instrumentation/opentelemetry-instrumentation-genai-langchain/tests/requirements.latest.txt Converts LangChain “latest” requirements to explicit pins for reproducibility.
instrumentation/opentelemetry-instrumentation-genai-langchain/tests/conftest.py Forces Gemini transport to REST and configures VCR to match on json_body.
instrumentation/opentelemetry-instrumentation-genai-langchain/tests/cassettes/test_us_amazon_nova_lite_v1_0_bedrock_llm_call_old.yaml Adds an “old Bedrock” cassette (explicitly marked for re-recording).
instrumentation/opentelemetry-instrumentation-genai-langchain/src/opentelemetry/instrumentation/genai/langchain/callback_handler.py Normalizes models/<name> model IDs to match expected model-name formatting.
.github/workflows/misc.yml Adds a CI job that runs the new oldest-deps consistency check script.

Comment thread scripts/check_oldest_deps.py Outdated
Comment thread scripts/check_oldest_deps.py Outdated
@lmolkova lmolkova force-pushed the ensure-oldest-deps-and-pyproject-match branch from 325adb0 to 9ac957c Compare July 11, 2026 01:50
@lmolkova lmolkova changed the title Validate that pyproject.toml and req.oldest.txt versions match Make pyproject.toml and req.oldest.txt versions match, fix issues, add validation Jul 11, 2026
Comment thread util/opentelemetry-test-util-genai/src/opentelemetry/test_util_genai/vcr.py Outdated
lmolkova added 6 commits July 13, 2026 10:27
The interactions API modules don't exist on the oldest supported
google-genai (1.32.0), so importing them unconditionally at module
top-level broke test collection in the oldest env. Reuse the
instrumentation's _HAS_INTERACTIONS guard and placeholders, and only
assert the interactions resource methods when the API is available.

Assisted-by: Claude Opus 4.8
@lmolkova lmolkova added this pull request to the merge queue Jul 13, 2026
Merged via the queue into open-telemetry:main with commit 68f7ecd Jul 13, 2026
67 checks passed
@lmolkova lmolkova deleted the ensure-oldest-deps-and-pyproject-match branch July 13, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants