[Bug] opentelemetry-api 1.45 removed `_ExtendedAttributes`, and CI can't resolve 1.45 to notice
维护者通常 1 天内回复
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 56/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- python
调研方向
Read temporalio/contrib/opentelemetry/_logger_provider.py and tests/contrib/opentelemetry/test_logger_provider.py, then check how the dependency lock and test-latest-deps resolve OpenTelemetry alongside google-adk. Confirm the typing and test collection failures against opentelemetry-api 1.45. Decide how to cover the newer API despite the shared dependency cap; done when the provider checks and tests work with 1.45 and CI can detect this compatibility gap.
由索引模型根据 Issue 内容生成。
描述
What are you really trying to do?
Use temporalio.contrib.opentelemetry with opentelemetry-api 1.45, which the opentelemetry extra allows (>=1.26,<2).
Describe the bug
opentelemetry-api 1.45.0 removed the private alias opentelemetry.util.types._ExtendedAttributes. LoggerProvider.get_logger now annotates attributes as Attributes.
temporalio/contrib/opentelemetry/_logger_provider.pyimports it underTYPE_CHECKINGforReplaySafeLoggerProvider.get_logger. Importing the module still works, but pyright, basedpyright and mypy all report the import on 1.45.tests/contrib/opentelemetry/test_logger_provider.pyimports it at runtime, so the module fails to import on 1.45 and none of its tests run.
CI doesn't see this. google-adk>=2.8.0 requires opentelemetry-sdk>=1.39,<=1.42.1, and the project's lock resolves every extra together, so opentelemetry stays at 1.42.1 everywhere. That includes test-latest-deps, which resolved and installed opentelemetry-api==1.42.1 on the October 27 run. test_wrapper_abc_drift.py is meant to catch new ABC methods there, but it can't while that cap holds.
The runtime break from the same release, the new abstract Logger.enabled method, is a separate PR I'm opening alongside this issue.
Minimal Reproduction
On main (64b7005):
$ uv lock --dry-run -P opentelemetry-api==1.45.1 -P opentelemetry-sdk==1.45.1
× No solution found when resolving dependencies ...
╰─▶ Because google-adk>=2.8.0 depends on opentelemetry-sdk>=1.39,<=1.42.1 ...
With only opentelemetry-api installed, 1.44.0 imports the alias and 1.45.1 doesn't:
$ pip install opentelemetry-api==1.45.1
$ python -c "from opentelemetry.util.types import _ExtendedAttributes"
ImportError: cannot import name '_ExtendedAttributes' from 'opentelemetry.util.types'
test_logger_provider.py runs that import at module level, so on 1.45 it fails at collection. I'd expect it to collect and run, as it does with 1.42.1.
Environment/Versions
- OS and processor: macOS, Apple Silicon
- Temporal Version: temporalio 1.34.0 and
main(64b7005), Python 3.12, opentelemetry-api and opentelemetry-sdk 1.45.1 - Are you using Docker or Kubernetes or building Temporal from source? Neither
Additional context
Typing attributes as Any in the override and in the test's provider checks against both the older _ExtendedAttributes signature and the 1.45 Attributes one, at the cost of the precise type. While the shared resolution stays capped, an isolated check against the latest opentelemetry could cover the gap the drift test can't see. I can send a PR for the annotation once you pick a direction, or follow a different one if you'd rather keep a precise type.
- 主要语言
- Python
- 星标
- 1.2k
- 派生
- 276
- 平均合并
- 1 天 22 小时
- 30 天内合并 PR
- 85
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
temporalio/sdk-python 的其他 Issue
-
Cloud CI Skips Nexus Tests可能重新可做 @tconley1428 于 79 天前认领,目前没有进行中的 PR。 未关闭
temporalio/sdk-python#1704 · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
temporalio/sdk-python#1592 · 8 条评论 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 48/100
temporalio/sdk-python#1578 · 2 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
[Bug] Headers should always run through external storage可能重新可做 @jmaeagle99 于 115 天前认领,目前没有进行中的 PR。 未关闭bug
temporalio/sdk-python#1395 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[python] Support conflict token retry loop for schedule updates可能重新可做 @musi22 于 12 天前认领,目前没有进行中的 PR。 未关闭
难度 4/5 3-5 天 新手友好度 45/100
temporalio/sdk-python#1367 · 2 条评论 ·
维护者通常 1 天内回复
查看 temporalio/sdk-python 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
Graphify-Labs/graphify#4860 · 1 条评论 ·
维护者通常 1 天内回复
-
:bug: Bug
难度 2/5 1-3 小时 新手友好度 84/100
scikit-image/scikit-image#8377 ·
维护者通常 1 天内回复
-
Ingredient import validation accepts negative nutrient values and NaN可能已有人在做 @LukeSekai 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
wger-project/wger#2564 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
apache/ponymail-foal#351 ·
-
难度 1/5 1 小时以内 新手友好度 68/100
维护者通常 4 天内回复