-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[acrcssc] Fix continuous patching tasks to handle registries with DNL enabled #9524
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
|
|
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>
|
|
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 fixes an issue where continuous patching tasks fail when working with Azure Container Registry instances that have Domain Name Label (DNL) enabled. DNL registries return login server names with hash suffixes (e.g., registry-hash) instead of the base registry name, causing subsequent Azure CLI commands to fail. The fix adds logic to detect and extract the base registry name from DNL-formatted names.
Changes:
- Added DNL registry name detection and extraction logic in task YAML templates
- Updated cssc container image tag from cbcf692 to 7260211 across all templates
- Incremented extension version from 1.0.0b5 to 1.0.0b6
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/acrcssc/setup.py | Version bump to 1.0.0b6 for the bug fix release |
| src/acrcssc/HISTORY.rst | Added changelog entry documenting the DNL registry fix |
| src/acrcssc/azext_acrcssc/templates/tmp_dry_run_template.yaml | Updated cssc container image tag |
| src/acrcssc/azext_acrcssc/templates/task/cssc_trigger_workflow.yaml | Added DNL detection logic and updated cssc image tag; bash script formatting cleaned up |
| src/acrcssc/azext_acrcssc/templates/task/cssc_scan_image.yaml | Added DNL detection logic and updated cssc image tag |
| src/acrcssc/azext_acrcssc/templates/task/cssc_patch_image.yaml | Updated cssc container image tag |
|
LGTM |
|
@zhoxing-ms PR is ready. Please review when you have the chance. Thanks. |
Fix for #9512
Task's run variables only return the registry's DNL name (login server name) and not the resource name. This causes the following calls to cli using the registry name to fail as they are using the registry's login server name.
This change checks for the naming convention and retrieves the part that is only the resource name without the added hash.
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az acr supply-chain workflowGeneral Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)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.jsonautomatically.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.