Skip to content

[ACR] Fix Azure/azure-cli#33698: az acr login: Fix ARM token exchange fallback for AzureML MSI/SSO - #33699

Open
Aditya Pujara (a0x1ab) with Copilot wants to merge 20 commits into
devfrom
copilot/fix-az-acr-login-regression
Open

[ACR] Fix Azure/azure-cli#33698: az acr login: Fix ARM token exchange fallback for AzureML MSI/SSO#33699
Aditya Pujara (a0x1ab) with Copilot wants to merge 20 commits into
devfrom
copilot/fix-az-acr-login-regression

Conversation

Copilot AI commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Related command
az acr login

Description

In AzureML Compute Instance environments using az login --identity (MSI/SSO), az acr login fails because acquiring an AAD token scoped to https://containerregistry.azure.net returns an SSO error. ACR's /oauth2/exchange endpoint accepts ARM management tokens (https://management.azure.com/) equally well, and that token is available in these environments — this path worked in 2.81.0.

The regression was introduced in #31798, which removed the conditional ARM-token fallback and hardcoded the ACR audience as the only option.

Fix: In _get_aad_token_after_challenge, catch CLIError from profile.get_raw_token(resource=<acr-scope>) and retry with no resource (ARM management endpoint). The ACR-specific audience is still preferred; ARM is only used when the scoped request fails.

# Before: always used ACR audience — breaks MSI/SSO environments
creds, _, tenant = profile.get_raw_token(subscription=..., resource=scope)

# After: falls back to ARM token if ACR audience acquisition fails
try:
    creds, _, tenant = profile.get_raw_token(subscription=..., resource=scope)
except CLIError as e:
    logger.debug("Failed to get AAD token for ACR scope '%s' (%s). "
                 "Falling back to ARM management token.", scope, str(e))
    creds, _, tenant = profile.get_raw_token(subscription=...)

Testing Guide

On an AzureML Compute Instance with MSI login:

az login --identity
az acr login -n $ACR            # previously failed with SSO error; now succeeds
az acr login -n $ACR --expose-token  # also succeeds

Unit test test_get_docker_credentials_arm_token_fallback added: mocks get_raw_token to raise CLIError on the ACR-scope call and verifies login succeeds via the ARM fallback.

History Notes

[ACR] az acr login: Fix ARM token exchange fallback for AzureML MSI/SSO environments


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

@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented Jul 3, 2026

Copy link
Copy Markdown
️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.14
️✔️acs
️✔️latest
️✔️3.12
️✔️3.14
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.14
️✔️ams
️✔️latest
️✔️3.12
️✔️3.14
️✔️apim
️✔️latest
️✔️3.12
️✔️3.14
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.14
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.14
️✔️aro
️✔️latest
️✔️3.12
️✔️3.14
️✔️backup
️✔️latest
️✔️3.12
️✔️3.14
️✔️batch
️✔️latest
️✔️3.12
️✔️3.14
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.14
️✔️billing
️✔️latest
️✔️3.12
️✔️3.14
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.14
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.14
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.14
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.14
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.14
️✔️config
️✔️latest
️✔️3.12
️✔️3.14
️✔️configure
️✔️latest
️✔️3.12
️✔️3.14
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.14
️✔️container
️✔️latest
️✔️3.12
️✔️3.14
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.14
️✔️core
️✔️latest
️✔️3.12
️✔️3.14
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.14
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.14
️✔️dls
️✔️latest
️✔️3.12
️✔️3.14
️✔️dms
️✔️latest
️✔️3.12
️✔️3.14
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.14
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.14
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.14
️✔️find
️✔️latest
️✔️3.12
️✔️3.14
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.14
️✔️identity
️✔️latest
️✔️3.12
️✔️3.14
️✔️iot
️✔️latest
️✔️3.12
️✔️3.14
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.14
️✔️lab
️✔️latest
️✔️3.12
️✔️3.14
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.14
️✔️maps
️✔️latest
️✔️3.12
️✔️3.14
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.14
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.14
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.14
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.14
️✔️network
️✔️latest
️✔️3.12
️✔️3.14
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.14
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.14
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.14
️✔️profile
️✔️latest
️✔️3.12
️✔️3.14
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.14
️✔️redis
️✔️latest
️✔️3.12
️✔️3.14
️✔️relay
️✔️latest
️✔️3.12
️✔️3.14
️✔️resource
️✔️latest
️✔️3.12
️✔️3.14
️✔️role
️✔️latest
️✔️3.12
️✔️3.14
️✔️search
️✔️latest
️✔️3.12
️✔️3.14
️✔️security
️✔️latest
️✔️3.12
️✔️3.14
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.14
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.14
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.14
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.14
️✔️sql
️✔️latest
️✔️3.12
️✔️3.14
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.14
️✔️storage
️✔️latest
️✔️3.12
️✔️3.14
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.14
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.14
️✔️util
️✔️latest
️✔️3.12
️✔️3.14
️✔️vm
️✔️latest
️✔️3.12
️✔️3.14

