-
Notifications
You must be signed in to change notification settings - Fork 544
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
MQE: Add support to disable functions+aggregations by name #10384
base: main
Are you sure you want to change the base?
Conversation
8646304
to
28b5513
Compare
pkg/streamingpromql/query.go
Outdated
if e.Func.Name == fName { | ||
return nil, compat.NewNotSupportedError(fmt.Sprintf("'%s' function is disabled", e.Func.Name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In all other cases, we don't differentiate between a feature being unsupported entirely and a feature being disabled by a feature flag:
if e.Func.Name == fName { | |
return nil, compat.NewNotSupportedError(fmt.Sprintf("'%s' function is disabled", e.Func.Name)) | |
if e.Func.Name == fName { | |
return nil, compat.NewNotSupportedError(fmt.Sprintf("'%s' function", e.Func.Name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this is a little more explicitly disabled so the log line is helpful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I follow sorry - isn't it just as explicit as any other feature disabled with a feature flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The others are "enable" which default to true
. This explicitly disables something, which is useful to know in the logs imo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I removed a few instances of "will", as we try to avoid future tense in docs.
Related to #10067