Skip to content

Conversation

wangzelin007
Copy link
Member

@wangzelin007 wangzelin007 commented Sep 19, 2025


This PR adds a status check to the Azure CLI extension release pipeline.
If a release fails, we’ll be able to quickly locate the failing commit directly from the GitHub Actions UI.
image

🔄 Azure CLI Extension Release Workflow

Triggering the Github Action Workflow
A commit to the main branch of the azure-cli-extensions repository automatically triggers the Extension Release GitHub Action.

Trigger the ADO Release Pipeline
The GitHub Action then trigger the Azure DevOps (ADO) release pipeline via a service principle azure-cli-release-2024 by Federated credential scenario: Github Action deploying Azure Resources
, and continuously monitors the release status.

Extension Type Detection
The release pipeline determines the type of extension:
For internal extensions, it compares versions in setup.py.
For external extensions, it compares entries in index.json.

Internal Extension Release
If the extension is internal:
The pipeline builds the extension wheel package.
Uploads the wheel package to the AME storage account.
Automatically commits an update to index.json.
Automatically add a comment on the pull request.
Automatically create github releases and tags

External Extension Release
If the extension is external:
The pipeline downloads the wheel package from the index.json downloadUrl.
Uploads it to the AME storage account.
Updates the AME index.json.

This process ensures that both internal and external extensions are consistently distributed from the centralized AME storage account.

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

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

Copy link

azure-client-tools-bot-prd bot commented Sep 19, 2025

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

Copy link

Hi @wangzelin007,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@yonzhan
Copy link
Collaborator

yonzhan commented Sep 19, 2025

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

Copy link

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

@wangzelin007
Copy link
Member Author

Remove scripts/ci/find_extension_upgraded.py, as release-related scripts should reside in the same repository as the release pipeline.

@wangzelin007 wangzelin007 marked this pull request as ready for review September 24, 2025 07:33
@Copilot Copilot AI review requested due to automatic review settings September 24, 2025 07:33
Copy link
Contributor

@Copilot 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 adds status monitoring to the Azure CLI extension release pipeline by modifying the GitHub Actions workflow to wait for and track the completion status of the Azure DevOps pipeline. The changes transform a simple fire-and-forget trigger into a comprehensive status check that provides immediate feedback on release pipeline failures.

Key changes:

  • Enhanced the GitHub Actions workflow to monitor ADO pipeline completion status
  • Updated job and step names to be more descriptive
  • Standardized polling intervals across test and production workflows

Reviewed Changes

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

File Description
scripts/ci/find_extension_upgraded.py Removed entire file (141 lines deleted)
.github/workflows/TriggerExtensionRelease.yml Enhanced with pipeline monitoring logic and status checking
.github/workflows/TestTriggerExtensionRelease.yml Updated job names and standardized polling interval to 60 seconds

# Wait for the build to complete
echo "Waiting for build $BUILD_ID to complete..."
while true; do
Copy link
Preview

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

The infinite while loop lacks a timeout mechanism. Consider adding a maximum wait time or iteration limit to prevent the workflow from running indefinitely if the ADO pipeline becomes stuck or unresponsive.

Copilot uses AI. Check for mistakes.

Comment on lines +58 to +62
BUILD_JSON=$(az pipelines build show \
--id $BUILD_ID \
--organization ${{ env.ado-org }} \
--project ${{ env.ado-project }} \
--output json)
Copy link
Preview

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

The Azure CLI command lacks error handling. If the API call fails (network issues, authentication problems, etc.), the script will continue with potentially invalid JSON, leading to unexpected behavior in subsequent jq operations.

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
Auto-Assign Auto assign by bot CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants