Skip to content

[acrcssc] Enhance support for split ACR tasks SDK and legacy compatibility - #10344

Open
Cesar Gray (cegraybl) wants to merge 4 commits into
Azure:mainfrom
AzureCR:cegraybl/cssc_deprecated_logger
Open

Cesar Gray (cegraybl) wants to merge 4 commits into
Azure:mainfrom
AzureCR:cegraybl/cssc_deprecated_logger

Conversation

@cegraybl

@cegraybl Cesar Gray (cegraybl) commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ️✔️ All clear

Breaking Changes
️✔️ None

Fixes acrcssc compatibility with recent Azure CLI versions and the split Azure Container Registry Tasks SDK.

The extension could fail when managing supply-chain workflows because 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

  • Use the dedicated ACR Tasks client and models when available, with fallback support for older Azure CLI versions.
  • Support both current synchronous task operations and legacy operations.
  • Use the correct task-run values field for each SDK generation.
  • Wait for legacy long-running update, delete, scheduling, and cancellation operations to complete.
  • Add compatibility tests covering current and legacy ACR Tasks SDK behavior.
  • Update the extension version and release history to 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 workflow

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 azdev 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.

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
Copilot AI lite review requested due to automatic review settings September 15, 2026 23:42
@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi Cesar Gray (@cegraybl),
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 pyproject.toml (or setup.py, if the extension has not migrated yet) as well.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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_run path, but the compatibility tests only exercise scheduling through begin_schedule_run; the current dry-run/trigger path is not invoked with a synchronous client. Add a focused test for _trigger_task_run or acr_cssc_dry_run that asserts the direct result's run_id is consumed and no LongRunningOperation is 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.

Comment thread src/acrcssc/azext_acrcssc/_client_factory.py Outdated
@yonzhan

Copy link
Copy Markdown
Collaborator

acrcssc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants