Skip Java test matrices for documentation-only PRs - #50302
Merged
Conversation
vcolin7
requested review from
Ben Broderick Phillips (benbp),
Mike Harder (mikeharder) and
Ray Chen (raych1)
as code owners
August 31, 2026 19:54
|
Azure Pipelines: Successfully started running 1 pipeline(s). 35 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
vcolin7
changed the base branch from
pipelinev3-vcolin7-ci-doc-preflight-poc
to
main
August 31, 2026 19:58
vcolin7
requested review from
ivywei0125,
Jesse Squire (jsquire) and
Wei Lim (weikanglim)
and removed request for
ivywei0125
August 31, 2026 19:58
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a deny-first PR change classifier to the unified Java PR pipeline so that documentation-only pull requests can avoid generating Java test matrices (and therefore avoid allocating test workers), while keeping Build and Analyze validation intact.
Changes:
- Adds
eng/scripts/Classify-PRChanges.ps1to classify changed paths and (when safe) clear job-localPackageInfoto force an empty{}test matrix. - Wires the classifier into the PR matrix pre-generation path in
eng/pipelines/templates/jobs/ci.yml. - Adds table-driven Pester coverage in
eng/scripts/tests/Classify-PRChanges.tests.ps1, including the “empty matrix integration” path.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| eng/scripts/tests/Classify-PRChanges.tests.ps1 | Adds Pester tests validating docs-only vs functional classification and the matrix-emptying integration path. |
| eng/scripts/Classify-PRChanges.ps1 | Implements deny-first path classification and the PackageInfo-clearing behavior used to suppress test matrix generation. |
| eng/pipelines/templates/jobs/ci.yml | Invokes the classifier during PR matrix pre-generation to suppress test matrices only for docs-only change sets. |
Suppressed comments (1)
eng/scripts/tests/Classify-PRChanges.tests.ps1:36
- With the classifier no longer treating arbitrary
cspell.*files as safe to skip tests, these paths should be in the "requires Java tests" set to preserve deny-first behavior (and to ensuresdk/cosmos/pipeline/**remains fully validated).
@{ Path = 'sdk/example/example/src/test/resources/cspell.json' }
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
vcolin7
enabled auto-merge (squash)
September 1, 2026 06:39
Alan Zimmer (alzimmermsft)
approved these changes
Sep 1, 2026
Alan Zimmer (alzimmermsft)
approved these changes
Sep 1, 2026
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.
Description
ForceFullValidation=truerollback switch.Motivation
Documentation-only PRs currently select a fallback package and allocate test workers even though they cannot change Java behavior. Recent examples consumed 3–10 test workers and roughly 32–94 agent-minutes. This change removes only those test matrices while preserving the rest of PR validation.
Validation
{}for docs-only changes and populated matrices for functional changes.Scope
This is Phase 1 only. The additional classification outputs are diagnostic/reserved for later work to route focused validation and potentially gate Build or Analyze after their unique checks are relocated.