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

Grafana fails to parse dashboard when all panels are enclosed in a row #166

Closed
arturo-seijas opened this issue Dec 8, 2022 · 0 comments · Fixed by #172
Closed

Grafana fails to parse dashboard when all panels are enclosed in a row #166

arturo-seijas opened this issue Dec 8, 2022 · 0 comments · Fixed by #172

Comments

@arturo-seijas
Copy link

Bug Description

Grafana fails to parse dashboard when all panels are enclosed in a row. Relevant log output is provided.

To Reproduce

Deploy COS

  • juju deploy discourse-k8s --channel edge
  • juju relate discourse-k8s admin/[cos-model].grafana-dashboards

Environment

Not relevant

Relevant log output

unit-grafana-0: 11:29:50 ERROR unit.grafana/0.juju-log grafana-dashboard:24: Uncaught exception while in charm code:
Traceback (most recent call last):
  File "./src/charm.py", line 1167, in <module>
    main(GrafanaCharm, use_juju_for_storage=True)
  File "/var/lib/juju/agents/unit-grafana-0/charm/venv/ops/main.py", line 438, in main
    _emit_charm_event(charm, dispatcher.event_name)
  File "/var/lib/juju/agents/unit-grafana-0/charm/venv/ops/main.py", line 150, in _emit_charm_event
    event_to_emit.emit(*args, **kwargs)
  File "/var/lib/juju/agents/unit-grafana-0/charm/venv/ops/framework.py", line 355, in emit
    framework._emit(event)  # noqa
  File "/var/lib/juju/agents/unit-grafana-0/charm/venv/ops/framework.py", line 856, in _emit
    self._reemit(event_path)
  File "/var/lib/juju/agents/unit-grafana-0/charm/venv/ops/framework.py", line 931, in _reemit
    custom_handler(event)
  File "/var/lib/juju/agents/unit-grafana-0/charm/lib/charms/grafana_k8s/v0/grafana_dashboard.py", line 1272, in _on_grafana_dashboard_relation_changed
    changes = self._render_dashboards_and_signal_changed(event.relation)
  File "/var/lib/juju/agents/unit-grafana-0/charm/lib/charms/grafana_k8s/v0/grafana_dashboard.py", line 1369, in _render_dashboards_and_signal_changed
    content = _convert_dashboard_fields(content, inject_dropdowns)
  File "/var/lib/juju/agents/unit-grafana-0/charm/lib/charms/grafana_k8s/v0/grafana_dashboard.py", line 599, in _convert_dashboard_fields
    dict_content = _replace_template_fields(dict_content, datasources, existing_templates)
  File "/var/lib/juju/agents/unit-grafana-0/charm/lib/charms/grafana_k8s/v0/grafana_dashboard.py", line 616, in _replace_template_fields
    panels = dict_content["panels"]
KeyError: 'panels'

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant