[Bug] opentelemetry-api 1.45 removed `_ExtendedAttributes`, and CI can't resolve 1.45 to notice
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 56/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python
- Lĩnh vực
- developer-experience, testing
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 1.2k
- Fork
- 276
- Merge trung bình
- 2 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 87
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của temporalio/sdk-python
-
[Bug] lambda_worker otel.apply_defaults leaks a span exporter thread and gRPC channel on every warm invocationCó thể đã có người làm @avanish-garg đã nhận hôm nay. Đang mởbug sdk-python
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 30/100
temporalio/sdk-python#2040 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Cloud CI Skips Nexus TestsCó thể làm lại được @tconley1428 đã nhận 79 ngày trước và không có pull request nào đang mở. Đang mở
temporalio/sdk-python#1704 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Windows ARM64 wheel supportĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
temporalio/sdk-python#1592 · 8 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
temporalio/sdk-python#1578 · 2 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] Headers should always run through external storageCó thể làm lại được @jmaeagle99 đã nhận 115 ngày trước và không có pull request nào đang mở. Đang mởbug
temporalio/sdk-python#1395 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của temporalio/sdk-python
Issue tương tự
-
changelog investigate
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
ramnes/notion-sdk-py#433 ·
-
docs pkg:core
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
pydantic/pydantic-ai#11929 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
intake/intake-esm#789 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
MemMachine/MemMachine#1877 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
openedx/openedx-authz#579 ·
Maintainer thường phản hồi trong vòng 1 ngày