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

Remove ruby pipeline #12496

Conversation

kaisecheng
Copy link
Contributor

Fixed: #11236

This PR removes the Ruby Execution Engine
The Java Execution Engine has been the default engine since Logstash 7.0, and is capable of using plugins written in either Ruby or Java; removing the Ruby Execution Engine will not affect our ability to run existing pipelines, but will greatly reduce the surface area of all features and fixes within the engine(s). We will no longer need to target two engines simultaneously.

  • remove Logstash::Pipeline
  • rewrite test cases which depend on ruby pipeline
  • remove Engine.Ruby on java side

@kaisecheng kaisecheng mentioned this pull request Dec 3, 2020
9 tasks
@kaisecheng kaisecheng requested a review from andsel December 7, 2020 15:59
Copy link
Contributor

@andsel andsel left a comment

Choose a reason for hiding this comment

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

Hi @kaisecheng great work, I've left some notes about parts that aren't clear to me

@@ -365,8 +365,7 @@ def execute
# TODO(ph): make it better for multiple pipeline
if results.success?
results.response.each do |pipeline_config|
pipeline_class = pipeline_config.settings.get_value("pipeline.java_execution") ? LogStash::JavaPipeline : LogStash::BasePipeline
pipeline_class.new(pipeline_config)
LogStash::JavaPipeline.new(pipeline_config)
Copy link
Contributor

Choose a reason for hiding this comment

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

this could be put in one-liner

results.response.each { |pipeline_config| LogStash::JavaPipeline.new(pipeline_config) }

logstash-core/spec/conditionals_spec.rb Outdated Show resolved Hide resolved
@@ -47,7 +47,7 @@
LogStash::SETTINGS.set_value("monitoring.enabled", false)
end

let(:pipeline) { LogStash::Pipeline.new(config) }
let(:pipeline) { LogStash::JavaPipeline.new(config, nil) }
Copy link
Contributor

Choose a reason for hiding this comment

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

nil as second parameter shouldn't be needed due to JavaPipeline#initialize signature:

def initialize(pipeline_config, namespaced_metric = nil, agent = nil)

@kaisecheng kaisecheng requested a review from andsel December 14, 2020 09:53
Copy link
Contributor

@andsel andsel left a comment

Choose a reason for hiding this comment

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

This LGTM, I've tested locally and Logstash run correctly.

@kaisecheng kaisecheng merged commit 5239fc9 into elastic:remove-ruby-execution-engine Dec 14, 2020
@kaisecheng kaisecheng mentioned this pull request Dec 14, 2020
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants