From 5e0d95a536de8660600271efe8178a717d0ffeb7 Mon Sep 17 00:00:00 2001 From: chris-colinsky Date: Sun, 10 May 2026 11:01:35 -0700 Subject: [PATCH] ci: release workflow's test job needs --all-extras MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .github/workflows/release.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 64bf4fb7..f8194896 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,8 +33,13 @@ jobs: with: enable-cache: true + # ``--all-extras`` matches ``ci.yml`` so the OTel-gated tests' + # imports resolve at type-check time. Without it pyright sees + # ``Unknown`` for every OTel-typed expression in + # ``tests/{conformance,unit}/test_observability*.py`` and the + # whole job fails (pyright doesn't honor pytest.importorskip). - name: Sync deps - run: uv sync --frozen + run: uv sync --frozen --all-extras # Fail fast if pyproject.toml's version doesn't match the pushed # tag. Both sides go through `packaging.version.Version` so PEP 440