Skip to content

Cannot show logs of container apps from Azure CLI #5518

@beohoang98

Description

@beohoang98

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az containerapp logs show Extension Name: containerapp. Version: 0.3.13.

Errors:

The command failed with an unexpected error. Here is the traceback:
'logStreamEndpoint'
Traceback (most recent call last):
  File "/opt/az/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
    raise ex
  File "/opt/az/lib/python3.10/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.10/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 363, in handler
    show_exception_handler(ex)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/arm.py", line 429, in show_exception_handler
    raise ex
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 361, in handler
    return op(**command_args)
  File "/home/beohoang98/.azure/cliextensions/containerapp/azext_containerapp/custom.py", line 2478, in stream_containerapp_logs
    logstream_endpoint = token_response["properties"]["logStreamEndpoint"]
KeyError: 'logStreamEndpoint'

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here...
  • az containerapp logs show -n {}

Expected Behavior

Environment Summary

Linux-5.15.0-52-generic-x86_64-with-glibc2.31, Ubuntu 20.04.5 LTS
Python 3.10.5
Installer: DEB

azure-cli 2.41.0 *

Extensions:
deploy-to-azure 0.2.0
containerapp 0.3.13

Dependencies:
msal 1.20.0b1
azure-mgmt-resource 21.1.0b1

Additional Context

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botCXP AttentionThis issue is handled by CXP team.ContainerAppbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions