Skip to content

Fix NoMethodError in Integrations::Prometheus#test

What does this MR do and why?

Resolves #358129 (closed)

In case of invalid prometheus configuration prometheus_client can be a nil. When a user hits Test integration for Prometheus occurs 500 error. Now it returns response with configuration error.

Screenshots or screen recordings

Before: image

After: image

How to set up and validate locally

  1. Visit prometheus integreation page i.e. http://127.0.0.1:3000/flightjs/Flight/-/integrations/prometheus/edit
  2. Leave manual configuration Active checkbox unset
  3. Enter any valid http or https schema url that pass form validation in the API URL input i.e. http://
  4. Hit Test settings button

MR acceptance checklist

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

Edited by Dmitriy Ivliev

Merge request reports