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

[META] detangle pinned transitive rufus scheduler dependency in plugins #12931

Closed
6 tasks done
yaauie opened this issue May 25, 2021 · 1 comment
Closed
6 tasks done
Assignees
Labels

Comments

@yaauie
Copy link
Member

yaauie commented May 25, 2021

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.

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
@kares
Copy link
Contributor

kares commented Mar 14, 2022

with logstash-plugins/logstash-integration-jdbc#97 the work here is now complete
more work, on having a common scheduler mix-in, to be followed at #13773

@kares kares closed this as completed Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants