Skip to content

Conversation

@azure-sdk
Copy link
Collaborator

Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#13750 See eng/common workflow

@azure-sdk azure-sdk requested a review from a team as a code owner January 28, 2026 19:05
@azure-sdk azure-sdk added EngSys This issue is impacting the engineering system. Central-EngSys This issue is owned by the Engineering System team. labels Jan 28, 2026
Copy link
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

This PR syncs the eng/common infrastructure with updates from azure-sdk-tools PR 13750, switching release-plan completion handling to use the azsdk CLI and wiring in a reusable installer template.

Changes:

  • Update Mark-ReleasePlanCompletion.ps1 to call the azsdk CLI to mark release status, removing direct DevOps work item helper usage and adding validation for the CLI path.
  • Extend the mark-release-completion pipeline template to install the azsdk CLI via a new install-azsdk-cli.yml step and pass its path into the script.
  • Introduce install-azsdk-cli.yml, a shared template that installs the Azure SDK tools CLI using the azure-sdk-mcp.ps1 helper.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
eng/common/scripts/Mark-ReleasePlanCompletion.ps1 Switches release-plan status updates to use the azsdk CLI and adds parameterization/validation for the CLI path.
eng/common/pipelines/templates/steps/mark-release-completion.yml Ensures the azsdk CLI is installed before running the release completion script and passes the CLI path into it.
eng/common/pipelines/templates/steps/install-azsdk-cli.yml Provides a reusable pipeline step to install the azsdk CLI via the MCP installer script.

scriptPath: ${{ parameters.SourceRootPath }}/eng/common/scripts/Mark-ReleasePlanCompletion.ps1
arguments: -PackageInfoFilePath '${{ parameters.ConfigFileDir }}/${{ parameters.PackageArtifactName }}.json'
arguments: >
-PackageInfoFilePath '${{ parameters.ConfigFileDir }}/${{ parameters.PackageArtifactName }}.json' -AzsdkExePath '$(Agent.TempDirectory)/azsdk'
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

The -AzsdkExePath '$(Agent.TempDirectory)/azsdk' argument assumes the CLI executable is named azsdk without an extension, but on Windows the installer script (azure-sdk-mcp.ps1 via AzSdkTool-Helpers.ps1) produces azsdk.exe. If this template is ever run on a Windows agent, the path passed to Mark-ReleasePlanCompletion.ps1 will not exist, causing its initial Test-Path check to fail and the step to error even though the tool is installed. To make this robust, either adjust the path to include the .exe suffix on Windows or update the script to handle extension normalization so the same template can run cross-platform.

Suggested change
-PackageInfoFilePath '${{ parameters.ConfigFileDir }}/${{ parameters.PackageArtifactName }}.json' -AzsdkExePath '$(Agent.TempDirectory)/azsdk'
-PackageInfoFilePath '${{ parameters.ConfigFileDir }}/${{ parameters.PackageArtifactName }}.json' -AzsdkExePath '$(Agent.TempDirectory)/azsdk${{ if eq(variables['Agent.OS'], 'Windows_NT') }}.exe${{ end }}'

Copilot uses AI. Check for mistakes.
Comment on lines +25 to +30
#Validate azsdk executable path
if (-Not (Test-Path $AzsdkExePath))
{
Write-Error "The azsdk executable was not found at path '$AzsdkExePath'. Please ensure the executable exists and the path is correct."
exit 1
}
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

On Windows agents, azure-sdk-mcp.ps1 installs the CLI as azsdk.exe (see Helpers/AzSdkTool-Helpers.ps1 where the Windows executable is $Package.exe), but this script expects -AzsdkExePath to point to a path without an extension and then validates it with Test-Path. If the pipeline passes a value like $(Agent.TempDirectory)/azsdk (as in the updated template), Test-Path will fail on Windows even though azsdk.exe exists, causing the script to error out unnecessarily. Consider normalizing the path here (e.g., appending .exe on Windows when the extension is missing) so the script works consistently across platforms.

Copilot uses AI. Check for mistakes.
@azure-sdk azure-sdk force-pushed the sync-eng/common-update_release_using_cli-13750 branch from d9248dc to ac60d35 Compare January 28, 2026 20:31
@azure-sdk azure-sdk force-pushed the sync-eng/common-update_release_using_cli-13750 branch from ac60d35 to 97ec799 Compare January 28, 2026 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Central-EngSys This issue is owned by the Engineering System team. EngSys This issue is impacting the engineering system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants