Skip to content

Commit 5e0d95a

Browse files
ci: release workflow's test job needs --all-extras
The release workflow's ``test`` job synced with bare ``uv sync --frozen``, which doesn't install optional dependencies. The ``[otel]`` extras carry every OpenTelemetry package the observability test suites import; without them pyright sees ``Unknown`` for every OTel-typed expression in ``tests/conformance/test_observability.py`` and ``tests/unit/test_observability_otel.py`` and fails the ``Type check (pyright)`` step (633 errors against the v0.5.0-rc1 tag's first run). CI's ``test`` job already syncs with ``--all-extras`` so the package's main CI passes; the release workflow needs the same flag for parity. Build job stays on bare ``uv sync --frozen`` — ``uv build`` reads ``pyproject.toml`` directly and emits the wheel without consulting installed deps, so optional extras don't affect the build artifact. ``pytest.importorskip("opentelemetry.sdk.trace")`` skips the OTel test modules at collection time when the extras aren't installed, but pyright doesn't honor that guard — it still type-checks the file and surfaces every missing-stub expression. ``--all-extras`` is the simplest fix.
1 parent 94b51ea commit 5e0d95a

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,13 @@ jobs:
3333
with:
3434
enable-cache: true
3535

36+
# ``--all-extras`` matches ``ci.yml`` so the OTel-gated tests'
37+
# imports resolve at type-check time. Without it pyright sees
38+
# ``Unknown`` for every OTel-typed expression in
39+
# ``tests/{conformance,unit}/test_observability*.py`` and the
40+
# whole job fails (pyright doesn't honor pytest.importorskip).
3641
- name: Sync deps
37-
run: uv sync --frozen
42+
run: uv sync --frozen --all-extras
3843

3944
# Fail fast if pyproject.toml's version doesn't match the pushed
4045
# tag. Both sides go through `packaging.version.Version` so PEP 440

0 commit comments

Comments
 (0)