Skip full CI validation for documentation-only changes - #12514
Skip full CI validation for documentation-only changes#12514simonrozsival wants to merge 2 commits into
Conversation
Add a lightweight PR change classifier that skips product builds and tests only when every changed file is Markdown under Documentation/. Keep full validation as the default for mixed, empty, uncertain, forced, and non-PR builds. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1df48155-7897-4ab7-9ad8-6971bafd855b
There was a problem hiding this comment.
Pull request overview
Adds Azure Pipelines classification to skip full CI for documentation-only pull requests.
Changes:
- Adds documentation-only diff detection and a force-validation override.
- Gates builds and tests based on classification.
- Preserves full validation for uncertain or non-documentation changes and the aggregate check.
Show a summary per file
| File | Findings |
|---|---|
build-tools/automation/azure-pipelines-public.yaml |
Requires changes: correct merge-diff selection, boolean parameter handling, and escaping of PR-controlled filenames in Azure logging. |
Review details
Suppressed comments (1)
build-tools/automation/azure-pipelines-public.yaml:97
- ❌ Bug —
git diff --name-onlycan collapse a detected rename to the destination path. A PR that moves an outside file such asREADME.mdtoDocumentation/README.mdcould therefore be classified as docs-only even though the non-documentation path changed. Disable rename detection (or classify both old and new paths) so this allowlist remains conservative.
elif changedFiles="$(git diff --name-only "HEAD^1" "HEAD^2")"; then
- Files reviewed: 1/1 changed files
- Comments generated: 3
- Review effort level: Lite
Classify the PR merge result, treat renames conservatively, render the force-validation boolean explicitly, and prevent filenames from being interpreted as Azure logging commands. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1df48155-7897-4ab7-9ad8-6971bafd855b
|
/review |
|
✅ Android PR Reviewer completed successfully!
|
There was a problem hiding this comment.
The classifier correctly defaults to full validation, uses the complete synthetic merge diff, and wires the expensive build/test roots through the classification result. The current CI run completed successfully. Please preserve the fail-closed behavior when the path matcher itself errors, rather than treating that error as a documentation-only result.
Generated by Android PR Reviewer for #12514 · gpt56 · 77.8 AIC · ⌖ 8.86 AIC · ⊞ 25.7K
Comment /review to run again
| printf 'Changed file: %s\n' "$changedFile" | ||
| done <<< "$changedFiles" | ||
|
|
||
| if [[ -n "$changedFiles" ]] && ! grep -Evq '^Documentation/.*\.md$' <<< "$changedFiles"; then |
There was a problem hiding this comment.
🤖 ! grep -Evq ... conflates grep status 1 (no non-documentation matches) with status >1 (the matcher itself failed). In the latter case this sets runFullValidation=false, even though the classifier is intended to fail closed for uncertain results. Please capture the grep status explicitly and only select reduced validation for status 1; retain full validation and log a warning for any error status.
Rule: Do not swallow command failures
Summary
Documentation/dotnet-androidcheck by always running the classifier jobValidation
dotnet-androidAzure check is required by the repository ruleset