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

concurrent-ruby gem pin is not precise enough #4141

Closed
jordansissel opened this issue Nov 5, 2015 · 23 comments
Closed

concurrent-ruby gem pin is not precise enough #4141

jordansissel opened this issue Nov 5, 2015 · 23 comments
Assignees
Labels

Comments

@jordansissel
Copy link
Contributor

# From a plugin
% bundle exec rspec
RuntimeError: Logstash expects concurrent-ruby version 0.9.1 and version 0.9.2 is installed, please verify this patch: /Users/
jls/.rvm/gems/jruby-1.7.22/gems/logstash-core-2.0.0-java/lib/logstash/patches/silence_concurrent_ruby_warning.rb

The problem is that bundle install fetched 0.9.2 because our dependency on ~> 0.9.1 and our concurrent ruby warning thingy patch barfs if we are using anything but 0.9.1

@jordansissel
Copy link
Contributor Author

(this only affects master, really)

@jordansissel
Copy link
Contributor Author

I was going to send a patch, but I'm not entirely sure at a glance if we should pin exactly 0.9.1 (in gem dependency) or relax the silence_concurrent_ruby patch to support 0.9.x

@jordansissel
Copy link
Contributor Author

Over to @ph for some insight (based on authorship of b863ace)

@ph
Copy link
Contributor

ph commented Nov 5, 2015

