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

Example uses deprecated Grizzly functionality #1

Closed
mikaello opened this issue Mar 4, 2024 · 3 comments
Closed

Example uses deprecated Grizzly functionality #1

mikaello opened this issue Mar 4, 2024 · 3 comments

Comments

@mikaello
Copy link
Contributor

mikaello commented Mar 4, 2024

Thanks for your example!

Just wanted to raise the issue that the example is using deprecated syntax for defining the dashboards:

grafanaDashboards+:: {
'example.json': (import 'example.jsonnet'),
},

Ref Grizzly documentation regarding Hidden Elements:

NOTE: This functionality is deprecated. It was necessary to support the formats within Monitoring Mixins. However, using explicit resources provides a cleaner and language agnostic way to describe resources and their metadata. If you have existing libaries that use hidden elements, it isn't too hard to write small functions to wrap these into resources.

I think your example dashboard instead should be something like this:

local grr = import 'github.com/grafana/jsonnet-libs/grizzly/grizzly.libsonnet';

{
  dashboards: [
    grr.dashboard.new('example', (import 'example.jsonnet')),
  ],
}
@joanlopez
Copy link
Owner

Hey @mikaello,

Thanks for reporting it! Would you mind opening a PR? Thanks!

mikaello added a commit to mikaello/grafonnet-example that referenced this issue Mar 5, 2024
@mikaello
Copy link
Contributor Author

mikaello commented Mar 5, 2024

Sure: #2

@joanlopez
Copy link
Owner

Closed by #2, thanks so much @mikaello! 🙏🏻 🙏🏻

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

No branches or pull requests

2 participants