Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 23, 2025

This PR backports changes from #9450 to the release/8.0.1xx branch.

Problem

As reported in #9429, the official pipeline was running both integration tests and unit tests despite specifying the -integrationTest flag. This caused unnecessary test execution during official builds, which should focus on producing release artifacts rather than running tests.

Solution

Modified azure-pipelines.yml to conditionally control test execution based on the build type:

  • Pull Request builds: Continue running with the -integrationTest flag to ensure PR validation includes test execution
  • Official builds: Explicitly disable all tests using the /p:Test=false MSBuild property

Changes

The Windows build step in the official pipeline now uses Azure Pipelines template conditionals:

- ${{ if in(variables['Build.Reason'], 'PullRequest') }}:
  - script: eng/common/cibuild.cmd
      -configuration $(_BuildConfig)
      -prepareMachine
      -integrationTest
      $(_InternalBuildArgs)
    displayName: Windows Build / Publish
- ${{ else }}:
  - script: eng/common/cibuild.cmd
      -configuration $(_BuildConfig)
      -prepareMachine
      /p:Test=false
      $(_InternalBuildArgs)
    displayName: Windows Build / Publish

This ensures tests are only run during PR validation, while official builds skip test execution entirely, improving build performance and consistency with the intended behavior.

Related

Original prompt

Backport PR #9450 to the release/8.0.1xx branch.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Backport PR 9450 to release 8.0.1xx branch Backport PR #9450: Disable tests on official builds Oct 23, 2025
Copilot finished work on behalf of marcpopMSFT October 23, 2025 19:24
Copilot AI requested a review from marcpopMSFT October 23, 2025 19:24
@marcpopMSFT marcpopMSFT marked this pull request as ready for review October 23, 2025 21:44
@marcpopMSFT marcpopMSFT requested a review from a team as a code owner October 23, 2025 21:44
Copy link
Member

@joeloff joeloff left a comment

Choose a reason for hiding this comment

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

Should the reason check perhaps be reversed, if it's an official build, don't run tests. That way, if someone ever pushed a private branch to internal, but also wanted tests, they'd get those?

@MiYanni
Copy link
Member

MiYanni commented Oct 23, 2025

@joeloff There's no value associated with an "official build". So, you can't make a predicate off of it unless you add a pipeline parameter or something like that. Right now, it runs tests if it is a PR, and all other types of running the pipeline (CI or manual for example) will run the "official build". Since PR is a single value and "official build" is unbound (there's a bound, but I don't know every value possible for Build.Reason), it is easier to do it this way. Also, I'm very much hoping this pipeline doesn't get a lot of use going forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants