Skip to content

ci: release workflow needs --all-extras for type checks#29

Merged
chris-colinsky merged 1 commit into
mainfrom
fix/release-workflow-extras
May 10, 2026
Merged

ci: release workflow needs --all-extras for type checks#29
chris-colinsky merged 1 commit into
mainfrom
fix/release-workflow-extras

Conversation

@chris-colinsky
Copy link
Copy Markdown
Member

Summary

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.

Surfaced when the v0.5.0-rc1 tag triggered the release pipeline and pyright reported 633 errors despite a passing ci.yml run on the same commit. CI's test job already syncs with --all-extras; the release workflow needs the same flag for parity.

pytest.importorskip("opentelemetry.sdk.trace") skips the OTel test modules at collection time when extras are missing, but pyright doesn't honor that guard — it still type-checks the file and surfaces every missing-stub expression.

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.

Test plan

  • CI green on this PR.
  • After merge, re-tag v0.5.0-rc1 (TestPyPI never received the package — the publish-testpypi job never ran because test failed first); release workflow's test → build → publish-testpypi chain runs clean.

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.
Copilot AI review requested due to automatic review settings May 10, 2026 18:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns the release workflow’s dependency installation with CI so the release pipeline’s test job type-checks successfully when optional OpenTelemetry dependencies are required by test modules.

Changes:

  • Update release.yml test job to run uv sync --frozen --all-extras (matching ci.yml).
  • Add inline workflow comments documenting why --all-extras is required for pyright parity with CI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chris-colinsky chris-colinsky merged commit 64e5251 into main May 10, 2026
9 checks passed
@chris-colinsky chris-colinsky deleted the fix/release-workflow-extras branch May 10, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants