Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

fix/msp: flatten custom alert promQL query for GCP#63084

Merged
bobheadxi merged 1 commit into
mainfrom
msp-alertpolicy-flatten-promql
Jun 4, 2024
Merged

fix/msp: flatten custom alert promQL query for GCP#63084
bobheadxi merged 1 commit into
mainfrom
msp-alertpolicy-flatten-promql

Conversation

@bobheadxi

@bobheadxi bobheadxi commented Jun 4, 2024

Copy link
Copy Markdown
Member

The GCP monitoring alert configuration expects, for some reason, a single-line PromQL query only, otherwise the threshold doesn't work. In configuration, however, we may want to write a multi-line query, for ease of readability. This change automatically flattens the PromQL query into a single line and strips extra spaces.

Part of CORE-161

Test plan

Unit tests

@bobheadxi bobheadxi requested review from a team and jac June 4, 2024 19:59
@cla-bot cla-bot Bot added the cla-signed label Jun 4, 2024

@jac jac left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh good catch

looking back I tested with single line for promql and multiline for mql 😠

@bobheadxi

Copy link
Copy Markdown
Member Author

looking back I tested with single line for promql and multiline for mql 😠

To be fair, I think this is a GCP bug 😆

@bobheadxi bobheadxi merged commit a3fe573 into main Jun 4, 2024
@bobheadxi bobheadxi deleted the msp-alertpolicy-flatten-promql branch June 4, 2024 21:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants