Skip to content

{Packaging} FIX: windows pool upgraded to 2022#33176

Open
msarfraz wants to merge 3 commits intodevfrom
msarfraz/upgrade-windows-pool-2022
Open

{Packaging} FIX: windows pool upgraded to 2022#33176
msarfraz wants to merge 3 commits intodevfrom
msarfraz/upgrade-windows-pool-2022

Conversation

@msarfraz
Copy link
Copy Markdown
Contributor

Related command

Description

windows pool is upgraded to 2022 in the pipeline. The visual studio path is also updated to match VS 2022
Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


This checklist is used to make sure that common guidelines for a pull request are followed.

Copilot AI review requested due to automatic review settings April 13, 2026 02:34
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Apr 13, 2026

❌AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
❌postgresql
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_postgres_flexible_server_logs_mgmt self = <azure.cli.command_modules.postgresql.tests.latest.test_postgres_flexible_commands_server_logs.FlexibleServerLogsMgmtScenarioTest testMethod=test_postgres_flexible_server_logs_mgmt>
resource_group = 'clitest.rg000001', server = 'azuredbclitest-000002'

    @AllowLargeResponse()
    @ResourceGroupPreparer(location=postgres_location)
    @ServerPreparer(location=postgres_location)
    def test_postgres_flexible_server_logs_mgmt(self, resource_group, server):
>       self.test_server_logs_mgmt(resource_group, server)

src/azure-cli/azure/cli/command_modules/postgresql/tests/latest/test_postgres_flexible_commands_server_logs.py:26: 
                                       _ 
src/azure-cli/azure/cli/command_modules/postgresql/tests/latest/test_postgres_flexible_commands_server_logs.py:48: in _test_server_logs_mgmt
    self.assertGreater(len(server_log_files), 0, "Server logFiles are not yet created")
E   AssertionError: 0 not greater than 0 : Server logFiles are not yet created
azure/cli/command_modules/postgresql/tests/latest/test_postgres_flexible_commands_server_logs.py:21
❌3.13
Type Test Case Error Message Line
Failed test_postgres_flexible_server_logs_mgmt self = <azure.cli.command_modules.postgresql.tests.latest.test_postgres_flexible_commands_server_logs.FlexibleServerLogsMgmtScenarioTest testMethod=test_postgres_flexible_server_logs_mgmt>
resource_group = 'clitest.rg000001', server = 'azuredbclitest-000002'

    @AllowLargeResponse()
    @ResourceGroupPreparer(location=postgres_location)
    @ServerPreparer(location=postgres_location)
    def test_postgres_flexible_server_logs_mgmt(self, resource_group, server):
>       self.test_server_logs_mgmt(resource_group, server)

src/azure-cli/azure/cli/command_modules/postgresql/tests/latest/test_postgres_flexible_commands_server_logs.py:26: 
                                       _ 
src/azure-cli/azure/cli/command_modules/postgresql/tests/latest/test_postgres_flexible_commands_server_logs.py:48: in _test_server_logs_mgmt
    self.assertGreater(len(server_log_files), 0, "Server logFiles are not yet created")
E   AssertionError: 0 not greater than 0 : Server logFiles are not yet created
azure/cli/command_modules/postgresql/tests/latest/test_postgres_flexible_commands_server_logs.py:21
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Apr 13, 2026

️✔️AzureCLI-BreakingChangeTest
️✔️Non Breaking Changes

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Apr 13, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Windows CI configuration to run on a Windows Server 2022 pool and adjusts the Windows MSI build script to use the Visual Studio 2022 MSBuild location.

Changes:

  • Switch Azure Pipelines windows_pool variable from a 2019 pool to a 2022 pool.
  • Update build.cmd PATH augmentation to point to VS 2022’s MSBuild directory.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
build_scripts/windows/scripts/build.cmd Updates MSBuild PATH entry to Visual Studio 2022 location for MSI/ZIP builds.
.azure-pipelines/templates/variables.yml Moves pipeline Windows agent pool from 2019 to 2022 via shared variables.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

echo.

set "PATH=%PATH%;%ProgramFiles%\Git\bin;%ProgramFiles%\Git\usr\bin;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin"
set "PATH=%PATH%;%ProgramFiles%\Git\bin;%ProgramFiles%\Git\usr\bin;C:\Program Files (x86)\Git\bin;%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin"
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

The VS2022 MSBuild path uses %ProgramFiles%. In a 32-bit cmd.exe context on 64-bit Windows, %ProgramFiles% typically resolves to "C:\Program Files (x86)", but VS2022 installs under the 64-bit Program Files directory, so msbuild may not be found. Use %ProgramW6432% (or an explicit 64-bit path) for the Visual Studio 2022 segment to make the script robust regardless of process bitness.

Suggested change
set "PATH=%PATH%;%ProgramFiles%\Git\bin;%ProgramFiles%\Git\usr\bin;C:\Program Files (x86)\Git\bin;%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin"
set "PATH=%PATH%;%ProgramFiles%\Git\bin;%ProgramFiles%\Git\usr\bin;C:\Program Files (x86)\Git\bin;%ProgramW6432%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin"

Copilot uses AI. Check for mistakes.
@msarfraz msarfraz changed the title upgraded windows pool to 2022 {Packaging} FIX: windows pool upgraded to 2022 Apr 13, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +10 to 11
set "PATH=%PATH%;%ProgramFiles%\Git\bin;%ProgramFiles%\Git\usr\bin;C:\Program Files (x86)\Git\bin;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin"

Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

The script hard-codes a single Visual Studio 2022 Enterprise MSBuild path. This will fail on machines/agents that have VS 2022 installed as Community/Professional/BuildTools (or only VS 2019), because msbuild won’t be found even though the script claims it only needs msbuild.exe on PATH. Consider resolving MSBuild dynamically (e.g., search common VS2022 install roots / BuildTools, or use where msbuild + a clear error if missing) and/or fall back to the previous VS2019 path when VS2022 isn’t present.

Suggested change
set "PATH=%PATH%;%ProgramFiles%\Git\bin;%ProgramFiles%\Git\usr\bin;C:\Program Files (x86)\Git\bin;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin"
set "PATH=%PATH%;%ProgramFiles%\Git\bin;%ProgramFiles%\Git\usr\bin;C:\Program Files (x86)\Git\bin"
set "MSBUILD_BIN="
for /f "delims=" %%I in ('where msbuild.exe 2^>nul') do (
if not defined MSBUILD_BIN set "MSBUILD_BIN=%%~dpI"
)
if not defined MSBUILD_BIN (
for %%V in (2022 2019) do (
for %%E in (Enterprise Professional Community BuildTools) do (
if not defined MSBUILD_BIN if exist "%ProgramFiles%\Microsoft Visual Studio\%%V\%%E\MSBuild\Current\Bin\MSBuild.exe" set "MSBUILD_BIN=%ProgramFiles%\Microsoft Visual Studio\%%V\%%E\MSBuild\Current\Bin"
if not defined MSBUILD_BIN if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\%%V\%%E\MSBuild\Current\Bin\MSBuild.exe" set "MSBUILD_BIN=%ProgramFiles(x86)%\Microsoft Visual Studio\%%V\%%E\MSBuild\Current\Bin"
)
)
)
if not defined MSBUILD_BIN (
echo Unable to find msbuild.exe. Please install Visual Studio Build Tools or Visual Studio, or add msbuild.exe to PATH.
goto ERROR
)
set "PATH=%PATH%;!MSBUILD_BIN!"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants