Prepare affected-test selection rollout - #10450
Draft
Evangelink wants to merge 1 commit into
Draft
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Prepares an intentionally disabled rollout of affected-test selection for Microsoft.Testing.Platform CI.
Changes:
- Adds affected-test scopes and gated pipeline modes.
- Adds rollout validation and safety checks.
- Documents activation, storage, validation, and rollback.
Show a summary per file
| File | Description |
|---|---|
global.json |
Defines affected-test scopes. |
azure-pipelines.yml |
Configures disabled collect/run call sites and validation. |
eng/pipelines/steps/test-windows-debug-coverage.yml |
Adds gated affected-test commands. |
eng/validate-affected-tests.ps1 |
Validates rollout configuration. |
docs/affected-test-selection.md |
Documents rollout procedures. |
docs/README.md |
Links the new guide. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 3
- Review effort level: Balanced
Comment on lines
+46
to
+47
| - ${{ if and(eq(parameters.enableAffectedTests, true), eq(parameters.affectedTestsMode, 'run')) }}: | ||
| - script: dotnet test -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig)\TestStep.binlog -p:UsingDotNetTest=true -p:TestingPlatformCaptureOutput=false --affected-tests |
Comment on lines
+55
to
+56
| if (-not $affectedTestsEnabled -and $null -ne $affectedTests.storage) { | ||
| throw "Remove test.affectedTests.storage while affected-test pipeline execution is disabled." |
Comment on lines
+27
to
+29
| if ($null -eq $value -or @($value).Count -eq 0) { | ||
| throw "global.json test.affectedTests.$path must be a non-empty array." | ||
| } |
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
Prepares testfx to adopt the experimental Microsoft.Testing.Platform affected-test workflow from dotnet/sdk#55574, using the composable filter-provider support already merged in testfx#10235.
The rollout is intentionally disabled. The SDK change has not flowed into this repository's pinned SDK, and the affected-test extension package and public storage schema are not available yet. Existing test runs therefore keep their current command and behavior.
Prepared now
test.affectedTestschange and instrumentation scopes toglobal.json;--collect-test-mapcollection;--affected-testsselection;enableAffectedTests: false;DOTNET_CLI_ENABLE_AFFECTED_TESTS=1to the inactive affected-test branches;DOTNET_CLI_TEST_AFFECTED_TESTS_MODEmarker;Intentionally gated
The
storageproperty is intentionally absent fromglobal.jsonrather than inventing a provider name, package, credential, or private endpoint. The intended CI design is Azure Blob Storage as the durable cross-run map, authenticated through secure pipeline facilities, with Azure DevOps artifacts used only for non-secret diagnostics or snapshots.Activation requires:
storageschema and secure pipeline authentication;Rollout and rollback
After the prerequisites flow, add the documented storage configuration, enable
collecton trusted main, validate the produced map and diagnostics, then enablerunfor PR Windows Debug. Validate documentation-only, narrowly affected, force-all, missing/incompatible-map, fork-PR, and collection-failure scenarios before making selection required.Rollback is explicit and immediate: set
enableAffectedTestsback tofalse. The unchanged full test command remains the disabled branch.Validation
global.jsonand modified YAML parse successfully.git diff --checkpasses.