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

Add compatibility on ruby pipeline for plugins not in support matrix #12534

Merged

Conversation

kaisecheng
Copy link
Contributor

@kaisecheng kaisecheng commented Dec 21, 2020

[rn:skip]

This PR is a follow-up of ruby execution engine removal. It adds a better backward compatibility experience for plugins not in the support matrix

follow-up on #12517

@elasticsearch-bot elasticsearch-bot self-assigned this Dec 21, 2020
@yaauie
Copy link
Member

yaauie commented Dec 21, 2020

It is unclear to me how this "adds a better backward compatibility experience for plugins not in the support matrix".

  • What differentiates plugins "not in the support matrix", and why does change this benefit them in particular?
  • Do unsupported plugins create their own Pipeline, and if so which ones? I would consider doing so to be a Very Bad practice in production code, but could see an argument for doing it in tests if there was no other way.
  • Arguably something depends on LogStash::Pipeline.new, and now that a JavaPipeline is returned, are there unexpected side-effects from its initialization, such as queue opening?

@kaisecheng
Copy link
Contributor Author

kaisecheng commented Dec 21, 2020

I check this page to differentiate the plugins we are actively maintaining. For tier 1 & 2 plugins, all require logstash/pipeline are removed, while the others will keep the reference to pipeline.rb. By searching in GitHub, there are two references in the test case of an archived project to LogStash::Pipeline.new. So we are not using it in production. Considering the plugins not list in https://github.com/logstash-plugins, pointing Pipeline to JavaPipeline gives a better chance to keep the old code work. JavaPipeline takes the same parameters in initialize() as Pipeline and provides back-compatibility for deprecated methods(not all of them). I consider JavaPipeline a proper replacement. My knowledge of both pipelines may not be completed. Please let me if I miss something

@kaisecheng
Copy link
Contributor Author

kaisecheng commented Dec 21, 2020

The test cases like this will be beneficial. So, we don't need to change the test cases in every project and keep them running

@kares
Copy link
Contributor

kares commented Dec 22, 2020

@yaauie I was the one to suggest this due a few require 'logstash/pipeline' places.

The require seemed legit (loading whatever pipeline there is in LS not tying things to a "java" pipeline), although it's questionable why anyone except the devutils case would need to require this. Seemed like worth saving a few hops but given it's only present one of the supported plugins (integration-rabbitmq) I have not strong feelings about this.

@kaisecheng
Copy link
Contributor Author

@yaauie Do you have a further concern?

Copy link
Member

@yaauie yaauie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@yaauie yaauie merged commit 6a28ac1 into elastic:main Jan 25, 2022
yaauie pushed a commit to yaauie/logstash that referenced this pull request Jan 25, 2022
@yaauie yaauie added the v8.0.0 label Jan 25, 2022
yaauie added a commit that referenced this pull request Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants