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 containerapp update reults in 'metadata' error #6996

Closed
LukePammant opened this issue Nov 14, 2023 · 4 comments
Closed

az containerapp update reults in 'metadata' error #6996

LukePammant opened this issue Nov 14, 2023 · 4 comments
Labels
Auto-Assign Auto assign by bot ContainerApp customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team.

Comments

@LukePammant
Copy link

LukePammant commented Nov 14, 2023

Describe the bug

Running the containerapp update function results in the error below.

Related command

az containerapp update -n my-container-app -g my-group --image my-acr.azurecr.io/path-to/my-image:tag

Errors

The command failed with an unexpected error. Here is the traceback:
'metadata'
Traceback (most recent call last):
File "/opt/az/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 663, in execute
raise ex
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 726, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 718, in _run_job
return cmd_copy.exception_handler(ex)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.azure/cliextensions/containerapp/azext_containerapp/_client_factory.py", line 28, in _polish_bad_errors
raise ex
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 705, in _run_job
result = transform_op(result)
^^^^^^^^^^^^^^^^^^^^
File "/home/user/.azure/cliextensions/containerapp/azext_containerapp/_transformers.py", line 32, in transform_sensitive_values
val["metadata"] = dict((k, "") for k, v in val["metadata"].items())
~~~^^^^^^^^^^^^
KeyError: 'metadata'

Issue script & Debug output

CMD-LOG-LINE-BEGIN 1787 | 2023-11-14 11:03:10,839 | INFO | az_command_data_logger | command args: containerapp update -n {} -g {} --image {} --debug
CMD-LOG-LINE-BEGIN 1787 | 2023-11-14 11:03:11,013 | INFO | az_command_data_logger | extension name: containerapp
CMD-LOG-LINE-BEGIN 1787 | 2023-11-14 11:03:11,014 | INFO | az_command_data_logger | extension version: 0.3.42
CMD-LOG-LINE-BEGIN 1787 | 2023-11-14 11:03:24,952 | ERROR | az_command_data_logger | The command failed with an unexpected error. Here is the traceback:
CMD-LOG-LINE-BEGIN 1787 | 2023-11-14 11:03:24,960 | ERROR | az_command_data_logger | 'metadata'
Traceback (most recent call last):
File "/opt/az/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 663, in execute
raise ex
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 726, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 718, in _run_job
return cmd_copy.exception_handler(ex)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/luke/.azure/cliextensions/containerapp/azext_containerapp/_client_factory.py", line 28, in _polish_bad_errors
raise ex
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 705, in _run_job
result = transform_op(result)
^^^^^^^^^^^^^^^^^^^^
File "/home/luke/.azure/cliextensions/containerapp/azext_containerapp/_transformers.py", line 32, in transform_sensitive_values
val["metadata"] = dict((k, "") for k, v in val["metadata"].items())
~~~^^^^^^^^^^^^
KeyError: 'metadata'
CMD-LOG-LINE-BEGIN 1787 | 2023-11-14 11:03:24,967 | INFO | az_command_data_logger | exit code: 1

Expected behavior

It should change the image for my container app

Environment Summary

azure-cli 2.54.0

core 2.54.0
telemetry 1.1.0

Extensions:
containerapp 0.3.42

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

Python location '/opt/az/bin/python3'
Extensions directory '/home/luke/.azure/cliextensions'

Python (Linux) 3.11.5 (main, Nov 8 2023, 05:20:54) [GCC 11.4.0]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

After running az upgrade and apt update && apt upgrade the az commands still say there are updates available.

I had to uninstall and reinstall azure cli to get it to update

@LukePammant LukePammant added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Nov 14, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot ContainerApp Service Attention This issue is responsible by Azure service team. labels Nov 14, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented Nov 14, 2023

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

Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @calvinsID.

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

Hi @LukePammant

This issue has been fixed starting from version 0.3.43, you can use command az extension add -n containerapp --upgrade to upgrade the version. Thanks.

@LukePammant
Copy link
Author

@Greedygre Great, thank you! I have confirmed that I was able to run the command with the updated version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot ContainerApp customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

3 participants