[acrcssc] Enhance support for split ACR tasks SDK and legacy compatibility - #10344
Cesar Gray (cegraybl) wants to merge 4 commits into
Conversation
fix: support split ACR tasks SDK Copilot-Session: a4f5e94e-df29-4504-b784-0477f1067512
Use synchronous operation names from the split ACR tasks SDK while retaining legacy begin_* compatibility and waiting for legacy pollers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f0ccdfbb-37f1-4ea4-96ae-5de9168b489e
Select values_property for the split ACR tasks SDK and retain values for the legacy model. Keep the combined compatibility release at 1.0.0b8. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f0ccdfbb-37f1-4ea4-96ae-5de9168b489e
|
Hi Cesar Gray (@cegraybl), |
There was a problem hiding this comment.
🟡 Changes recommended
Align legacy fallback model resolution with its client API version and add synchronous scheduling coverage.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Updates acrcssc for split ACR Tasks SDK support while preserving legacy Azure CLI compatibility.
Changes:
- Adds compatible task clients, models, and operation handling.
- Supports synchronous and legacy long-running operations.
- Adds compatibility tests and bumps version to
1.0.0b8.
File summaries
| File | Summary |
|---|---|
src/acrcssc/setup.py |
Updates version and wheel handling. |
src/acrcssc/HISTORY.rst |
Adds release notes. |
src/acrcssc/azext_acrcssc/tests/latest/test_task_operation_compatibility.py |
Tests current and legacy task operations. |
src/acrcssc/azext_acrcssc/tests/latest/test_helper_taskoperations.py |
Updates dry-run compatibility tests. |
src/acrcssc/azext_acrcssc/tests/latest/test_cssc_scenario.py |
Adds dry-run scenario coverage. |
src/acrcssc/azext_acrcssc/tests/latest/test_client_factory.py |
Tests client and model selection. |
src/acrcssc/azext_acrcssc/helper/_taskoperations.py |
Adapts task operations across SDK versions. |
src/acrcssc/azext_acrcssc/_client_factory.py |
Selects split or legacy ACR Tasks clients. |
Review details
Suppressed comments (1)
src/acrcssc/azext_acrcssc/helper/_taskoperations.py:449
- This adds the current synchronous
schedule_runpath, but the compatibility tests only exercise scheduling throughbegin_schedule_run; the current dry-run/trigger path is not invoked with a synchronous client. Add a focused test for_trigger_task_runoracr_cssc_dry_runthat asserts the direct result'srun_idis consumed and noLongRunningOperationis used.
schedule_run, is_long_running = _get_task_operation(
acr_task_registries_client,
"schedule_run")
queued_run = schedule_run(
resource_group,
registry.name,
request)
if is_long_running:
queued_run = LongRunningOperation(cmd.cli_ctx)(queued_run)
- Files reviewed: 8/8 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
acrcssc |
…DK path still uses get_sdk()
🤖 PR Validation — ️✔️ All clear
Fixes
acrcssccompatibility with recent Azure CLI versions and the split Azure Container Registry Tasks SDK.The extension could fail when managing
supply-chain workflowsbecause it accessed task operations through the general Container Registry client and used legacy SDK method and model names. This resulted in errors such as missing attributes and unsupported arguments when creating a task run request.Changes
1.0.0b8.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 azdevrequired)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.