-
Notifications
You must be signed in to change notification settings - Fork 1.4k
{CI} Add status check for extension release pipeline #9183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
️✔️Azure CLI Extensions Breaking Change Test
|
Hi @wangzelin007, |
Thank you for your contribution! We will review the pull request and get back to you soon. |
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). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
|
Remove scripts/ci/find_extension_upgraded.py, as release-related scripts should reside in the same repository as the release pipeline. |
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
BUILD_JSON=$(az pipelines build show \ | ||
--id $BUILD_ID \ | ||
--organization ${{ env.ado-org }} \ | ||
--project ${{ env.ado-project }} \ | ||
--output json) |
There was a problem hiding this comment.
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.
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.
🔄 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
azdev style <YOUR_EXT>
locally? (pip install azdev
required)python scripts/ci/test_index.py -q
locally? (pip install wheel==0.30.0
required)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
.