-
Notifications
You must be signed in to change notification settings - Fork 1.9k
plugin_proxy: enable event_type specification for proxy plugins (4.2 Backport) #11241
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
base: 4.2
Are you sure you want to change the base?
plugin_proxy: enable event_type specification for proxy plugins (4.2 Backport) #11241
Conversation
… malloc Changing intialization to use calloc instead of malloc so that emtpy fields are 0 initialized. Specifically for the event_type addition. Signed-off-by: jmccormick7 <[email protected]>
This commit adds a runtime shell test for the go plugin interface. A dummy go output plugin is added to the directories, and a test that builds the plugin shared object and then tests that it works and writes the output. This test ensures that the go proxy interface is working as expected. This was tested in the devcontainer using ctest. Signed-off-by: jmccormick7 <[email protected]>
Signed-off-by: jmccormick7 <[email protected]>
This commit makes the go proxy a test that only runs on Linux using the CMAKE_SYSTEM_NAME. It also removes an autogenerated header file from the go compile that should not have been commited. Signed-off-by: jmccormick7 <[email protected]>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@cosmo0920 I added this and one other pr (back porting to 4.1). I saw that the main pr was added to the 5.0 milestone. I just wanted to ask about the possibility of getting the back port in an earlier release for 4.2 as this is backwards compatible. I completely understand if it's preferred to wait until a major release as it is a feature change. I just figured it was worth checking in on to see if it could get released sooner. I'm more than happy to do anything additional that may be needed to support this if there's anything missing or areas where this falls short. Thanks! |
This PR adds event_type to the flb_plugin_proxy_def struct. This allows for the setting of event_type to a value other than the default log only initialization.
This PR is a backport for FluentBit 4.2 that matches the approved changes in PR #11011
In the flb_plugin_proxy_register function default behavior is enforced by checking for unset event_type values. When unset (a value of 0) then log behavior is defaulted. No need for incorrect value checking since this was not a set field in the past. Unset fields are set as current behavior dictates and future use cases using incorrect values can be treated as user error.
Input use case does not use event-type and is unaffected by this change.
Addresses #10995
This corresponding PR in the fluent-bit-go library enables the ability to allow Go plugins to register their event types fluent/fluent-bit-go#80
Enter
[N/A]in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-testlabel to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.