Skip to content

Allow query/query_range keys to contain numbers

What does this MR do?

A number is a valid Prometheus query. Such queries are usually used to display a threshold on a chart. We used to previously allow numbers in the query/query_range key. In !34508 (merged) we started removing newlines from the query/query_range key in order to allow for multiline queries. This, unfortunately, had the side effect of throwing an error when the query/query_range key contained a number.

Issue: #236014 (closed)

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Reuben Pereira

Merge request reports