Skip to content

Deprecate Grafana and disable it as a breaking change

Hossein Pursultani requested to merge 7772-deprecate-grafana into master
Turn off Grafana unless forced

- Grafana no longer enabled by default on installation.
- Installations of Grafana are turned off on upgrade as
  a breaking change.
- Adds flags to allow force enablement of Grafana.
- Adds banner stating Grafana will be removed by
  GitLab version 16.3.

Changelog: deprecated

What does this MR do?

This MR deprecates and disables the bundled Grafana. It:

  1. Disables Grafana regardless of the value of grafana['enable'], even for upgrades.
  2. Adds grafana['enable_deprecated_service'] attribute so the users can override the previous behaviour. Both grafana['enable'] and grafana['enable_deprecated_service'] must be true to enable Grafana, including for upgrades.
  3. Grafana UI is patched with a deprecation warning banner from #7762 (closed).
  4. A deprecation notice is added. When Grafana is enabled (forced) gitlab-ctl reconfigure displays the notice.

gitlab!118903 (merged) contains the documentation update.

Testing

  1. Install GitLab from 15.10 package and enable Grafana by adding grafana['enable'] = true to gitlab.rb.
  2. Run gitlab-ctl status grafana to check Grafana service is running.
  3. Navigate to <external_url>/-/grafana and login. It must look as usual.
  4. Use the package from Trigger:ee-package and upgrade the previous installation.
  5. Run gitlab-ctl status grafana to check Grafana service is disabled.
  6. Add grafana['enable_deprecated_service'] = true to gitlab.rb.
  7. Run gitlab-ctl reconfigure. You should see Grafana deprecation message when reconfigure is done.
  8. Navigate to <external_url>/-/grafana and login. You should see the deprecation banner.

Caveats

  1. The deprecation banner is not patched for RPi build and it doesn't appear for RPi installations.

Related issues

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • MR title and description are up to date, accurate, and descriptive.
  • MR targeting the appropriate branch.
  • Latest Merge Result pipeline is green.
  • When ready for review, MR is labeled "~workflow::ready for review" per the Distribution MR workflow.

For GitLab team members

If you don't have access to this, the reviewer should trigger these jobs for you during the review process.

  • The manual Trigger:ee-package jobs have a green pipeline running against latest commit.
  • If config/software or config/patches directories are changed, make sure the build-package-on-all-os job within the Trigger:ee-package downstream pipeline succeeded.
  • If you are changing anything SSL related, then the Trigger:package:fips manual job within the Trigger:ee-package downstream pipeline must succeed.
  • If CI configuration is changed, the branch must be pushed to dev.gitlab.org to confirm regular branch builds aren't broken.

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes.
  • Documentation created/updated.
  • Tests added.
  • Integration tests added to GitLab QA.
  • Equivalent MR/issue for the GitLab Chart opened.
  • Validate potential values for new configuration settings. Formats such as integer 10, duration 10s, URI scheme://user:passwd@host:port may require quotation or other special handling when rendered in a template and written to a configuration file.
Edited by Robert Marshall

Merge request reports