elastic / elastic/logstash

Uninstalling a plugin doesn't work even if the plugin has no cross dependencies

Open
#5,286 0 comments 0 reactions 0 assignees View on GitHub
bug plugin manager v5.5.0
Dominant language
Java
Stars
14.9k
Forks
3.5k
Avg merge
1d 4h
Merged PRs (30d)
88

Description

Scenario to reproduce:

```
bin/logstash-plugin install logstash-filter-qatest
bin/logstash-plugin uninstall logstash-filter-qatest
```

This will make logstash goes in a retry loop..

```
Uninstalling logstash-filter-qatest
Error NoMethodError, retrying 1/10
undefined method `path' for #
WARNING: SSLSocket#session= is not supported
Error NoMethodError, retrying 2/10
```

Adding **DEBUG=1** give more feedback.

```
Using logstash-output-xmpp 3.0.1
0: logstash-output-xmpp (3.0.1) from /opt/logstash/vendor/bundle/jruby/1.9/specifications/logstash-output-xmpp-3.0.1.gemspec
Installing sawyer 0.6.0
0: sawyer (0.6.0) from /opt/logstash/vendor/bundle/jruby/1.9/specifications/sawyer-0.6.0.gemspec
Installing octokit 3.8.0
0: octokit (3.8.0) from /opt/logstash/vendor/bundle/jruby/1.9/specifications/octokit-3.8.0.gemspec
Using bundler 1.9.10
0: bundler (1.9.10) from /opt/logstash/vendor/bundle/jruby/1.9/specifications/bundler-1.9.10.gemspec
Bundle complete! 120 Gemfile dependencies, 211 gems now installed.
Gems in the group development were not installed.
Bundled gems are installed into ./vendor/bundle.
NoMethodError: undefined method `path' for #
loaded_from at /opt/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/rubygems_ext.rb:31
gems_dir at /opt/logstash/vendor/jruby/lib/ruby/shared/rubygems/basic_specification.rb:189
find_full_gem_path at /opt/logstash/vendor/jruby/lib/ruby/shared/rubygems/basic_specification.rb:107
find_full_gem_path at /opt/logstash/vendor/jruby/lib/ruby/shared/rubygems/specification.rb:1769
full_gem_path at /opt/logstash/vendor/jruby/lib/ruby/shared/rubygems/basic_specification.rb:120
full_gem_path at /opt/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/rubygems_ext.rb:25
clean at /opt/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/runtime.rb:146
each at org/jruby/RubyArray.java:1613
each at /opt/logstash/vendor/jruby/lib/ruby/1.9/forwardable.rb:201
clean at /opt/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/runtime.rb:145
run at /opt/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/cli/clean.rb:11
run at /opt/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/cli/install.rb:112
install at /opt/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/cli.rb:155
run at /opt/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/vendor/thor/lib/thor/command.rb:27
invoke_command at /opt/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/vendor/thor/lib/thor/invocation.rb:126
dispatch at /opt/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/vendor/thor/lib/thor.rb:359
start at /opt/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/vendor/thor/lib/thor/base.rb:440
start at /opt/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/cli.rb:10
execute_bundler at /opt/logstash/lib/bootstrap/bundler.rb:151
invoke! at /opt/logstash/lib/bootstrap/bundler.rb:112
execute at /opt/logstash/lib/pluginmanager/uninstall.rb:31
run at /opt/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67
execute at /opt/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/subcommand/execution.rb:11
run at /opt/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67
run at /opt/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132
(root) at /opt/logstash/lib/pluginmanager/main.rb:41
```

Contributor guide

Open the contributing guide

Research direction

Run the install/uninstall reproduction with DEBUG=1, then read lib/pluginmanager/uninstall.rb and lib/bootstrap/bundler.rb at the stack-trace entry points. Trace the Bundler cleanup failure and verify that uninstalling logstash-filter-qatest completes without the NoMethodError or retry loop.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.