Is your plugin compatible with Grafana? There's a tool for that!
Here at Grafana Labs, we’re always striving to reduce the amount of effort needed to maintain plugins across different versions of Grafana. That is why we’re excited to provide you with a tool to check the compatibility of your plugin with the latest Grafana plugins API.
We know that it can be frustrating for developers to find out people can’t use their plugins. Over the past few months, we’ve been working on detecting the breaking changes as soon as they happen. In order to do that, we’ve developed a tool we call Levitate, integrated it into our CI pipeline, and now have a report on breaking changes for every related pull request in the Grafana repository. You can read more on how it works here.
Today, we are announcing that we have added additional functionality to this tool — one that plugin developers can use in order to check if their plugins will work properly with older and updated versions of Grafana. The tool can be integrated into a CI workflow or used as a CLI on a local machine. We hope that it will give developers a better understanding of what things have changed in Grafana, adopt their code quicker, and have a higher confidence that plugins will work properly.
It’s as simple as running:
npx @grafana/levitate@latest is-compatible --path src/module.ts --target @grafana/data,@grafana/ui,@grafana/runtime
You can also specify a Grafana version to check against:
npx @grafana/levitate@latest is-compatible --path src/module.ts --target @grafana/data@9.0.5,@grafana/ui@9.0.5,@grafana/runtime@9.0.5
You can read how to run it locally and integrate it into GitHub Actions workflow here.
This is what a plugin compatibility check looks like:
Will this tool solve all compatibility issues?
No, we are not aiming for 100% correctness, but rather increasing developers’ confidence as much as we can — and as much as possible — given the constraints of AST tree parsing.
Let us know your thoughts on this tool! You can share your feedback here.
Interested in learning how to leverage Grafana’s plugin ecosystem for access to 80+ data sources, including plugins for Datadog, Splunk, MongoDB, and more? Check out this webinar.
If you’re not already using Grafana Cloud — the easiest way to get started with observability — sign up now for a free 14-day trial of Grafana Cloud Pro, with unlimited metrics, logs, traces, and users, long-term retention, and access to Enterprise plugins.