Deprecating config.apps in @grafana/runtime package

The merge of PR #115610 (https://github.com/grafana/grafana/pull/115610) to main initiates the process of decoupling plugin-related properties from GrafanaBootConfig. This change specifically targets config.apps and will be followed by the deprecation of config.panels and config.datasources in the ensuing months. The removal of config.apps from the @grafana/runtime package is projected to occur in Grafana 13.2 and PR #115610 is targeted for the 12.4 release of Grafana.

What changed

The config.apps property from the @grafana/runtime package is now marked as deprecated.

Why we made this change

This deprecation is necessary to facilitate the asynchronous loading of plugin-related metadata, ensuring they are initialized only when Grafana requires them.

Who is affected

  • Affected: Plugins or core Grafana code that access config.apps property from the @grafana/runtime package
  • Not Affected: Plugins or core Grafana code that don’t access config.apps property from the @grafana/runtime package

Action required (for plugin authors)

Replace all accesses to the config.apps property with one of the following public alternatives from the @grafana/runtime package:

For checking if an app plugin is installed (doesn’t check if the plugin is enabled):

  • Function: isAppPluginInstalled
  • Hook: useAppPluginInstalled

For getting an app plugin’s version:

  • Function: getAppPluginVersion
  • Hook: useAppPluginVersion

To address this, your plugin must target Grafana version 12.4 or newer. Alternatively, you can implement runtime checks as detailed in the guide available at https://grafana.com/developers/plugin-tools/how-to-guides/runtime-checks.

Action required (for Grafana core maintainers)

Replace all accesses to the config.apps property with one of the following internal alternatives from the @grafana/runtime package:

For getting meta data for a specific plugin:

  • Function: getAppPluginMeta
  • Hook: useAppPluginMeta

For getting all meta data:

  • Function: getAppPluginMetas
  • Hook: useAppPluginMetas

More resources

Track the overall progress of decoupling plugins from boot data in this Epic: https://github.com/grafana/grafana/issues/114889

For the progress related to config.apps within core Grafana, see the migrate away from config.apps Epic: https://github.com/grafana/grafana/issues/115617