Skip to content

Conversation

@PaurushGarg
Copy link
Contributor

@PaurushGarg PaurushGarg commented Nov 12, 2025

What this PR does:
Xfunction parsing support in rules validation.

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@dosubot dosubot bot added the component/rules Bits & bobs todo with rules and alerts: the ruler, config service etc. label Nov 12, 2025
@PaurushGarg PaurushGarg force-pushed the parser-xfunctions-ruler branch from 23387d9 to ea89998 Compare November 12, 2025 22:52
@PaurushGarg PaurushGarg force-pushed the parser-xfunctions-ruler branch from ea89998 to 23d5cf9 Compare November 12, 2025 23:40
Signed-off-by: Paurush Garg <[email protected]>
Copy link
Contributor

Choose a reason for hiding this comment

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

We should try to reuse the same manager_test.go file instead of creating a new file for this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks. updated.

}
}

func TestValidateRuleGroup_AcceptsStandardFunctions(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a test case that this validation function successfully failed an invalid rule group for some other issues? I want to make sure that the error is propagated correctly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks. added.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. I have updated to bugfix.

@PaurushGarg PaurushGarg changed the title Adding parser for xfunctions in rule validation Adding parser for Xfunctions in Rule validation Nov 13, 2025
@pull-request-size pull-request-size bot added size/L and removed size/M labels Nov 13, 2025
@PaurushGarg PaurushGarg requested a review from yeya24 November 13, 2025 01:33
CHANGELOG.md Outdated
* [ENHANCEMENT] Distributor: Add a label references validation for remote write v2 request. #7074
* [ENHANCEMENT] Distributor: Add count, spans, and buckets validations for native histogram. #7072
* [BUGFIX] Ring: Change DynamoDB KV to retry indefinitely for WatchKey. #7088
* [FEATURE] Ruler: Add XFunctions validation support. #7111
Copy link
Member

Choose a reason for hiding this comment

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

Could you move change log?
The changelog order is:

* `[CHANGE]`
* `[FEATURE]`
* `[ENHANCEMENT]`
* `[BUGFIX]`

Copy link
Contributor

Choose a reason for hiding this comment

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

I would call it a bugfix instead of a feature. Ruler xfunction support was added in last release but it doesn't work because of this failure

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, it seems a bug rather than feature.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. I have updated to bugfix.

Signed-off-by: Paurush Garg <[email protected]>
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/rules Bits & bobs todo with rules and alerts: the ruler, config service etc. lgtm This PR has been approved by a maintainer size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants