-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[processor/transform] Remove functions option from config #12973
[processor/transform] Remove functions option from config #12973
Conversation
/cc @kentquirk |
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.
Is this a breaking change?
Technically yes. But since this component is alpha we can still make config changes in breaking ways. Also, the config option, when used, breaks the processor. |
@mx-psi Actually the |
Right, and it's a private field, so probably even if it had a tag you wouldn't be able to set it via mapstructure, and it does not affect the Go API 👍 You have convinced me :) |
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'm late to the party, but this is good. One question, but I'm happy if the answer is "it's fine."
@@ -23,13 +23,13 @@ import ( | |||
) | |||
|
|||
func Test_DefaultFunctions(t *testing.T) { |
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.
This tests if there are any unexpected values, but not if any are missing.
Is there any percentage in also turning the test around?
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.
@kentquirk I think technically the test would pass incorrectly if actual
contained the same function definition an exact amount of times to match the length of expected
and the function name was in expected
. I could add more logic into the check, but it might be overcomplicating things. The main goal of the test is to ensure the signal-specific Functions
values uses common.Functions
.
Description:
The transformprocessor had a setting in configuration called
functions
that was "no-op". Setting this field would actually break the transform processor because the TQL would have no working functions. The long term intention was that users would be able to register their own functions to be usable with the TQL, but there is no implementation to do that currently.This PR removes the unused config option, which will work towards providing a declarative config syntax.
Link to tracking Issue:
Related to #11852
Testing:
Ran unit tests
Documentation:
This field is not currently documented. Since the processor is
alpha
, we can make breaking config changes without considering backwards compatibility.