elastic / jarvis

Logstash's ChatOps bot, J.A.R.V.I.S.
41 stars 28 forks source link

Can't publish the logstash input beats. #86

Open ph opened 6 years ago

ph commented 6 years ago

This seems to be related to the environment, I think we should sandbox the installation of gems in a random path when doing the bundle install. I've tried to reproduce it with a clean JRuby env or with a tainted env, but I didn't run into any issues.

[13:26] 
(sadpanda) An error occurred in publish: Jarvis::SubprocessFailure - subprocess failed with code 6
/home/jarvis/jarvis/lib/jarvis/exec.rb:30:in `execute'
/home/jarvis/jarvis/lib/jarvis/commands/publish.rb:103:in `block (2 levels) in execute'
/home/jarvis/jarvis/lib/jarvis/commands/publish.rb:99:in `each'
/home/jarvis/jarvis/lib/jarvis/commands/publish.rb:99:in `block in execute'
/home/jarvis/jarvis/lib/jarvis/commands/publish.rb:53:in `each'
/home/jarvis/jarvis/lib/jarvis/commands/publish.rb:53:in `execute'
/home/jarvis/.rvm/gems/ruby-2.4.0/gems/clamp-1.0.1/lib/clamp/command.rb:68:in `run'
/home/jarvis/jarvis/lib/jarvis/clamp_delegate.rb:56:in `block in callback'
/home/jarvis/jarvis/lib/jarvis/mixins/pool_delegate.rb:16:in `block in pool_execute'
/home/jarvis/.rvm/gems/ruby-2.4.0/gems/concurrent-ruby-0.9.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:331:in `run_task'
/home/jarvis/.rvm/gems/ruby-2.4.0/gems/concurrent-ruby-0.9.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in `block (3 levels) in create_worker'
/home/jarvis/.rvm/gems/ruby-2.4.0/gems/concurrent-ruby-0.9.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:303:in `loop'
/home/jarvis/.rvm/gems/ruby-2.4.0/gems/concurrent-ruby-0.9.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:303:in `block (2 levels) in create_worker'
/home/jarvis/.rvm/gems/ruby-2.4.0/gems/concurrent-ruby-0.9.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:302:in `catch'
/home/jarvis/.rvm/gems/ruby-2.4.0/gems/concurrent-ruby-0.9.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:302:in `block in create_worker'

Logs from this execution:
Cloning repo
Switching branches
(freddie) Successful Travis run detected!
Running command
PWD

/tmp/studtmp-3a30e39f26dc90dbfd07f1bb4baa5fb1e535c4a797965eeb86802aa2456a/logstash-input-beats
Warning: PATH set to RVM ruby but GEM_HOME and/or GEM_PATH not set, see:
    https://github.com/rvm/rvm/issues/3212

Warning! PATH is not properly set up, $GEM_HOME is not set.
         Usually this is caused by shell initialization files. Search for 'PATH=...' entries.
         You can also re-add RVM to your profile by running: 'rvm get stable --auto-dotfiles'.
         To fix it temporarily in this shell session run: 'rvm use ruby-2.4.0'.
         To ignore this error add rvm_silence_path_mismatch_check_flag=1 to your ~/.rvmrc file.
Using /home/jarvis/.rvm/gems/jruby-1.7.25
Using /home/jarvis/.rvm/gems/jruby-1.7.25
Ignoring executable-hooks-1.3.2 because its extensions are not built.  Try: gem pristine executable-hooks --version 1.3.2
Ignoring gem-wrappers-1.2.7 because its extensions are not built.  Try: gem pristine gem-wrappers --version 1.2.7
Ignoring jruby-launcher-1.1.2-java because its extensions are not built.  Try: gem pristine jruby-launcher --version 1.1.2
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Fetching dependency metadata from https://rubygems.org/
Resolving dependencies.................................................................................................................................................................................................................................................................................................................................................................................
Bundler could not find compatible versions for gem "concurrent-ruby":
  In Gemfile:
    logstash-input-beats java was resolved to 5.0.2, which depends on
logstash-core-plugin-api (<= 2.99, >= 1.60) java was resolved to 1.60.0,
which depends on
logstash-core (<= 2.4.99, >= 2.4.0.snapshot1) java was resolved to
2.4.0.snapshot1, which depends on
          concurrent-ruby (= 0.9.2) java

   logstash-input-beats java was resolved to 5.0.2, which depends on
      concurrent-ruby (~> 1.0) java
Bundler could not find compatible versions for gem "method_source":
  In Gemfile:
    pry java was resolved to 0.10.1, which depends on
      method_source (~> 0.9.0) java

   logstash-input-beats java was resolved to 5.0.2, which depends on
logstash-core-plugin-api (<= 2.99, >= 1.60) java was resolved to 2.1.1,
which depends on
logstash-core (= 5.0.0.alpha3.snapshot4) java was resolved to
5.0.0.alpha3.snapshot4, which depends on
          pry (~> 0.10.1) java was resolved to 0.10.1, which depends on
            method_source (~> 0.8.1) java
ph commented 6 years ago

I did release the plugin manually.