Skip to content

Custom metrics dashboard does not load when `max_value` is set

Summary

Custom metrics dashboard does not load when max_value is set

Steps to reproduce

  1. (GitLab team members) Go to https://gitlab.com/gitlab-com/runbooks/-/environments/1671333/metrics?dashboard=.gitlab%2Fdashboards%2Fsla-dashboard.yml
  2. Notice that you get a response that says Unable to connect to Prometheus server

Example Project

(If possible, please create an example project here on GitLab.com that exhibits the problematic behavior, and link to it here in the bug report)

(If you are using an older version of GitLab, this will also determine whether the bug is fixed in a more recent version)

What is the current bug behavior?

Dashboard does not load

What is the expected correct behavior?

Dashboard should load

Relevant logs and/or screenshots

Screen_Shot_2020-04-14_at_12.10.56_PM

Sentry: https://sentry.gitlab.net/gitlab/gitlabcom/issues/1515918/?query=is%3Aunresolved%20correlation_id%3AD4J79wnQlX6

ActiveModel::UnknownAttributeError unknown attribute 'max_value' for PerformanceMonitoring::PrometheusPanel.

Output of checks

(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)