Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rule: Add support for extended promql functions #7105

Merged
merged 1 commit into from Feb 21, 2024

Conversation

sdufel
Copy link
Contributor

@sdufel sdufel commented Jan 29, 2024

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Will add a CHANGELOG entry based on review

Changes

Adds a flag to register the extended promql functions supported by the thanos query engine when running the rule component. This will allow rule config files containing query expressions with (xrate / xincrease / xdelta) to pass validation. This will only work if the query endpoint in use is running the thanos engine.

Verification

We deployed this commit to our production environment with the flag enabled and loaded rules containing xincrease.

@sdufel sdufel changed the title rule: Add support for extended promql functions in rule rule: Add support for extended promql functions Jan 29, 2024
Copy link
Member

@GiedriusS GiedriusS left a comment

Choose a reason for hiding this comment

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

Could we add a test case for this flag?

yeya24
yeya24 previously approved these changes Feb 20, 2024
Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

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

I think it is fine to skip tests for this one. Or we merge it first and add tests later.

@sdufel Can you help update the changelog? Thanks

@sdufel
Copy link
Contributor Author

sdufel commented Feb 20, 2024

Sure, I just added in the changelog entry.

CHANGELOG.md Outdated Show resolved Hide resolved
Adds a flag to register the extended promql functions supported by the thanos
query engine when running the rule component.  This will allow rule config
files containing query expressions with (xrate / xincrease / xdelta) to pass
validation.  This will only work if the query endpoint in use is running the
thanos engine.

Signed-off-by: Samuel Dufel <samuel.dufel@shopify.com>
@yeya24 yeya24 merged commit 1723d1d into thanos-io:main Feb 21, 2024
18 of 20 checks passed
Copy link
Member

@GiedriusS GiedriusS left a comment

Choose a reason for hiding this comment

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

@sdufel
Copy link
Contributor Author

sdufel commented Feb 22, 2024

Added a fix for that over here: #7161

GiedriusS pushed a commit to vinted/thanos that referenced this pull request Feb 23, 2024
Adds a flag to register the extended promql functions supported by the thanos
query engine when running the rule component.  This will allow rule config
files containing query expressions with (xrate / xincrease / xdelta) to pass
validation.  This will only work if the query endpoint in use is running the
thanos engine.

Signed-off-by: Samuel Dufel <samuel.dufel@shopify.com>
jnyi pushed a commit to jnyi/thanos that referenced this pull request Apr 4, 2024
Adds a flag to register the extended promql functions supported by the thanos
query engine when running the rule component.  This will allow rule config
files containing query expressions with (xrate / xincrease / xdelta) to pass
validation.  This will only work if the query endpoint in use is running the
thanos engine.

Signed-off-by: Samuel Dufel <samuel.dufel@shopify.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants