Skip to content
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

az acr manifest show throw python error #27852

Open
jlucaspains opened this issue Nov 15, 2023 · 4 comments
Open

az acr manifest show throw python error #27852

jlucaspains opened this issue Nov 15, 2023 · 4 comments
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Container Registry az acr Service Attention This issue is responsible by Azure service team.

Comments

@jlucaspains
Copy link

jlucaspains commented Nov 15, 2023

Describe the bug

Starting today (11/15/2023) the az CLI command below started throwing a python error.

az acr manifest show "myacr.azurecr.io/myimage:5479"

image

Related command

Same error when using:

az acr manifest metadata show "myacr.azurecr.io/myimage:5479"

Errors

Command group 'acr manifest' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
expected string or bytes-like object, got 'NoneType'

image

Issue script & Debug output

cli.knack.cli: Command arguments: ['acr', 'manifest', 'show', 'myacr.azurecr.io/myapi:5479', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x01F8E7A8>, <function OutputProducer.on_global_arguments at 0x022B7898>, <function CLIQuery.on_global_arguments at 0x022D8668>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'acr': ['azure.cli.command_modules.acr']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: acr 0.214 36 149
cli.azure.cli.core: Total (1) 0.214 36 149
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: Total (0) 0.000 0 0
cli.azure.cli.core: Loaded 36 groups, 149 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : acr manifest show myacr.azurecr.io/myapi:5479
cli.azure.cli.core: Command table: acr manifest show
cli.azure.cli.core: remaining : myacr.azurecr.io/myapi:5479
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x043BAA78>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\me.azure\commands\2023-11-15.14-47-48.acr_manifest_show.10956.log'.
az_command_data_logger: command args: acr manifest show {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x043CA6B8>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x043F4DE8>, <function register_cache_arguments..add_cache_arguments at 0x043F4E38>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x022B78E8>, <function CLIQuery.handle_query_parameter at 0x022D86B8>, <function register_ids_argument..parse_ids_arguments at 0x043F4D98>]
Command group 'acr manifest' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/invocation.py", line 113, in _validation
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 859, in _validate_arg_level
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/acr/validators.py", line 118, in validate_registry_name
File "re_init
.py", line 166, in match
TypeError: expected string or bytes-like object, got 'NoneType'

cli.azure.cli.core.azclierror: expected string or bytes-like object, got 'NoneType'
az_command_data_logger: expected string or bytes-like object, got 'NoneType'
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x043BABB8>]
az_command_data_logger: exit code: 2
cli.main: Command ran in 0.871 seconds (init: 0.455, invoke: 0.416)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3440 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry_init_.pyc C:\Users\me.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.

Expected behavior

The manifest json is displayed as before.

Example json:
{
"changeableAttributes": {
"deleteEnabled": true,
"listEnabled": true,
"readEnabled": true,
"writeEnabled": true
},
"createdTime": "2023-11-15T16:12:25.6563111Z",
"digest": "sha256:b5484b8754426f8befcf063a80a135c7726c2d0a6510e233c6668adc9e1dee1e",
"lastUpdateTime": "2023-11-15T19:40:58.0169084Z",
"name": "5514",
"quarantineState": "Passed",
"signed": false
}

Environment Summary

azure-cli 2.54.0

core 2.54.0
telemetry 1.1.0

Extensions:
containerapp 0.3.41
storage-preview 1.0.0b1

Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\me.azure\cliextensions'

Python (Windows) 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:21:31) [MSC v.1936 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal

Additional context

No response

@jlucaspains jlucaspains added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Nov 15, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented Nov 15, 2023

Thank you for opening this issue, we will look into it.

@yonzhan yonzhan added Container Registry az acr Service Attention This issue is responsible by Azure service team. labels Nov 16, 2023
Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @toddysm, @luisdlp, @northtyphoon.

@mabenedi
Copy link
Member

Thanks for the bug.

To unblock, give this a try

az acr manifest show -r myacr -n myimage:5479

@jlucaspains
Copy link
Author

@mabenedi thanks for the alternative command. It does work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Container Registry az acr Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

3 participants