@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented Jul 3, 2026

Copy link
Copy Markdown
️✔️AzureCLI-BreakingChangeTest
️✔️Non Breaking Changes

Copilot AI changed the title [WIP] Fix az acr login regression in Azure CLI 2.87.0 [ACR] Fix Azure/azure-cli#33698: az acr login: Fix ARM token exchange fallback for AzureML MSI/SSO Jul 3, 2026

@a0x1ab Aditya Pujara (a0x1ab) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

CI Review — PR #33699

Live test (Tester): No changed test files were detected in this PR (tests/**/test_*.py), so the azdev test --live step had nothing to run. This is informational only — not a blocker.

CI failure — action required:

Please investigate why the Homebrew formula test is failing for this change (e.g. formula/checksum generation, packaging metadata, or a dependency pinned incorrectly) and push a fix. Note the companion Build Homebrew Formula step succeeded, so the regression is specific to the formula test step — check the linked Azure DevOps build log for the exact assertion/error before making changes.

All other completed checks are currently passing (71/72 completed checks green); several packaging checks are still in progress and will be re-evaluated on the next pass.


Posted by agent-assist (autonomous bug-fix pipeline).

@a0x1ab

Copy link
Copy Markdown
Member

Copilot the automated CI and live-test review on this PR found failures. Please look into the requested changes here: #33699 (review) and push a fix.


Posted by agent-assist (autonomous bug-fix pipeline).

Copilot AI commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Copilot the automated CI and live-test review on this PR found failures. Please look into the requested changes here: #33699 (review) and pu...

Investigated the Test Homebrew Formula failure. Summary of findings:

Root cause analysis:

  • My code changes are confined to src/azure-cli/azure/cli/command_modules/acr/_docker_utils.py (adding a try/except for ARM token fallback) and a new unit test file. Neither affects formula generation, packaging, checksums, or the az self-test command loading path.
  • az self-test (which loads all CLI commands and help text) passes locally with no errors related to my changes.
  • All 27 ACR unit tests pass.

What I found:

  • The TestHomebrewFormula job uses Python 3.14 (python_version=3.14). There is a pre-existing SyntaxWarning: invalid escape sequence '\C' in src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/network_watcher/packet_capture/_create.py line 21 (a Windows path C:\Captures\testByCli.cap in a docstring). In Python 3.14, invalid escape sequences in strings became SyntaxErrors, which would cause az self-test to fail when loading the network module. This is unrelated to my ACR changes.

Fix pushed: Added the HISTORY.rst changelog entry for this PR (commit Add HISTORY.rst entry for ARM token fallback fix), which also resolves the azdev linter action_required flag.

@a0x1ab

Copy link
Copy Markdown
Member

❌ Redaction disputed by Aditya Pujara (@a0x1ab).

Automation is paused for maintainer review. Agent Assist will not restore the suspected value because doing so would publish it again. A maintainer can replace the placeholder with confirmed non-sensitive text after review.


Posted by agent-assist (autonomous bug-fix pipeline).

@x-engineering-agent

Copy link
Copy Markdown
Contributor

❌ Redaction disputed by Aditya Pujara (@a0x1ab).

Automation is paused for maintainer review. Agent Assist will not restore the suspected value because doing so would publish it again. A maintainer can replace the placeholder with confirmed non-sensitive text after review.


Posted by agent-assist (autonomous bug-fix pipeline).

@x-engineering-agent

