@@ -25,10 +25,14 @@ jobs:
2525 inputs :
2626 artifactFeeds : " internal/PythonSDK_Internal_PublicPackages"
2727
28- # Install build + lint + test tooling
28+ # Install build + lint + test tooling. Note: we deliberately do NOT
29+ # install the SDK's runtime dependencies (grpcio, protobuf, etc.) here.
30+ # Those are pulled in later via the built wheels' declared metadata so
31+ # that a wheel which accidentally drops a declared dependency surfaces
32+ # the missing dep instead of being silently masked.
2933 - script : |
3034 python -m pip install --upgrade pip
31- python -m pip install build flake8 pytest pytest-asyncio aiohttp
35+ python -m pip install build flake8 pytest pytest-asyncio
3236 displayName: "Install build tooling"
3337
3438 # Lint core SDK
@@ -57,24 +61,36 @@ jobs:
5761 ls -la $(Build.ArtifactStagingDirectory)/buildoutputs/durabletask-azuremanaged
5862 displayName: "List build outputs"
5963
60- # Install the built wheels and run unit tests against them. We exclude
61- # tests marked `dts` (require the Durable Task Scheduler emulator) and
62- # `azurite` (require the Azurite blob emulator) since those external
63- # services aren't provisioned in this network-isolated pool. The full
64- # matrix (including emulator-backed tests) runs in GitHub Actions on
65- # PRs to main and main itself; this step is defense-in-depth to ensure
66- # the artifacts we're about to ship are at least importable and pass
67- # the pure-Python unit tests .
64+ # Install the built wheels with all declared optional extras and let
65+ # pip resolve their runtime dependencies (grpcio, protobuf, packaging,
66+ # azure-identity, azure-storage- blob, opentelemetry-*, etc.). This is
67+ # intentional: if a wheel ever accidentally drops a declared
68+ # dependency, this step will surface the missing dependency at install
69+ # or test time instead of being masked by a preinstalled
70+ # requirements.txt. Test-only tools (pytest, pytest-asyncio) are
71+ # already installed in the "Install build tooling" step above .
6872 #
69- # `requirements.txt` brings in the test-time dependencies (opentelemetry,
70- # grpcio, etc.) that the test modules import. We install it before the
71- # built wheels so the wheels (which are what we're actually validating)
72- # take precedence over any editable/source install of the same package.
73+ # >>> MAINTENANCE NOTE <<<
74+ # When a new optional extra is added to either package's
75+ # `pyproject.toml` under `[project.optional-dependencies]`, append it
76+ # to the extras list below (e.g., add `,my-new-extra` inside the
77+ # brackets). This keeps the smoke tests and dependency-resolution
78+ # check exercising every shipping configuration.
79+ #
80+ # We exclude tests marked `dts` (require the Durable Task Scheduler
81+ # emulator) and `azurite` (require the Azurite blob emulator) since
82+ # those external services aren't provisioned in this network-isolated
83+ # pool. The full matrix (including emulator-backed tests) runs in
84+ # GitHub Actions on PRs to main and main itself.
7385 - script : |
7486 set -e
75- python -m pip install -r requirements.txt
76- python -m pip install $(Build.ArtifactStagingDirectory)/buildoutputs/durabletask/*.whl
77- python -m pip install $(Build.ArtifactStagingDirectory)/buildoutputs/durabletask-azuremanaged/*.whl
87+ # Resolve the wheel filename explicitly because bash treats
88+ # `*.whl[extra]` as a glob with a character class and would not
89+ # append the extras correctly.
90+ DT_WHEEL=$(ls $(Build.ArtifactStagingDirectory)/buildoutputs/durabletask/*.whl)
91+ DT_AM_WHEEL=$(ls $(Build.ArtifactStagingDirectory)/buildoutputs/durabletask-azuremanaged/*.whl)
92+ python -m pip install "${DT_WHEEL}[opentelemetry,azure-blob-payloads]"
93+ python -m pip install "${DT_AM_WHEEL}[azure-blob-payloads]"
7894 displayName: "Install built wheels"
7995
8096 - script : pytest -m "not dts and not azurite" --verbose
0 commit comments