-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
We currently effectively pin to an old rufus scheduler 3.0.9 through transitive dependency declarations, and need to relax this dependency on all plugins in order to allow pulling in a more modern version.
The old 3.0.9 uses at least one deprecated ruby API (Fixnum), which results in deprecations being written to stderr, and when stderr is not available, this results in an Error: Broken pipe - <STDERR> Exception Errno::EPIPE, and subsequent plugin crash that propagates up to crash the pipeline. This issue was fixed in Rufus Scheduler 3.3.3, and is present in 3.4+
This meta issue is meant to track the "unpinning" work across plugins.
- http poller input - pins to
~> 3.0.9
"However, I can't upgrade to v3.2.2 immediately since other logstash plugins are using old version."
Deps: allow any scheduler version with plugin logstash-plugins/logstash-input-http_poller#132 - jdbc integration - pins to rufus-scheduler
< 3.5
Fix: compatibility with all (>= 3.0) rufus-scheduler versions logstash-plugins/logstash-integration-jdbc#97
"limitation is required for jdbc-static loading schedule" - logstash-output-cloudwatch - pins to
~> 3.0.9"latest" (as of 2015-04-27)
Deps: unpin rufus-scheduler dependency logstash-plugins/logstash-output-cloudwatch#20
We need to change the dependency declaration of each in such a way that it is valid in the presence of the other two, or else we will enter a situation where one plugin cannot be upgraded independently of the others. I believe the compound requirement '~> 3.0', '>= 3.0.9' for both that are currently pinned to ~> 3.0.9 will be enough.
Rufus::Scheduler is also used by these gems and we need to make sure there aren't any breaking changes:
- ES input
Rufus::Scheduler.new(:max_work_threads => 1); @scheduler.cron(arg) { }; .join; @scheduler.stop - exec input
Rufus::Scheduler.new(:max_work_threads => 1); @scheduler.cron ... - translate filter :
def start_scheduler
@scheduler = Rufus::Scheduler.new
@scheduler.interval("#{@refresh_interval}s", :overlap => false) do
reload_dictionary
end
end
def stop_scheduler(initial = false)
# ...
@scheduler.shutdown(:wait) if @scheduler
end