Copy link
Copy Markdown
Contributor

Automated sensitive-information remediation ran on this pull request.

  • Detected categories: credential
  • Replaced with typed [REDACTED:category] placeholders in: changed files: src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py
  • Could not edit: none
  • Comment/review owners notified because Agent Assist cannot edit another user's text: none

If a credential was exposed, rotate or revoke it immediately. Detected values are never copied into this comment.

✅ Keep the redaction · ❌ Dispute the redaction

GitHub only supports a fixed reaction set, so 👍 represents ✅ and 👎 represents ❌. The bot-created reactions are only poll choices.


Posted by agent-assist (autonomous bug-fix pipeline).

@x-engineering-agent

Copy link
Copy Markdown
Contributor

Live test results — azdev test --live --series (changed test files only)

⚠️ NO TESTS SELECTED — changed test files did not resolve to runnable tests

Selectors: test_acr_commands_mock (module)
PR head ref: copilot/fix-az-acr-login-regression
PR head sha: 8cf908b9932cac2316d882892af8ce10a1155857
PR base ref: dev
New test files in PR: false

Changed test files run
src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py

Workflow run: https://github.com/Azure/issue-sentinel/actions/runs/31083765710

Last 80 lines of azdev output

=============
| Run Tests |
=============


=====================
| Discovering Tests |
=====================

