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

*: Promql changes to add support to extended functions throught Thanos #7338

Merged

Conversation

pedro-stanaka
Copy link
Contributor

This is a follow up to #7331.

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

Changes

In this PR I am introducing a new faillint rule to avoid using prometheus parser directly, but rather use our internal parser
package that has support for extended functions (xrate, xincrease, etc.).

  • Adding new failint for the Parse() method
  • Adding new method for ParseMetricSelector

Signed-off-by: Pedro Tanaka <pedro.stanaka@gmail.com>
Signed-off-by: Pedro Tanaka <pedro.stanaka@gmail.com>
Signed-off-by: Pedro Tanaka <pedro.stanaka@gmail.com>
Extending test to check behavior

More missing imports

Signed-off-by: Pedro Tanaka <pedro.stanaka@gmail.com>
Signed-off-by: Pedro Tanaka <pedro.stanaka@gmail.com>
Signed-off-by: Pedro Tanaka <pedro.stanaka@gmail.com>
@pedro-stanaka pedro-stanaka force-pushed the fix/extended-functions-support branch from 8ce9d68 to 422f8f4 Compare May 6, 2024 12:39
GiedriusS
GiedriusS previously approved these changes May 6, 2024
Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com>
Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com>
@GiedriusS GiedriusS merged commit 970cbbe into thanos-io:main May 7, 2024
20 checks passed
Nashluffy pushed a commit to Nashluffy/thanos that referenced this pull request May 14, 2024
thanos-io#7338)

* fixing extended functions support in more places

Signed-off-by: Pedro Tanaka <pedro.stanaka@gmail.com>

* Adding new failint for the Parse() method

Signed-off-by: Pedro Tanaka <pedro.stanaka@gmail.com>

* Adding new method for ParseMetricSelector

Signed-off-by: Pedro Tanaka <pedro.stanaka@gmail.com>

* Fixing missing imports

Extending test to check behavior

More missing imports

Signed-off-by: Pedro Tanaka <pedro.stanaka@gmail.com>

* Fixing method name

Signed-off-by: Pedro Tanaka <pedro.stanaka@gmail.com>

* Solving references to forbidden functions

Signed-off-by: Pedro Tanaka <pedro.stanaka@gmail.com>

* Treating promql validation from ParseExpr

Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com>

* fixing funcs

Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com>

---------

Signed-off-by: Pedro Tanaka <pedro.stanaka@gmail.com>
Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com>
Signed-off-by: mluffman <nashluffman@gmail.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

2 participants