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

plugin_proxy: core: expose more callbacks for golang plugins #7997

Merged
merged 10 commits into from
Oct 16, 2023

Conversation

cosmo0920
Copy link
Contributor

@cosmo0920 cosmo0920 commented Oct 2, 2023

To support hot-reloading with Golang plugins which built on top of calyptia/plugin library, we need to expose more callbacks into Golang interface.

  • Exposure of pre_run callbacks need to ensure only once execution before running with input callback or flush callback
  • Exposure of pre_register callback needs to ensure initialization for waitgroup values before executing register callbacks
  • Expose pause/resume callbacks to synchronize the statuses of input plugins against the lifecycle of fluent-bit itself

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:

  • Example configuration file for the change
  • Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • Run local packaging test showing all targets (including any new ones) build.
  • Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • Documentation required for this feature

Backporting

  • Backport to latest stable release.

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.

@cosmo0920 cosmo0920 temporarily deployed to pr October 2, 2023 08:25 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 temporarily deployed to pr October 2, 2023 08:25 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 temporarily deployed to pr October 2, 2023 08:25 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 temporarily deployed to pr October 2, 2023 08:52 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 force-pushed the cosmo0920-expose-more-callbacks-for-golang-plugins branch from a782c29 to 286e460 Compare October 2, 2023 09:22
@cosmo0920 cosmo0920 temporarily deployed to pr October 2, 2023 09:22 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 temporarily deployed to pr October 2, 2023 09:22 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 temporarily deployed to pr October 2, 2023 09:22 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 temporarily deployed to pr October 2, 2023 09:55 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 marked this pull request as draft October 2, 2023 12:07
@cosmo0920 cosmo0920 force-pushed the cosmo0920-expose-more-callbacks-for-golang-plugins branch from 286e460 to 3b0e51e Compare October 3, 2023 05:11
@cosmo0920 cosmo0920 temporarily deployed to pr October 3, 2023 05:12 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 temporarily deployed to pr October 3, 2023 05:12 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 temporarily deployed to pr October 3, 2023 05:12 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 force-pushed the cosmo0920-expose-more-callbacks-for-golang-plugins branch from 3b0e51e to 25b470d Compare October 3, 2023 05:12
@cosmo0920 cosmo0920 temporarily deployed to pr October 3, 2023 05:13 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 temporarily deployed to pr October 3, 2023 05:13 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 temporarily deployed to pr October 3, 2023 05:13 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 temporarily deployed to pr October 3, 2023 05:41 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 temporarily deployed to pr October 3, 2023 06:59 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 temporarily deployed to pr October 3, 2023 06:59 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 temporarily deployed to pr October 3, 2023 06:59 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 temporarily deployed to pr October 3, 2023 07:26 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 marked this pull request as ready for review October 3, 2023 08:28
@edsiper edsiper merged commit 4b6cfc7 into master Oct 16, 2023
43 of 44 checks passed
@edsiper edsiper deleted the cosmo0920-expose-more-callbacks-for-golang-plugins branch October 16, 2023 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants