Enforce bounds on instruments dependencies and pin latest test requirements - #438
Enforce bounds on instruments dependencies and pin latest test requirements#438lmolkova wants to merge 5 commits into
Conversation
Assisted-by: Claude Opus 4.6
|
No longer blocked, they can be merged in any order |
Pull request dashboard statusWaiting on reviewers · refreshed 2026-08-21 05:20 UTC Review the latest changes. Status above doesn't look right?
|
There was a problem hiding this comment.
Pull request overview
This PR tightens dependency hygiene for instrumentation packages by requiring all instruments extra requirements (and the corresponding package.py _instruments) to declare both lower and upper bounds, and updates packages/docs/lockfile accordingly to avoid CI breakage when upstream libraries ship new major versions.
Changes:
- Update
scripts/check_deps.pyto enforce presence of both lower and upper bounds forinstrumentsextra requirements (in addition to matching_instruments). - Add missing upper bounds to multiple instrumentation packages’
pyproject.tomlinstrumentsextras andpackage.py_instruments, updating related tests. - Refresh
uv.lockand update the top-level README instrumentation support table to reflect the bounded ranges.
Reviewed changes
Copilot reviewed 26 out of 27 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Regenerated lockfile reflecting newly bounded instrument dependencies. |
| scripts/check_deps.py | Enforces lower+upper bounds on instruments requirements (and keeps _instruments in sync). |
| README.md | Updates “Supported Package” version ranges to include upper bounds. |
| instrumentation/opentelemetry-instrumentation-genai-smolagents/tests/test_instrumentor.py | Adjusts expected dependency string to include an upper bound. |
| instrumentation/opentelemetry-instrumentation-genai-smolagents/src/opentelemetry/instrumentation/genai/smolagents/package.py | Adds upper bound to _instruments. |
| instrumentation/opentelemetry-instrumentation-genai-smolagents/pyproject.toml | Adds upper bound to instruments extra. |
| instrumentation/opentelemetry-instrumentation-genai-qwen-agent/tests/test_instrumentor.py | Adjusts expected dependency string to include an upper bound. |
| instrumentation/opentelemetry-instrumentation-genai-qwen-agent/src/opentelemetry/instrumentation/genai/qwen_agent/package.py | Adds upper bound to _instruments. |
| instrumentation/opentelemetry-instrumentation-genai-qwen-agent/pyproject.toml | Adds upper bound to instruments extra. |
| instrumentation/opentelemetry-instrumentation-genai-openai-agents/src/opentelemetry/instrumentation/genai/openai_agents/package.py | Adds upper bound to _instruments. |
| instrumentation/opentelemetry-instrumentation-genai-openai-agents/pyproject.toml | Adds upper bound to instruments extra. |
| instrumentation/opentelemetry-instrumentation-genai-llama-index/src/opentelemetry/instrumentation/genai/llama_index/package.py | Adds upper bound to _instruments. |
| instrumentation/opentelemetry-instrumentation-genai-llama-index/pyproject.toml | Adds upper bound to instruments extra. |
| instrumentation/opentelemetry-instrumentation-genai-langchain/src/opentelemetry/instrumentation/genai/langchain/package.py | Adds upper bound to _instruments. |
| instrumentation/opentelemetry-instrumentation-genai-langchain/pyproject.toml | Adds upper bound to instruments extra. |
| instrumentation/opentelemetry-instrumentation-genai-crewai/tests/test_instrumentor.py | Adjusts expected dependency string to include an upper bound. |
| instrumentation/opentelemetry-instrumentation-genai-crewai/src/opentelemetry/instrumentation/genai/crewai/package.py | Adds upper bound to _instruments. |
| instrumentation/opentelemetry-instrumentation-genai-crewai/pyproject.toml | Adds upper bound to instruments extra. |
| instrumentation/opentelemetry-instrumentation-genai-claude-agent-sdk/tests/test_instrumentor.py | Adjusts expected dependency string to include an upper bound. |
| instrumentation/opentelemetry-instrumentation-genai-claude-agent-sdk/src/opentelemetry/instrumentation/genai/claude_agent_sdk/package.py | Adds upper bound to _instruments. |
| instrumentation/opentelemetry-instrumentation-genai-claude-agent-sdk/pyproject.toml | Adds upper bound to instruments extra. |
| instrumentation/opentelemetry-instrumentation-genai-anthropic/tests/test_instrumentor.py | Adjusts expected dependency string to include an upper bound. |
| instrumentation/opentelemetry-instrumentation-genai-anthropic/src/opentelemetry/instrumentation/genai/anthropic/package.py | Adds upper bound to _instruments. |
| instrumentation/opentelemetry-instrumentation-genai-anthropic/pyproject.toml | Adds upper bound to instruments extra. |
| instrumentation/opentelemetry-instrumentation-genai-agno/tests/test_instrumentor.py | Adjusts expected dependency string to include an upper bound. |
| instrumentation/opentelemetry-instrumentation-genai-agno/src/opentelemetry/instrumentation/genai/agno/package.py | Adds upper bound to _instruments. |
| instrumentation/opentelemetry-instrumentation-genai-agno/pyproject.toml | Adds upper bound to instruments extra. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Assisted-by: Claude Opus 4.6
Assisted-by: Claude Opus 4.6
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 32 out of 33 changed files in this pull request and generated no new comments.
Suppressed comments (1)
scripts/check_deps.py:236
check_latest_requirementsbuildsinstrumented_namesusingRequirement(r)without any error handling. If a future edit introduces an invalid requirement string inpyproject.toml'sinstrumentsextra, this script will raise and exit with a traceback instead of reporting a structured dependency-check error (even thoughcheck_instruments_matchalready handles that case). Catch the exception here and return an error entry instead of crashing.
Assisted-by: Claude Opus 4.6
# Conflicts: # README.md # instrumentation/opentelemetry-instrumentation-genai-anthropic/pyproject.toml # instrumentation/opentelemetry-instrumentation-genai-anthropic/src/opentelemetry/instrumentation/genai/anthropic/package.py # instrumentation/opentelemetry-instrumentation-genai-anthropic/tests/requirements.latest.txt # instrumentation/opentelemetry-instrumentation-genai-anthropic/tests/test_instrumentor.py # scripts/check_deps.py # uv.lock
Enforces that all
[project.optional-dependencies] instrumentsandpackage.py_instrumentsdeclare both lower and upper bounds, and that target libraries intests/requirements.latest.txtare pinned/upper-bounded (~= major.minoror== major.minor.patch).Target libraries frequently introduce breaking changes in major releases (as seen in #393 for OpenAI and #435 for Anthropic). Unbounded dependencies cause unexpected CI failures across the repo when
*-latestmatrix environments install newly released major versions.