-
Notifications
You must be signed in to change notification settings - Fork 3.4k
{ACR} Update ACR test suite: remove unnecessary @live_only decorators and make time.sleep conditional on live mode #33135
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: dev
Are you sure you want to change the base?
Changes from all commits
ca893b2
44419fd
a03fb7a
bf675fe
77f9443
6424305
6eff69d
1c91da3
f9921a2
9555635
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -349,25 +349,24 @@ def _check_registry_health(cmd, registry_name, repository, ignore_errors): | |||||||||||||
| registry and registry.role_assignment_mode == RoleAssignmentMode.ABAC_REPOSITORY_PERMISSIONS | ||||||||||||||
| _get_endpoint_and_token_status(cmd, login_server, registry_abac_enabled, repository, ignore_errors) | ||||||||||||||
|
|
||||||||||||||
| if cmd.supported_api_version(min_api='2020-11-01-preview', resource_type=ResourceType.MGMT_CONTAINERREGISTRY): # pylint: disable=too-many-nested-blocks | ||||||||||||||
| # CMK settings | ||||||||||||||
| if registry and registry.encryption and registry.encryption.key_vault_properties: # pylint: disable=too-many-nested-blocks | ||||||||||||||
| client_id = registry.encryption.key_vault_properties.identity | ||||||||||||||
| valid_identity = False | ||||||||||||||
| if registry.identity: | ||||||||||||||
| valid_identity = ((client_id == 'system') and | ||||||||||||||
| bool(registry.identity.principal_id)) # use system identity? | ||||||||||||||
| if not valid_identity and registry.identity.user_assigned_identities: | ||||||||||||||
| for k, v in registry.identity.user_assigned_identities.items(): | ||||||||||||||
| if v.client_id == client_id: | ||||||||||||||
| from azure.core.exceptions import HttpResponseError | ||||||||||||||
| try: | ||||||||||||||
| valid_identity = resolve_identity_client_id(cmd.cli_ctx, k) == client_id | ||||||||||||||
| except HttpResponseError: | ||||||||||||||
| pass | ||||||||||||||
| if not valid_identity: | ||||||||||||||
| from ._errors import CMK_MANAGED_IDENTITY_ERROR | ||||||||||||||
| _handle_error(CMK_MANAGED_IDENTITY_ERROR.format_error_message(registry_name), ignore_errors) | ||||||||||||||
| # CMK settings | ||||||||||||||
| if registry and registry.encryption and registry.encryption.key_vault_properties: # pylint: disable=too-many-nested-blocks | ||||||||||||||
| client_id = registry.encryption.key_vault_properties.identity | ||||||||||||||
|
Comment on lines
+353
to
+354
|
||||||||||||||
| if registry and registry.encryption and registry.encryption.key_vault_properties: # pylint: disable=too-many-nested-blocks | |
| client_id = registry.encryption.key_vault_properties.identity | |
| encryption = getattr(registry, 'encryption', None) if registry else None | |
| key_vault_properties = getattr(encryption, 'key_vault_properties', None) | |
| if key_vault_properties: # pylint: disable=too-many-nested-blocks | |
| client_id = key_vault_properties.identity |
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.
Addressed by #33117
Copilot
AI
Apr 4, 2026
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 PR title/description focus on ACR test refactoring, but this hunk changes production behavior in acr/check_health.py (CMK validation now runs unconditionally and the API-version gate is removed). Please update the PR description to explicitly call out this functional change (or move it into a separate PR) so reviewers can assess the runtime impact appropriately.
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.
That modification should be addressed by #33117
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
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.
This change also makes
from azure.cli.core.profiles import ResourceType(near the top of_check_registry_health) unused, sinceResourceTypewas only referenced by the removedcmd.supported_api_version(...)call. Please remove that import (or reintroduce the version check) to avoid unused-import lint failures.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.
@copilot apply changes based on this feedback