Skip to content

Fix variable in _prometheus.html.haml so it shows as a code block

Roy Zwambag requested to merge rz-fix-prometheus-page-warning into master

What does this MR do and why?

When loading /admin/application_settings/metrics_and_profiling without a valid prometheus_multiproc_dir, a warning is supposed to show that your ENV variable or directory is not valid. This warning had an error where it would point to a variable that didn't exist, while it should've been pointing to a string, this MR fixes that.

Screenshots or screen recordings

Screenshot_2022-03-08_at_11.18.59

How to set up and validate locally

Two things to validate:

(The first fails on the current master branch)

  1. Remove the directory that environment variable prometheus_multiproc_dir points to (default: gitlab/tmp/prometheus_multiproc_dir/puma
  2. Go to <gdk-url>/admin/application_settings/metrics_and_profiling
  3. Expand Metrics - Prometheus, a warning should now show up (see screenshot above).

  1. (re)create the directory
  2. Go to <gdk-url>/admin/application_settings/metrics_and_profiling
  3. Expand Metrics - Prometheus, a warning should not show up.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Fixes #352055

Edited by Roy Zwambag

Merge request reports