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

Unable to import Grafana dashboard with Azure CLI extension #8299

Open
pauldotyu opened this issue Nov 19, 2024 · 1 comment
Open

Unable to import Grafana dashboard with Azure CLI extension #8299

pauldotyu opened this issue Nov 19, 2024 · 1 comment
Assignees
Labels
Auto-Assign Auto assign by bot extension/grafana az grafana Service Attention This issue is responsible by Azure service team.

Comments

@pauldotyu
Copy link

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az grafana dashboard import Extension Name: amg. Version: 2.5.3.

Errors:

The command failed with an unexpected error. Here is the traceback:
'meta'
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/azure-cli/2.67.0/libexec/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/opt/homebrew/Cellar/azure-cli/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 733, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.67.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
  File "/Users/paul/.azure/cliextensions/amg/azext_amg/custom.py", line 389, in import_dashboard
    if data["meta"]["isFolder"]:
       ~~~~^^^^^^^^
KeyError: 'meta'

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 grafana dashboard import --name ${AMG_NAME} --resource-group ${RG_NAME} --folder 'Azure Managed Prometheus' --definition 20331

Expected Behavior

Dashboard should import without error.

Environment Summary

macOS-15.1-arm64-arm-64bit, Darwin 24.1.0
Python 3.12.7
Installer: HOMEBREW

azure-cli 2.67.0

Extensions:
aks-preview 13.0.0b2
amg 2.5.3
azure-firewall 1.2.2
fleet 1.4.0
k8s-extension 1.6.2

Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1

Additional Context

@microsoft-github-policy-service microsoft-github-policy-service bot added Auto-Assign Auto assign by bot extension/grafana az grafana Service Attention This issue is responsible by Azure service team. labels Nov 19, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Nov 19, 2024

route to service team

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 extension/grafana az grafana Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

4 participants