Repository navigation
Eliminate redundant Correctness CI stage by merging into Build - #7594
Conversation
The Correctness stage was a full redundant rebuild (restore + slngen + restore + build) that ran in parallel with the Build stage, solely to check warnings-as-errors. This is now handled directly in the Build stage jobs by using the default warnAsError=1 setting (removing the explicit warnAsError: 0 overrides in the public pipeline). Changes: - azure-pipelines.yml: Remove correctness stage, remove it from validateDependsOn - azure-pipelines-public.yml: Remove correctness stage, remove warnAsError: 0 from Windows and Ubuntu build jobs (default is already 1) - azure-pipelines-unofficial.yml: Remove correctness stage
🎉 Good job! The coverage increased 🎉
Full code coverage report: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1487966&view=codecoverage-tab |
There was a problem hiding this comment.
Pull request overview
This PR removes the standalone Correctness CI stage (which rebuilt the repo solely to enforce warnings-as-errors) and relies on the existing Build stage behavior to enforce the same policy, reducing duplicated work and CI runtime.
Changes:
- Removed the redundant
correctnessstage from the official, public, and unofficial Azure Pipelines definitions. - Updated
validateDependsOnin the official pipeline to no longer reference the removed stage. - In the public pipeline, removed explicit
warnAsError: 0overrides so Build jobs use the template default (warnAsError: 1).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| azure-pipelines.yml | Removes correctness stage and drops it from validateDependsOn, relying on the Build stage/template defaults. |
| azure-pipelines-public.yml | Removes the correctness stage and ensures Build jobs now run with template-default warnings-as-errors. |
| azure-pipelines-unofficial.yml | Removes the redundant correctness stage from the unofficial pipeline. |
|
@adamsitnik I've opened a new pull request, #7595, to work on those changes. Once the pull request is ready, I'll request review from you. |
🎉 Good job! The coverage increased 🎉
Full code coverage report: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1488286&view=codecoverage-tab |

The Correctness stage runs a full rebuild (restore → slngen → restore → build) solely to enforce warnings-as-errors, duplicating work already done by the Build stage. This wastes ~15-20 min of agent compute per pipeline run.
Changes
correctnessstage and its entry invalidateDependsOncorrectnessstage; removewarnAsError: 0overrides from Windows/Ubuntu build jobs so they use the template default ofwarnAsError: 1correctnessstageWhy this is safe
The
BuildAndTest.ymltemplate already defaultswarnAsErrorto1. The official and unofficial pipelines never overrode this in their Build jobs—they were already building with warnings-as-errors. Only the public pipeline had explicitwarnAsError: 0, which is now removed.