/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:18: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_compute': '\{"providers":\["Microsoft.Compute"\]\}',
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:19: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_empty': '\{"providers":\[\]\}'
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13533: SyntaxWarning: invalid escape sequence '\]'
  self.cmd('vmss application set -g {rg} -n {vmss} --app-version-ids {vid1} {vid2} --enable-automatic-upgrade True\]', checks=[
ERROR: unmatched ')' (test_acr_commands_mock.py, line 1319)
Traceback (most recent call last):
  File "/home/runner/work/issue-sentinel/issue-sentinel/.venv/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/issue-sentinel/issue-sentinel/.venv/lib/python3.12/site-packages/knack/invocation.py", line 224, in execute
    cmd_result = parsed_args.func(params)
                 ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/issue-sentinel/issue-sentinel/.venv/lib/python3.12/site-packages/knack/commands.py", line 149, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/issue-sentinel/issue-sentinel/.venv/lib/python3.12/site-packages/knack/commands.py", line 256, in _command_handler
    result = op(client, **command_args) if client else op(**command_args)
                                                       ^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/issue-sentinel/issue-sentinel/.venv/lib/python3.12/site-packages/azdev/operations/testtool/__init__.py", line 58, in run_tests
    test_index = _get_test_index(profile or current_profile(), discover, target_tests=target_tests)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/issue-sentinel/issue-sentinel/.venv/lib/python3.12/site-packages/azdev/operations/testtool/__init__.py", line 327, in _get_test_index
    test_index = _discover_tests(profile, target_tests)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/issue-sentinel/issue-sentinel/.venv/lib/python3.12/site-packages/azdev/operations/testtool/__init__.py", line 243, in _discover_tests
    tests = _discover_module_tests(mod_name, mod_data)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/issue-sentinel/issue-sentinel/.venv/lib/python3.12/site-packages/azdev/operations/testtool/__init__.py", line 177, in _discover_module_tests
    module = import_module(test_file_path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1133, in get_code
  File "<frozen importlib._bootstrap_external>", line 1063, in source_to_code
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py", line 1319
    login_server, username, [REDACTED:credential], test_registry)
                                                                ^
SyntaxError: unmatched ')'

Posted by agent-assist live-test workflow.

@yonzhan

Copy link
Copy Markdown
Collaborator

ACR

@x-engineering-agent x-engineering-agent Bot 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.

❌ Automated fix attempts exhausted

After 5 automated Copilot attempts, this PR still has 38 failing checks.

Failed checks (38 unique):

  • Azure.azure-cli
  • Azure.azure-cli (Test Deb Packages Bookworm AMD64)
  • Azure.azure-cli (Test Deb Packages Bookworm ARM64)
  • Azure.azure-cli (Test Deb Packages Bullseye AMD64)
  • Azure.azure-cli (Test Deb Packages Bullseye ARM64)
  • Azure.azure-cli (Test Deb Packages Jammy AMD64)
  • Azure.azure-cli (Test Deb Packages Jammy ARM64)
  • Azure.azure-cli (Test Deb Packages Noble AMD64)
  • Azure.azure-cli (Test Deb Packages Noble ARM64)
  • Azure.azure-cli (Test Rpm Package Azure Linux 3.0 AMD64)
  • Azure.azure-cli (Test Rpm Package Azure Linux 3.0 ARM64)
  • Azure.azure-cli (Test Rpm Package Red Hat Universal Base Image 10 AMD64)
  • Azure.azure-cli (Test Rpm Package Red Hat Universal Base Image 10 ARM64)
  • Azure.azure-cli (Test Rpm Package Red Hat Universal Base Image 8 AMD64)
  • Azure.azure-cli (Test Rpm Package Red Hat Universal Base Image 8 ARM64)
  • Azure.azure-cli (Test Rpm Package Red Hat Universal Base Image 9 AMD64)
  • Azure.azure-cli (Test Rpm Package Red Hat Universal Base Image 9 ARM64)
  • Azure.azure-cli (Unit Test for Core Python312)
  • Azure.azure-cli (Unit Test for Core Python314)
  • Azure.azure-cli (Unit Test for Telemetry Python312)
  • Azure.azure-cli (Unit Test for Telemetry Python314)
  • Azure.azure-cli Full Test
  • Azure.azure-cli Full Test (Automation Full Test Python312 Profile Latest instance1)
  • Azure.azure-cli Full Test (Automation Full Test Python312 Profile Latest instance2)
  • Azure.azure-cli Full Test (Automation Full Test Python312 Profile Latest instance3)
  • Azure.azure-cli Full Test (Automation Full Test Python312 Profile Latest instance4)
  • Azure.azure-cli Full Test (Automation Full Test Python312 Profile Latest instance5)
  • Azure.azure-cli Full Test (Automation Full Test Python312 Profile Latest instance6)
  • Azure.azure-cli Full Test (Automation Full Test Python312 Profile Latest instance7)
  • Azure.azure-cli Full Test (Automation Full Test Python312 Profile Latest instance8)
  • Azure.azure-cli Full Test (Automation Full Test Python314 Profile Latest instance1)
  • Azure.azure-cli Full Test (Automation Full Test Python314 Profile Latest instance2)
  • Azure.azure-cli Full Test (Automation Full Test Python314 Profile Latest instance3)
  • Azure.azure-cli Full Test (Automation Full Test Python314 Profile Latest instance4)
  • Azure.azure-cli Full Test (Automation Full Test Python314 Profile Latest instance5)
  • Azure.azure-cli Full Test (Automation Full Test Python314 Profile Latest instance6)
  • Azure.azure-cli Full Test (Automation Full Test Python314 Profile Latest instance7)
  • Azure.azure-cli Full Test (Automation Full Test Python314 Profile Latest instance8)

The automated fixer has reached its attempt cap. Handing off to human review — please investigate the remaining failures and continue manually.


Posted by agent-assist (autonomous bug-fix pipeline).

Aditya Pujara (a0x1ab) and others added 2 commits August 12, 2026 18:34
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 70d2f3ed-f690-43db-bd50-a88351a6f3f9
@x-engineering-agent

Copy link
Copy Markdown
Contributor

Automated sensitive-information remediation ran on this pull request.

  • Detected categories: credential
  • Replaced with typed [REDACTED:category] placeholders in: changed files: src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py
  • Could not edit: none
  • Comment/review owners notified because Agent Assist cannot edit another user's text: none

If a credential was exposed, rotate or revoke it immediately. Detected values are never copied into this comment.

✅ Keep the redaction · ❌ Dispute the redaction

GitHub only supports a fixed reaction set, so 👍 represents ✅ and 👎 represents ❌. The bot-created reactions are only poll choices.


Posted by agent-assist (autonomous bug-fix pipeline).

@x-engineering-agent

Copy link
Copy Markdown
Contributor

Live test results — azdev test --live --series (changed test files only)

⚠️ NO TESTS SELECTED — changed test files did not resolve to runnable tests

Selectors: test_acr_commands_mock (module)
PR head ref: copilot/fix-az-acr-login-regression
PR head sha: 434192bcc82ffc30bc76f737aaf21a9c6217f82d
PR base ref: dev
New test files in PR: false

Changed test files run
src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py

Workflow run: https://github.com/Azure/issue-sentinel/actions/runs/31582484440

Last 80 lines of azdev output

=============
| Run Tests |
=============


=====================
| Discovering Tests |
=====================

/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:18: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_compute': '\{"providers":\["Microsoft.Compute"\]\}',
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:19: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_empty': '\{"providers":\[\]\}'
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13533: SyntaxWarning: invalid escape sequence '\]'
  self.cmd('vmss application set -g {rg} -n {vmss} --app-version-ids {vid1} {vid2} --enable-automatic-upgrade True\]', checks=[
ERROR: unmatched ')' (test_acr_commands_mock.py, line 1319)
Traceback (most recent call last):
  File "/home/runner/work/issue-sentinel/issue-sentinel/.venv/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/issue-sentinel/issue-sentinel/.venv/lib/python3.12/site-packages/knack/invocation.py", line 224, in execute
    cmd_result = parsed_args.func(params)
                 ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/issue-sentinel/issue-sentinel/.venv/lib/python3.12/site-packages/knack/commands.py", line 149, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/issue-sentinel/issue-sentinel/.venv/lib/python3.12/site-packages/knack/commands.py", line 256, in _command_handler
    result = op(client, **command_args) if client else op(**command_args)
                                                       ^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/issue-sentinel/issue-sentinel/.venv/lib/python3.12/site-packages/azdev/operations/testtool/__init__.py", line 58, in run_tests
    test_index = _get_test_index(profile or current_profile(), discover, target_tests=target_tests)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/issue-sentinel/issue-sentinel/.venv/lib/python3.12/site-packages/azdev/operations/testtool/__init__.py", line 327, in _get_test_index
    test_index = _discover_tests(profile, target_tests)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/issue-sentinel/issue-sentinel/.venv/lib/python3.12/site-packages/azdev/operations/testtool/__init__.py", line 243, in _discover_tests
    tests = _discover_module_tests(mod_name, mod_data)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/issue-sentinel/issue-sentinel/.venv/lib/python3.12/site-packages/azdev/operations/testtool/__init__.py", line 177, in _discover_module_tests
    module = import_module(test_file_path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1133, in get_code
  File "<frozen importlib._bootstrap_external>", line 1063, in source_to_code
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py", line 1319
    login_server, username, [REDACTED:credential], test_registry)
                                                                ^
SyntaxError: unmatched ')'

Posted by agent-assist live-test workflow.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 70d2f3ed-f690-43db-bd50-a88351a6f3f9
@x-engineering-agent

Copy link
Copy Markdown
Contributor

Live test results — azdev test --live --series (changed test files only)

PASS

Selectors: test_acr_commands_mock (module)
PR head ref: copilot/fix-az-acr-login-regression
PR head sha: 41c4885738d97f88a2b96083285c0b558d3f039f
PR base ref: dev
New test files in PR: false

Changed test files run
src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py

Workflow run: https://github.com/Azure/issue-sentinel/actions/runs/31584804075

Last 80 lines of azdev output

=============
| Run Tests |
=============


=====================
| Discovering Tests |
=====================

/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:18: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_compute': '\{"providers":\["Microsoft.Compute"\]\}',
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:19: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_empty': '\{"providers":\[\]\}'
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13533: SyntaxWarning: invalid escape sequence '\]'
  self.cmd('vmss application set -g {rg} -n {vmss} --app-version-ids {vid1} {vid2} --enable-automatic-upgrade True\]', checks=[

test index updated: /home/runner/.azdev/env_config/home/runner/work/issue-sentinel/issue-sentinel/.venv/test_index/latest.json

Test on modules: test_acr_commands_mock

WARNING: RUNNING TESTS LIVE
The tests are set to run against current profile "latest"
============================= test session starts ==============================
platform linux -- Python 3.12.13, pytest-9.1.1, pluggy-1.6.0 -- /home/runner/work/issue-sentinel/issue-sentinel/.venv/bin/python
cachedir: .pytest_cache
rootdir: /home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli
plugins: xdist-3.8.0, forked-1.7.5
collecting ... collected 27 items

azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_get_docker_credentials PASSED [  3%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_get_docker_credentials_arm_token_fallback PASSED [  7%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_helm_delete PASSED [ 11%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_helm_list PASSED [ 14%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_helm_push PASSED [ 18%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_helm_show PASSED [ 22%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_delete PASSED [ 25%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_deleted_list PASSED [ 29%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_deleted_restore PASSED [ 33%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_deleted_tags_list PASSED [ 37%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_list PASSED [ 40%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_list_referrers PASSED [ 44%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_metadata_list PASSED [ 48%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_metadata_show PASSED [ 51%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_metadata_update PASSED [ 55%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_show PASSED [ 59%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_delete PASSED [ 62%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_list PASSED [ 66%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_list_deleted PASSED [ 70%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_show PASSED [ 74%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_show_manifests PASSED [ 77%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_show_tags PASSED [ 81%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_update PASSED [ 85%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::ResolveAcrScopeTests::test_config_exception_falls_back_to_default PASSED [ 88%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::ResolveAcrScopeTests::test_default_when_unset PASSED [ 92%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::ResolveAcrScopeTests::test_full_url_is_used_verbatim PASSED [ 96%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::ResolveAcrScopeTests::test_short_name_is_expanded PASSED [100%]

- generated xml file: /home/runner/work/issue-sentinel/issue-sentinel/test-output/results.xml -
============================== 27 passed in 0.99s ==============================

Posted by agent-assist live-test workflow.

@x-engineering-agent

Copy link
Copy Markdown
Contributor

Live test results — azdev test --live --series (changed test files only)

PASS

Selectors: test_acr_commands_mock (module)
PR head ref: copilot/fix-az-acr-login-regression
PR head sha: 2231647ceac5bf90d2a591fd1dac57d89e770542
PR base ref: dev
New test files in PR: false

Changed test files run
src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py

Workflow run: https://github.com/Azure/issue-sentinel/actions/runs/31587413862

Last 80 lines of azdev output

=============
| Run Tests |
=============


=====================
| Discovering Tests |
=====================

/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:18: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_compute': '\{"providers":\["Microsoft.Compute"\]\}',
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:19: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_empty': '\{"providers":\[\]\}'
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13551: SyntaxWarning: invalid escape sequence '\]'
  self.cmd('vmss application set -g {rg} -n {vmss} --app-version-ids {vid1} {vid2} --enable-automatic-upgrade True\]', checks=[

test index updated: /home/runner/.azdev/env_config/home/runner/work/issue-sentinel/issue-sentinel/.venv/test_index/latest.json

Test on modules: test_acr_commands_mock

WARNING: RUNNING TESTS LIVE
The tests are set to run against current profile "latest"
============================= test session starts ==============================
platform linux -- Python 3.12.13, pytest-9.1.1, pluggy-1.6.0 -- /home/runner/work/issue-sentinel/issue-sentinel/.venv/bin/python
cachedir: .pytest_cache
rootdir: /home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli
plugins: xdist-3.8.0, forked-1.7.5
collecting ... collected 27 items

azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_get_docker_credentials PASSED [  3%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_get_docker_credentials_arm_token_fallback PASSED [  7%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_helm_delete PASSED [ 11%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_helm_list PASSED [ 14%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_helm_push PASSED [ 18%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_helm_show PASSED [ 22%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_delete PASSED [ 25%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_deleted_list PASSED [ 29%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_deleted_restore PASSED [ 33%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_deleted_tags_list PASSED [ 37%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_list PASSED [ 40%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_list_referrers PASSED [ 44%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_metadata_list PASSED [ 48%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_metadata_show PASSED [ 51%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_metadata_update PASSED [ 55%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_show PASSED [ 59%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_delete PASSED [ 62%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_list PASSED [ 66%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_list_deleted PASSED [ 70%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_show PASSED [ 74%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_show_manifests PASSED [ 77%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_show_tags PASSED [ 81%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_update PASSED [ 85%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::ResolveAcrScopeTests::test_config_exception_falls_back_to_default PASSED [ 88%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::ResolveAcrScopeTests::test_default_when_unset PASSED [ 92%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::ResolveAcrScopeTests::test_full_url_is_used_verbatim PASSED [ 96%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::ResolveAcrScopeTests::test_short_name_is_expanded PASSED [100%]

- generated xml file: /home/runner/work/issue-sentinel/issue-sentinel/test-output/results.xml -
============================== 27 passed in 0.78s ==============================

Posted by agent-assist live-test workflow.

@x-engineering-agent

Copy link
Copy Markdown
Contributor

Live test results — azdev test --live --series (changed test files only)

PASS

Selectors: test_acr_commands_mock (module)
PR head ref: copilot/fix-az-acr-login-regression
PR head sha: f038367c78b5cadc0ac6e123092db8eb9492761b
PR base ref: dev
New test files in PR: false

Changed test files run
src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py

Workflow run: https://github.com/Azure/issue-sentinel/actions/runs/31590610904

Last 80 lines of azdev output

=============
| Run Tests |
=============


=====================
| Discovering Tests |
=====================

/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:18: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_compute': '\{"providers":\["Microsoft.Compute"\]\}',
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:19: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_empty': '\{"providers":\[\]\}'
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13551: SyntaxWarning: invalid escape sequence '\]'
  self.cmd('vmss application set -g {rg} -n {vmss} --app-version-ids {vid1} {vid2} --enable-automatic-upgrade True\]', checks=[

test index updated: /home/runner/.azdev/env_config/home/runner/work/issue-sentinel/issue-sentinel/.venv/test_index/latest.json

Test on modules: test_acr_commands_mock

WARNING: RUNNING TESTS LIVE
The tests are set to run against current profile "latest"
============================= test session starts ==============================
platform linux -- Python 3.12.13, pytest-9.1.1, pluggy-1.6.0 -- /home/runner/work/issue-sentinel/issue-sentinel/.venv/bin/python
cachedir: .pytest_cache
rootdir: /home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli
plugins: xdist-3.8.0, forked-1.7.5
collecting ... collected 27 items

azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_get_docker_credentials PASSED [  3%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_get_docker_credentials_arm_token_fallback PASSED [  7%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_helm_delete PASSED [ 11%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_helm_list PASSED [ 14%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_helm_push PASSED [ 18%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_helm_show PASSED [ 22%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_delete PASSED [ 25%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_deleted_list PASSED [ 29%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_deleted_restore PASSED [ 33%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_deleted_tags_list PASSED [ 37%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_list PASSED [ 40%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_list_referrers PASSED [ 44%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_metadata_list PASSED [ 48%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_metadata_show PASSED [ 51%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_metadata_update PASSED [ 55%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_show PASSED [ 59%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_delete PASSED [ 62%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_list PASSED [ 66%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_list_deleted PASSED [ 70%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_show PASSED [ 74%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_show_manifests PASSED [ 77%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_show_tags PASSED [ 81%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_update PASSED [ 85%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::ResolveAcrScopeTests::test_config_exception_falls_back_to_default PASSED [ 88%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::ResolveAcrScopeTests::test_default_when_unset PASSED [ 92%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::ResolveAcrScopeTests::test_full_url_is_used_verbatim PASSED [ 96%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::ResolveAcrScopeTests::test_short_name_is_expanded PASSED [100%]

- generated xml file: /home/runner/work/issue-sentinel/issue-sentinel/test-output/results.xml -
============================== 27 passed in 1.00s ==============================

Posted by agent-assist live-test workflow.

@x-engineering-agent x-engineering-agent Bot 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.

Automated Review Summary

PR: #33699[ACR] Fix Azure/azure-cli#33698: az acr login: Fix ARM token exchange fallback for AzureML MSI/SSO

  • Live test (Tester): ✅ Passed — run 31590610904
  • CI checks: ✅ All 92 checks passed (0 failed, 0 pending)

No outstanding issues found. This PR looks good from an automated CI/live-test standpoint.


Posted by agent-assist (autonomous bug-fix pipeline).

@x-engineering-agent

Copy link
Copy Markdown
Contributor

Live test results — azdev test --live --series (changed test files only)

PASS

Selectors: test_acr_commands_mock (module)
PR head ref: copilot/fix-az-acr-login-regression
PR head sha: f038367c78b5cadc0ac6e123092db8eb9492761b
PR base ref: dev
New test files in PR: false

Changed test files run
src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py

Workflow run: https://github.com/Azure/issue-sentinel/actions/runs/32259891669

Last 80 lines of azdev output

=============
| Run Tests |
=============


=====================
| Discovering Tests |
=====================

/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py:13551: SyntaxWarning: invalid escape sequence '\]'
  self.cmd('vmss application set -g {rg} -n {vmss} --app-version-ids {vid1} {vid2} --enable-automatic-upgrade True\]', checks=[
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:18: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_compute': '\{"providers":\["Microsoft.Compute"\]\}',
/home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli/azure/cli/command_modules/identity/tests/latest/test_identity.py:19: SyntaxWarning: invalid escape sequence '\{'
  'resource_restriction_empty': '\{"providers":\[\]\}'

test index updated: /home/runner/.azdev/env_config/home/runner/work/issue-sentinel/issue-sentinel/.venv/test_index/latest.json

Test on modules: test_acr_commands_mock

WARNING: RUNNING TESTS LIVE
The tests are set to run against current profile "latest"
============================= test session starts ==============================
platform linux -- Python 3.12.13, pytest-9.1.1, pluggy-1.6.0 -- /home/runner/work/issue-sentinel/issue-sentinel/.venv/bin/python
cachedir: .pytest_cache
rootdir: /home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli
plugins: forked-1.7.5, xdist-3.8.0
collecting ... collected 27 items

azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_get_docker_credentials PASSED [  3%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_get_docker_credentials_arm_token_fallback PASSED [  7%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_helm_delete PASSED [ 11%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_helm_list PASSED [ 14%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_helm_push PASSED [ 18%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_helm_show PASSED [ 22%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_delete PASSED [ 25%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_deleted_list PASSED [ 29%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_deleted_restore PASSED [ 33%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_deleted_tags_list PASSED [ 37%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_list PASSED [ 40%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_list_referrers PASSED [ 44%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_metadata_list PASSED [ 48%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_metadata_show PASSED [ 51%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_metadata_update PASSED [ 55%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_manifest_show PASSED [ 59%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_delete PASSED [ 62%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_list PASSED [ 66%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_list_deleted PASSED [ 70%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_show PASSED [ 74%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_show_manifests PASSED [ 77%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_show_tags PASSED [ 81%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::AcrMockCommandsTests::test_repository_update PASSED [ 85%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::ResolveAcrScopeTests::test_config_exception_falls_back_to_default PASSED [ 88%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::ResolveAcrScopeTests::test_default_when_unset PASSED [ 92%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::ResolveAcrScopeTests::test_full_url_is_used_verbatim PASSED [ 96%]
azure-cli/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py::ResolveAcrScopeTests::test_short_name_is_expanded PASSED [100%]

- generated xml file: /home/runner/work/issue-sentinel/issue-sentinel/test-output/results.xml -
============================== 27 passed in 1.00s ==============================

Posted by agent-assist live-test workflow.

@x-engineering-agent x-engineering-agent Bot 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.

✅ All Checks Passed

PR: [ACR] Fix Azure/azure-cli#33698: az acr login: Fix ARM token exchange fallback for AzureML MSI/SSO

CI Summary: 92/92 checks completed successfully, 0 failures.

Live Test: The live-test workflow (azdev test --live on the changed test files) completed successfully — run: https://github.com/Azure/issue-sentinel/actions/runs/32259891669

No outstanding issues. This PR looks good and is ready for a human maintainer to merge.

@x-engineering-agent

Copy link
Copy Markdown
Contributor

Started a Copilot task using claude-sonnet-4.6 for human feedback at #33699 (comment): https://github.com/Azure/azure-cli/tasks/ff8a16d6-bff5-4f9b-af06-0f0b606a341c

@a0x1ab Aditya Pujara (a0x1ab) added X Engineering Agent Reviewed Pull request reviewed by X Engineering Agent and removed azure-client-tools-agent labels Sep 2, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

🔔 Routing this PR to @Azure/act-identity-squad.

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

Labels

AAD Account az login/account act-identity-squad ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group Auto-Assign Auto assign by bot Installation X Engineering Agent Reviewed Pull request reviewed by X Engineering Agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

az acr login regression in 2.87.0 on AzureML compute MSI/SSO

5 participants