ci: release workflow needs --all-extras for type checks#29
Merged
Conversation
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.
There was a problem hiding this comment.
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.ymltestjob to runuv sync --frozen --all-extras(matchingci.yml). - Add inline workflow comments documenting why
--all-extrasis required for pyright parity with CI.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The release workflow's
testjob synced with bareuv sync --frozen, which doesn't install optional dependencies. The[otel]extras carry every OpenTelemetry package the observability test suites import; without them pyright seesUnknownfor every OTel-typed expression intests/conformance/test_observability.pyandtests/unit/test_observability_otel.pyand fails theType check (pyright)step.Surfaced when the
v0.5.0-rc1tag triggered the release pipeline and pyright reported 633 errors despite a passingci.ymlrun on the same commit. CI'stestjob 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 buildreadspyproject.tomldirectly and emits the wheel without consulting installed deps, so optional extras don't affect the build artifact.Test plan
v0.5.0-rc1(TestPyPI never received the package — the publish-testpypi job never ran because test failed first); release workflow'stest → build → publish-testpypichain runs clean.