-
Notifications
You must be signed in to change notification settings - Fork 268
Plugin Review Steps
There are two main phases to reviewing a new plugin or plugin update - checking that the metadata is correct and checking the quality of the plugin.
More detail on the guidelines are documented here.
- Try and publish the plugin to the grafana.com Staging API
- Check that plugin id follows the conventions (should not start with
grafana-
for example) - Check that the version number is the same as in the PR.
- Check that the version number is the format
x.x.x
e.g.1.0.0
- Navigate to https://grafana-net.raintank.io/ and the plugins section. Find the newly published plugin and check that the readme has rendered correctly and that any links are not broken.
- Check that the documentation describes how to get started and that it describes how to use the plugin if it is not obvious.
- Try and publish the plugin to the grafana.com Staging API
- Check that the version number is the same as in the PR.
- Incorrect plugin id. This is the most important piece of metadata to check.
- Relative image links in the readme. They work on github.com but not on grafana.com
- Incorrect version number or version numbers that are different in the plugin.json files in the
src
anddest
directories.
Different types of plugins have different parts to review.
A datasource plugin has a config page, a query editor and optionally an Annotation query editor and a template variable query editor.
To be able to test a datasource properly, you need to setup a database or api to test with. This is the hardest part of testing new datasource plugins. If you are lucky, there will be a docker image for the database or API to test with. Ask the plugin author for help if it is not obvious on how to set it up. Sometimes they provide test accounts or demo environments.
After figuring out how to setup a database then document it in the wiki so that you can easily set it up again when testing future updates.
- Fill in the config details - it should be obvious how to do this otherwise either the docs need to be added to or the config page should have a help section.
- Click Save and Test with a working config and an incorrect config. The incorrect config should generate a proper error message that is easy to understand. The Save and test button should make a call to the database or API being tested that also tests the credentials. The user should not be able to click the Save & Test button, get a success and then get an error when creating a dashboard due to incorrect credentials.
- The config page should be neat and tidy with labels and fields lined up. If it has an http url then it should use the
datasource-http-settings
Angular directive and thesuggest-url
attribute to suggest a url to make it easier to choose the correct url.
- Create a dashboard, a graph panel and a table panel and try and write a query. It should work and it should be obvious how to write a query.
- The query editor layout should be neat and tidy and it should use the Grafana CSS classes.
- Test creating multiple queries. Then test hiding a query to make sure that the result is no longer displayed.
If the datasource supports template variables.
- Test adding template variables to the query - does it a support a simple custom variable query with hardcoded values.
- Create a variable for the datasource plugin being tested and test that it works. Test multiple values and the
All
value and see if they work with queries.
Example Review: Atlas plugin