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

fix(custom_builder): Correctly handle serializers and parsers #13446

Merged
merged 3 commits into from
Jun 20, 2023

Conversation

srebhan
Copy link
Contributor

@srebhan srebhan commented Jun 14, 2023

resolves #13441

This PR fixes the handling of serializers and solves #13441. During debugging I also noticed that, in case of multiple plugin instances, the default parser and serializer is not correctly selected if one of the other plugins already defines a data_format. Furthermore, processors.execd requires a special treatment as it requires both a serializer and parser of the same type with the defined data_format. To handle those cases correctly the internal code had to be changed quite a bit but is much cleaner and much more robust IMO.

@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Jun 14, 2023
@telegraf-tiger
Copy link
Contributor

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Jun 15, 2023
@powersj
Copy link
Contributor

powersj commented Jun 15, 2023

Hmm something is up with the influx_upstream option, this built a custom version with the influx serializer, but then failed to run because influx_upstream of course missing:

[[inputs.exec]]
commands = ["echo metric,tag=1 value=42"]
data_format = "json"

[[outputs.file]]
data_format = "influx_upstream"

@srebhan
Copy link
Contributor Author

srebhan commented Jun 15, 2023

@powersj will take a look...

@srebhan
Copy link
Contributor Author

srebhan commented Jun 20, 2023

@powersj I do not see any influx_upstream serializer... Do you expect me to output a warning or something?

@powersj
Copy link
Contributor

powersj commented Jun 20, 2023

Do you expect me to output a warning or something?

facepalm - it's a parser not a serializer.... let me give this one final look over

@powersj powersj merged commit a2125f0 into influxdata:master Jun 20, 2023
24 checks passed
powersj pushed a commit that referenced this pull request Jun 21, 2023
@srebhan srebhan added this to the v1.27.1 milestone Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

custom_builder no find serializer
2 participants