Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

Plugin Review Steps

Daniel Lee edited this page Dec 30, 2018 · 1 revision

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.

Plugin Metadata Review

New Plugin Metadata

  1. Try and publish the plugin to the grafana.com Staging API
  2. Check that plugin id follows the conventions (should not start with grafana- for example)
  3. Check that the version number is the same as in the PR.
  4. Check that the version number is the format x.x.x e.g. 1.0.0
  5. 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.
  6. Check that the documentation describes how to get started and that it describes how to use the plugin if it is not obvious.

Plugin Update Metadata

  1. Try and publish the plugin to the grafana.com Staging API
  2. Check that the version number is the same as in the PR.

Common Metadata Errors

  • 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 and dest directories.

Plugin Review

Different types of plugins have different parts to review.

Datasource Plugin Review

A datasource plugin has a config page, a query editor and optionally an Annotation query editor and a template variable query editor.

Datasource Setup

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.

Config Page Review

  1. 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.
  2. 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.
  3. 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 the suggest-url attribute to suggest a url to make it easier to choose the correct url.

Query Editor Review

  1. 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.
  2. The query editor layout should be neat and tidy and it should use the Grafana CSS classes.
  3. Test creating multiple queries. Then test hiding a query to make sure that the result is no longer displayed.
Template Variable Review

If the datasource supports template variables.

  1. Test adding template variables to the query - does it a support a simple custom variable query with hardcoded values.
  2. 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