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

[Bug]: Can't get 'grr snapshot' subcommand to work #539

Open
mikaello opened this issue Dec 7, 2024 · 0 comments
Open

[Bug]: Can't get 'grr snapshot' subcommand to work #539

mikaello opened this issue Dec 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mikaello
Copy link
Contributor

mikaello commented Dec 7, 2024

Grizzly Version

v0.6.1

Expected Behavior

The command grr snapshot ... should deploy local dashboards as snapshots to the instance specified in GRAFANA_URL.

Actual Behavior

The command errors when targeting Grafana Cloud:

$ grr snapshot -l debug -e 1000 dashboards.jsonnet

level=debug msg="Parsing resource" parser=filtered resourcePath=dashboards.jsonnet
level=debug msg="Parsing file" file=dashboards.jsonnet parser=jsonnet
level=fatal msg="[POST /snapshots][500] createDashboardSnapshotInternalServerError {\"message\":\"Failed to get dashboard\"}"

The command succeeds, but produces an empty snapshot when targeting local on-premise instance (tested Grafana v9 and v10):

Image

Note: The command succeeds and produces a correct snapshot showing the dashboard when using Grizzly v0.3.1 or earlier (with the grr preview .. command. The grr preview command was reintroduced in v0.4.1 as grr snapshot.

Steps to Reproduce

Repository with minimum reproducible files: https://github.com/mikaello/grizzly-snapshot-reproduction

In essence:

  1. Install dependencies (grafonnet libs for grafana and grizzly): jb install
  2. With grizzly v0.3.1 or earlier: grr preview -e 1000 dashboards.jsonnet, confirm that it is working
  3. With grizzly v0.4.1 or later: grr snapshot -e 1000 dashboards.jsonnet, notice error message or blank dashboard deployed (depending on target environment)

In addition to the CLI tools jb and grr (in two different versions), you need the following files:

All of them are included in the repository mentioned.

This issue is reported as a bug, but it might simply be that I haven't yet learned the new approach to snapshotting introduced in v0.4.1. Please let me know in that case :-)

@mikaello mikaello added the bug Something isn't working label Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant