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

AMG: KeyError: 'meta' #8298

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

AMG: KeyError: 'meta' #8298

WhiteTomX opened this issue Nov 19, 2024 · 1 comment
Assignees
Labels
Auto-Assign Auto assign by bot 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. extension/grafana az grafana Service Attention This issue is responsible by Azure service team.

Comments

@WhiteTomX
Copy link

Describe the bug

When I run az grafana dashboard import --resource-group "$(tf_grafana_resource_group_name)" --name "$(tf_grafana_instance_name)" --definition $file --overwrite an error occurs

Related command

az grafana dashboard import

Errors

ERROR: The command failed with an unexpected error. Here is the traceback:
ERROR: 'meta'
Traceback (most recent call last):
  File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/opt/az/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/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
  File "/opt/az/azcliextensions/amg/azext_amg/custom.py", line 389, in import_dashboard
    if data["meta"]["isFolder"]:
       ~~~~^^^^^^^^
KeyError: 'meta'
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues

Issue script & Debug output

I can't provide a debug log right now, as it is run in a pipeline. Will try to reproduce locally and update later.

Expected behavior

The dashboard should be imported, as it is a vlid file and not a folder.

Environment Summary

azure-cli 2.66.0 *

core 2.66.0 *
telemetry 1.1.0

Extensions:
azure-devops 1.0.1

Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1

Python location '/opt/az/bin/python3'
Extensions directory '/opt/az/azcliextensions'

Python (Linux) 3.12.7 (main, Oct 30 2024, 03:56:40) [GCC 11.4.0]

Additional context

I had a look into the files and the line in question was added in #8207. I will try to use the version 2.5.0 instead of newest version to verify. I can't easily reproduce that locally as it runs in a pipeline.

@WhiteTomX WhiteTomX added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Nov 19, 2024
@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 extension/grafana az grafana Service Attention This issue is responsible by Azure service team. labels Nov 19, 2024
@yonzhan yonzhan removed the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label 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 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. 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