Oh oh :(

@ph
Copy link
Contributor

ph commented Nov 5, 2015

When we merged the shutdown changes the dependency for concurrent-ruby was also changed.

3bdac41#diff-1176bf3d867047e464f26cb769921d70R26

I think concurrent-ruby is really close to release 1.0

@ph ph added the v2.1.0 label Nov 5, 2015
@ph
Copy link
Contributor

ph commented Nov 5, 2015

I will review if they changed their warnings.

@Russell-IO
Copy link

@jordansissel - this affects logstash 2.0.0 & 1.5.5 as far as I can tell.
root@ip-10-12-0-62:/var/log/logstash# /opt/logstash/bin/logstash agent -f /opt/logstash-configuration/green/conf.d/v2/output/apache/
RuntimeError: Logstash expects concurrent-ruby version 0.9.1 and version 0.9.2 is installed, please verify this patch: /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.0.0-java/lib/logstash/patches/silence_concurrent_ruby_warning.rb
(root) at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.0.0-java/lib/logstash/patches/silence_concurrent_ruby_warning.rb:53
require at org/jruby/RubyKernel.java:1040
(root) at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.0.0-java/lib/logstash/patches.rb:1
require at org/jruby/RubyKernel.java:1040
(root) at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.0.0-java/lib/logstash/patches.rb:6
require at org/jruby/RubyKernel.java:1040
(root) at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.0.0-java/lib/logstash/environment.rb:1
require at org/jruby/RubyKernel.java:1040
(root) at /opt/logstash/lib/bootstrap/environment.rb:48

RuntimeError: Logstash expects concurrent-ruby version 0.9.1 and version 0.9.2 is installed, please verify this patch: /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.5-java/lib/logstash/patches/silence_concurrent_ruby_warning.rb
(root) at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.5-java/lib/logstash/patches/silence_concurrent_ruby_warning.rb:53
require at org/jruby/RubyKernel.java:1040
(root) at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.5-java/lib/logstash/patches.rb:1
require at org/jruby/RubyKernel.java:1040
(root) at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.5-java/lib/logstash/patches.rb:6
require at org/jruby/RubyKernel.java:1040
(root) at /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-1.5.5-java/lib/logstash/environment.rb:1
require at org/jruby/RubyKernel.java:1040
(root) at /opt/logstash/lib/bootstrap/environment.rb:48

@Russell-IO
Copy link

issue seems to be in /opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.0.0-java/lib/logstash/patches/silence_concurrent_ruby_warning.rb - raising an exception ..
Does logstash need this patch with concurrenty-ruby 0.9.2 ?

@purbon
Copy link
Contributor

purbon commented Nov 5, 2015

just hit this issue after rebasing #3583 from master.

@purbon
Copy link
Contributor

purbon commented Nov 5, 2015

@ph I think, the best for now would be fix the version. We can always update to a new one as soon as they release it.

@ph
Copy link
Contributor

ph commented Nov 5, 2015

@jordansissel I suggest we use 0.9.2 and relax the fix to match 0.9.X.

This warning will go away in future concurrent-ruby version because they have changed their mind and they will keep supporting JDK7 see ruby-concurrency/concurrent-ruby#435

So once 1.0 is released we can drop that patch.

@ph
Copy link
Contributor

ph commented Nov 5, 2015

I also make the patch not applied and not raise anything if the version doesn't match.

@purbon
Copy link
Contributor

purbon commented Nov 5, 2015

+1 on fixing this as you proposed. I guess we can move forward and get this done soon. Otherwise all builds are broken for now.

@ph
Copy link
Contributor

ph commented Nov 5, 2015

nevermind the patch isn't need ruby-concurrency/concurrent-ruby#440 this is 0.9.2 release.

ph added a commit to ph/logstash that referenced this issue Nov 5, 2015
warning and they are commiting to support the 1.X release for JDK7

Fixes elastic#4141
ph added a commit to ph/logstash that referenced this issue Nov 5, 2015
warning and they are commiting to support the 1.X release for JDK7

Fixes elastic#4141
@purbon
Copy link
Contributor

purbon commented Nov 5, 2015

@ph can we make a PR out of it?

ph added a commit to ph/logstash that referenced this issue Nov 5, 2015
The team behind concurrent ruby will now support JDK 7 in the 1.x
release

Fixes elastic#4141
ph added a commit to ph/logstash that referenced this issue Nov 5, 2015
The team behind concurrent ruby will now support JDK 7 in the 1.x
release

Fixes elastic#4141
ph added a commit that referenced this issue Nov 5, 2015
The team behind concurrent ruby will now support JDK 7 in the 1.x
release

Fixes #4141

Fixes #4146
@ph ph closed this as completed in 972e13d Nov 5, 2015
ph added a commit that referenced this issue Nov 5, 2015
The team behind concurrent ruby will now support JDK 7 in the 1.x
release

Fixes #4141

Fixes #4146
@ph
Copy link
Contributor

ph commented Nov 5, 2015

@Russell-IO did you update the plugins in your installation before getting that error?
What packages are you using (deb/rpm) ?

samcday pushed a commit to samcday/logstash-output-kinesis that referenced this issue Nov 6, 2015
samcday pushed a commit to samcday/logstash-output-kinesis that referenced this issue Nov 6, 2015
@purbon
Copy link
Contributor

purbon commented Nov 6, 2015

@suyograo @ph we need to release a point release to get this fix upstream, hitting this issue when doing work in the twitter plugin.

skywalker% bundle exec rspec
RuntimeError: Logstash expects concurrent-ruby version 0.9.1 and version 0.9.2 is installed, please verify this patch: /Users/purbon/.rbenv/versions/jruby-1.7.20/lib/ruby/gems/shared/gems/logstash-core-2.0.0-java/lib/logstash/patches/silence_concurrent_ruby_warning.rb
           (root) at /Users/purbon/.rbenv/versions/jruby-1.7.20/lib/ruby/gems/shared/gems/logstash-core-2.0.0-java/lib/logstash/patches/silence_concurrent_ruby_warning.rb:53
          require at org/jruby/RubyKernel.java:1072
           (root) at /Users/purbon/.rbenv/versions/jruby-1.7.20/lib/ruby/gems/shared/gems/logstash-core-2.0.0-java/lib/logstash/patches.rb:1
          require at org/jruby/RubyKernel.java:1072
           (root) at /Users/purbon/.rbenv/versions/jruby-1.7.2

@ph
Copy link
Contributor

ph commented Nov 6, 2015

We will next week, I've release beats with a constraint on 0.9.1 this
should fix the case when people where updating their plugins.

On Fri, Nov 6, 2015 at 5:31 AM, Pere Urbón [email protected] wrote:

@suyograo https://github.com/suyograo @ph https://github.com/ph we
need to release a point release to get this fix upstream, hitting this
issue when doing work in the twitter plugin.

skywalker% bundle exec rspec
RuntimeError: Logstash expects concurrent-ruby version 0.9.1 and version 0.9.2 is installed, please verify this patch: /Users/purbon/.rbenv/versions/jruby-1.7.20/lib/ruby/gems/shared/gems/logstash-core-2.0.0-java/lib/logstash/patches/silence_concurrent_ruby_warning.rb
(root) at /Users/purbon/.rbenv/versions/jruby-1.7.20/lib/ruby/gems/shared/gems/logstash-core-2.0.0-java/lib/logstash/patches/silence_concurrent_ruby_warning.rb:53
require at org/jruby/RubyKernel.java:1072
(root) at /Users/purbon/.rbenv/versions/jruby-1.7.20/lib/ruby/gems/shared/gems/logstash-core-2.0.0-java/lib/logstash/patches.rb:1
require at org/jruby/RubyKernel.java:1072
(root) at /Users/purbon/.rbenv/versions/jruby-1.7.2


Reply to this email directly or view it on GitHub
#4141 (comment).

ph
Software Engineer

@purbon
Copy link
Contributor

purbon commented Nov 6, 2015

@ph makes sense. I think a lesson to be learn form this, is be careful with open ranges in dependencies, even small ones can cause trouble 👍 thanks man!

@driskell
Copy link
Contributor

I'm seeing this happen when plugins are updated on Logstash 2.0.0

If you run bin/plugin update logstash-input-courier for example, it ends up upgrading the concurrent-ruby gem too. Could it because a dependency on logstash-core means when updating a plugin it updates all involved dependencies too?

@driskell
Copy link
Contributor

Any advice on how to fix an installation broken by this?

@driskell
Copy link
Contributor

I managed to fix it by adding gem "concurrent-ruby", "0.9.1" to the Gemfile and then updating any plugin, such as bin/plugin update logstash-input-tcp. Even if the plugin doesn't update it correctly rolls back the concurrent-ruby gem

@ph
Copy link
Contributor

ph commented Nov 10, 2015

@driskell thanks for following this up, you can can also do bin/plugin install --no-verify which should only update the added dependencies.

ph added a commit that referenced this issue Nov 19, 2015
The team behind concurrent ruby will now support JDK 7 in the 1.x
release

Fixes #4141

Fixes #4146
samcday pushed a commit to samcday/logstash-output-kinesis that referenced this issue Sep 2, 2017
gregsterin pushed a commit to gregsterin/logstash-output-kinesis that referenced this issue Jan 17, 2018
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

5 participants