Parallelize Python and Windows .NET CI tests - #2251
Merged
Merged
Conversation
Use two pytest-xdist workers with file-level scheduling so module-scoped E2E clients and proxies remain together while independent modules run concurrently. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Runs Python CI tests concurrently while preserving module-scoped E2E fixtures and proxies.
Changes:
- Adds
pytest-xdistas a development dependency. - Runs pytest with two workers using file-level scheduling.
Show a summary per file
| File | Description |
|---|---|
python/pyproject.toml |
Adds the parallel-test dependency. |
.github/workflows/python-sdk-tests.yml |
Enables two-worker, file-scheduled test execution. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
Contributor
SDK Consistency Review ✅This PR only modifies Python CI test infrastructure:
This is Python/pytest-specific tooling with no equivalent needed in other SDKs (each SDK uses its own test runner). No SDK API surface changes were made, so there are no cross-language consistency concerns.
|
Run the slow Windows default-transport suite in two isolated jobs while preserving serial xUnit execution within each test host. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Review details
Suppressed comments (1)
.github/workflows/dotnet-sdk-tests.yml:15
- The PR title, summary, and reported results are scoped entirely to Python/pytest-xdist, but this file also introduces a separate .NET Windows sharding strategy. This makes the .NET behavior an unreported scope change with no shard results to validate it. Please split this change into a dedicated PR, or update the PR description and provide the corresponding .NET validation results.
name: ".NET SDK Tests (${{ matrix.os }}, ${{ matrix.transport }}, ${{ matrix.backend }}, ${{ matrix.shard }})"
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
- Review effort level: Balanced
SteveSandersonMS
enabled auto-merge
August 4, 2026 16:26
SteveSandersonMS
disabled auto-merge
August 4, 2026 16:26
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
pytest-xdistworker processesResults
Timings from the PR check run:
The Windows .NET critical job was 17.8 minutes in the PR run because one shard had an anomalous 8.9-minute build; its test step was 7.5 minutes. In the separate all-SDK dispatch, builds were normal and the critical Windows shard completed in 15.4 minutes.
The overall PR workflow took 26.8 minutes because two unchanged Ubuntu .NET backend cells had anomalous 12.4- and 19.9-minute build steps. The same final commit completed the all-SDK dispatch in 16.3 minutes. This change does not parallelize or otherwise modify those Ubuntu cells.
The .NET shard filters cover all 710 discovered tests exactly once, split 355/355. All six SDK workflows passed on the final commit in workflow run 30923106592.
Relationship to #2186
#2186 splits Windows .NET execution by target framework for isolation. This PR splits it by test class for latency. The approaches are complementary; if #2186 merges first, the matrix should compose both dimensions (two frameworks by two test shards).