az confcom katapolicygen: called Result::unwrap()
on an Err
value: ParseIntError { kind: InvalidDigit }
#29985
Labels
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Service Attention
This issue is responsible by Azure service team.
Describe the bug
When executed the command to generate a policy with a yaml input i got the error on some occasions.
It looks like some images have some kind of incompatibility, hence the error.
My biggest issue in this occasion is not just the failure but the non-helpfulness of the message which lead me to waste of time looking for any error on my configuration.
Related command
az confcom katapolicygen -y deployment.yaml
Errors
thread 'main' panicked at src\registry.rs:155:56:
called
Result::unwrap()
on anErr
value: ParseIntError { kind: InvalidDigit }note: run with
RUST_BACKTRACE=1
environment variable to display a backtraceIssue script & Debug output
cli.knack.cli: Command arguments: ['confcom', 'katapolicygen', '-y', 'deployment.yaml', '--print-policy', '--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 0x000001328A76B9C0>, <function OutputProducer.on_global_arguments at 0x000001328A8F6200>, <function CLIQuery.on_global_arguments at 0x000001328A923D80>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'confcom': ['azext_confcom']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: Total (0) 0.000 0 0
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: confcom 0.012 1 2 C:\Users<redacted>.azure\cliextensions\confcom
cli.azure.cli.core: Total (1) 0.012 1 2
cli.azure.cli.core: Loaded 1 groups, 2 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : confcom katapolicygen
cli.azure.cli.core: Command table: confcom katapolicygen
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x000001328D84E520>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users<redacted>.azure\commands\2024-09-26.15-54-27.confcom_katapolicygen.3348.log'.
az_command_data_logger: command args: confcom katapolicygen -y {} --print-policy --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_sucli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x000001328D8B4A40>, <function register_cache_arguments..add_cache_arguments at 0x000001328D8B4B80>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x000001328A8F62A0>, <function CLIQuery.handle_query_parameter at 0x000001328A923E20>, <function register_ids_argument..parse_ids_arguments at 0x000001328D8B4AE0>]
az_command_data_logger: extension name: confcom
az_command_data_logger: extension version: 0.3.6
thread 'main' panicked at src\registry.rs:155:56:
called
Result::unwrap()
on anErr
value: ParseIntError { kind: InvalidDigit }note: run with
RUST_BACKTRACE=1
environment variable to display a backtracecli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x000001328D84E7A0>]
az_command_data_logger: exit code: 101
cli.main: Command ran in 53.226 seconds (init: 0.814, invoke: 52.413)
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 3674 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry_init_.pyc C:\Users<redacted>.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.
Expected behavior
The command should generate the policy or, at least, provide a meaningful message stating that there is a problem with the image instead of crashing.
Environment Summary
az --version
azure-cli 2.64.0
core 2.64.0
telemetry 1.1.0
Extensions:
aks-preview 9.0.0b2
attestation 1.0.0
confcom 0.3.6
Dependencies:
msal 1.30.0
azure-mgmt-resource 23.1.1
Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users<redacted>.azure\cliextensions'
Python (Windows) 3.11.8 (tags/v3.11.8:db85d51, Feb 6 2024, 22:03:32) [MSC v.1937 64 bit (AMD64)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
As i mentioned, it does not happen with all the images, so i am guessing that is related to the layers that are included on it.
In the provided example, the image causing the error is the one on the third container. If relevant, that same image but on version 1.33.0 works ¯_(ツ)_/¯
The text was updated successfully, but these errors were encountered: