grafana/contribute/backend/upgrade-dependencies.md
Joseph Perez 0ecff76600
Docs: Edit of several Backend topics (part 5 of doc quality project) (#89073)
* Edit of several Backend topics (part 5 of doc quality project)

* Proofread of files

* Prettier fix

* Update contribute/backend/upgrading-dependencies.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update contribute/backend/README.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update contribute/backend/README.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update contribute/backend/recommended-practices.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update contribute/backend/recommended-practices.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update contribute/backend/recommended-practices.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update contribute/backend/recommended-practices.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update contribute/backend/recommended-practices.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update contribute/backend/recommended-practices.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Rename doc filenames with gerunds

---------

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2024-07-13 10:37:47 -07:00

1.1 KiB

Upgrade dependencies

We recommend the practices in this documentation when upgrading the various backend dependencies of Grafana.

Protocol buffers (protobufs)

Use the most recent stable version of the protobuf library in Grafana and the plugin SDK.

Additionally, you typically want to upgrade your protobuf compiler toolchain and re-compile the protobuf files.

Note: You need Buf CLI installed and available in your path. For instructions, refer to the Buf Docs documentation.

After you've installed Buf CLI, re-compile the protobuf files in Grafana and the plugin SDK. Use this code:

cd $GRAFANA
make protobuf
cd $GRAFANA_PLUGIN_SDK_GO
mage protobuf

After upgrading the protobuf dependency in Grafana and the plugin SDK, it is a best practice to test that your code still works before creating your PR. Specifically:

  • Test a plugin built with upgraded SDK on upgraded Grafana
  • Test a plugin built with non-upgraded SDK on upgraded Grafana
  • Test a plugin built with upgraded SDK on non-upgraded Grafana