Skip to content

Eliminate redundant Correctness CI stage by merging into Build - #7594

Merged
adamsitnik merged 5 commits into
mainfrom
copilot/study-ci-runtime-contributors
Jun 30, 2026
Merged

adamsitnik merged 5 commits into
mainfrom
copilot/study-ci-runtime-contributors

Conversation

Copilot AI commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

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

  • azure-pipelines.yml: Remove correctness stage and its entry in validateDependsOn
  • azure-pipelines-public.yml: Remove correctness stage; remove warnAsError: 0 overrides from Windows/Ubuntu build jobs so they use the template default of warnAsError: 1
  • azure-pipelines-unofficial.yml: Remove correctness stage

Why this is safe

The BuildAndTest.yml template already defaults warnAsError to 1. 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 explicit warnAsError: 0, which is now removed.

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
@dotnet-comment-bot

Copy link
Copy Markdown
Collaborator

‼️ Found issues ‼️

Project Coverage Type Expected Actual
Microsoft.Extensions.Diagnostics.Testing Line 99 98.65 🔻
Microsoft.Extensions.Telemetry Line 93 91.95 🔻
Microsoft.Extensions.AI Line 89 88.64 🔻
Microsoft.Extensions.AI Branch 89 88.57 🔻
Microsoft.Extensions.AI.OpenAI Line 75 62.89 🔻
Microsoft.Extensions.AI.OpenAI Branch 75 50.41 🔻
Microsoft.Extensions.DataIngestion.MarkItDown Line 75 4.46 🔻
Microsoft.Extensions.DataIngestion.MarkItDown Branch 75 0 🔻
Microsoft.Extensions.Diagnostics.ResourceMonitoring Line 99 96.03 🔻
Microsoft.Extensions.Diagnostics.ResourceMonitoring Branch 99 94.39 🔻
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Kubernetes Line 99 97.73 🔻
Microsoft.Extensions.ServiceDiscovery.Dns Line 75 69.93 🔻
Microsoft.Extensions.ServiceDiscovery.Abstractions Line 75 42.11 🔻
Microsoft.Extensions.ServiceDiscovery.Abstractions Branch 75 42.86 🔻
Microsoft.Extensions.ServiceDiscovery Line 75 67.96 🔻
Microsoft.Extensions.ServiceDiscovery Branch 75 71.43 🔻
Microsoft.Extensions.ServiceDiscovery.Yarp Line 75 73.85 🔻
Microsoft.Extensions.ServiceDiscovery.Yarp Branch 75 70 🔻
Microsoft.Extensions.VectorData.Abstractions Line 75 37.39 🔻
Microsoft.Extensions.VectorData.Abstractions Branch 75 22.73 🔻

🎉 Good job! The coverage increased 🎉
Update MinCodeCoverage in the project files.

Project Expected Actual
Microsoft.Gen.BuildMetadata 97 100
Microsoft.Gen.MetadataExtractor 57 73
Microsoft.Gen.MetricsReports 67 69
Microsoft.Extensions.AI.Abstractions 82 85
Microsoft.Extensions.AI.Evaluation.NLP 0 78
Microsoft.Extensions.Caching.Hybrid 82 89
Microsoft.Extensions.DataIngestion 75 89
Microsoft.Extensions.DataIngestion.Markdig 75 90
Microsoft.Extensions.Http.Resilience 97 100

Full code coverage report: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1487966&view=codecoverage-tab

@adamsitnik
adamsitnik marked this pull request as ready for review June 30, 2026 15:27
Copilot AI review requested due to automatic review settings June 30, 2026 15:27
@adamsitnik
adamsitnik requested a review from a team as a code owner June 30, 2026 15:27

@adamsitnik adamsitnik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, if other maintainers are going to be supportive, I am going to introduce plenty of other similar changes that are going to reduce the total CI time.

Image

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 correctness stage from the official, public, and unofficial Azure Pipelines definitions.
  • Updated validateDependsOn in the official pipeline to no longer reference the removed stage.
  • In the public pipeline, removed explicit warnAsError: 0 overrides 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.

Comment thread azure-pipelines-public.yml
Copilot AI changed the title Eliminate redundant Correctness CI stage by merging into Build Enable MSBuild graph-based builds Jun 30, 2026

@adamsitnik adamsitnik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot revert 22333d9, it was supposed to be a separate PR. Update the PR description and title

Copilot AI commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

@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.

@dotnet-policy-service dotnet-policy-service Bot added waiting-author-feedback 📭 The author of this issue needs to respond in order for us to continue investigating this issue. and removed waiting-author-feedback 📭 The author of this issue needs to respond in order for us to continue investigating this issue. labels Jun 30, 2026
@adamsitnik adamsitnik changed the title Enable MSBuild graph-based builds Eliminate redundant Correctness CI stage by merging into Build Jun 30, 2026
@adamsitnik
adamsitnik enabled auto-merge (squash) June 30, 2026 17:58
@dotnet-comment-bot

Copy link
Copy Markdown
Collaborator

‼️ Found issues ‼️

Project Coverage Type Expected Actual
Microsoft.Extensions.Diagnostics.Testing Line 99 98.65 🔻
Microsoft.Extensions.Telemetry Line 93 91.95 🔻
Microsoft.Extensions.AI Line 89 88.53 🔻
Microsoft.Extensions.AI Branch 89 88.57 🔻
Microsoft.Extensions.AI.OpenAI Line 75 62.89 🔻
Microsoft.Extensions.AI.OpenAI Branch 75 50.41 🔻
Microsoft.Extensions.DataIngestion.MarkItDown Line 75 4.46 🔻
Microsoft.Extensions.DataIngestion.MarkItDown Branch 75 0 🔻
Microsoft.Extensions.Diagnostics.ResourceMonitoring Line 99 96.03 🔻
Microsoft.Extensions.Diagnostics.ResourceMonitoring Branch 99 94.39 🔻
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Kubernetes Line 99 97.73 🔻
Microsoft.Extensions.ServiceDiscovery.Dns Line 75 69.93 🔻
Microsoft.Extensions.ServiceDiscovery.Abstractions Line 75 42.11 🔻
Microsoft.Extensions.ServiceDiscovery.Abstractions Branch 75 42.86 🔻
Microsoft.Extensions.ServiceDiscovery Line 75 68.57 🔻
Microsoft.Extensions.ServiceDiscovery Branch 75 71.43 🔻
Microsoft.Extensions.ServiceDiscovery.Yarp Line 75 73.85 🔻
Microsoft.Extensions.ServiceDiscovery.Yarp Branch 75 70 🔻
Microsoft.Extensions.VectorData.Abstractions Line 75 37.39 🔻
Microsoft.Extensions.VectorData.Abstractions Branch 75 22.73 🔻

🎉 Good job! The coverage increased 🎉
Update MinCodeCoverage in the project files.

Project Expected Actual
Microsoft.Gen.BuildMetadata 97 100
Microsoft.Gen.MetadataExtractor 57 73
Microsoft.Gen.MetricsReports 67 69
Microsoft.Extensions.AI.Abstractions 82 85
Microsoft.Extensions.AI.Evaluation.NLP 0 78
Microsoft.Extensions.Caching.Hybrid 82 85
Microsoft.Extensions.DataIngestion 75 89
Microsoft.Extensions.DataIngestion.Markdig 75 90
Microsoft.Extensions.Http.Resilience 97 100

Full code coverage report: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1488286&view=codecoverage-tab

@adamsitnik
adamsitnik merged commit dd752c3 into main Jun 30, 2026
5 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants