Skip to content

Conversation

@yaauie
Copy link
Contributor

@yaauie yaauie commented Oct 28, 2025

Release notes

What does this PR do?

Implements the plugin mixin (see README.md)

Why is it important/What is the impact to the user?

Provides a path for plugins to ensure that a port is open during #register, and that they will be able to bind to it later in #run so that an unavailable port can be detected and raised in #register where it will affect pipeline status.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files (and/or docker env variables)
  • I have added tests that prove my fix is effective or that my feature works

Author's Checklist

  • [ ]

How to test this PR locally

  1. comment out the change to the gemspec
  2. copy lib/logstash/plugin_mixins/port_management_support.rb into the same path in your local repo
  3. run tests as normal

Related issues

Use cases

  • When a plugin cannot bind to a port, the issue should be raised in #register, which will cause the pipeline to fail to start, instead of in #run where the input itself will be restarted repeatedly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant