Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign uplock file prevents install with --version of plugins that are needed by others #3152
Comments
jsvd
added
the
blocker
label
May 4, 2015
jsvd
referenced this issue
May 4, 2015
Merged
use either local core lib dir or logstash-core gem #3111
jsvd
changed the title from
lock file prevents upgrade of plugins that are needed by others
to
lock file prevents install with --version of plugins that are needed by others
May 4, 2015
suyograo
added
the
bug
label
May 5, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jsvd
May 5, 2015
Member
Also a simple uninstall of a plugin that others depend on "fails":
% bin/plugin list tcp
logstash-input-tcp
logstash-output-tcp
% bin/plugin uninstall logstash-input-tcp
Uninstalling logstash-input-tcp
% bin/plugin list tcp
logstash-input-tcp
logstash-output-tcp
% bin/plugin uninstall logstash-input-tcp
ERROR: Uninstall Aborted, message: This plugin has not been previously installed, aborting
|
Also a simple uninstall of a plugin that others depend on "fails":
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
I confirm this issue. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jsvd
May 5, 2015
Member
The uninstalled plugin remains in vendor/bundle:
% find . -name *logstash-input-tcp*
./vendor/bundle/jruby/1.9/gems/logstash-input-tcp-0.1.5
./vendor/bundle/jruby/1.9/gems/logstash-input-tcp-0.1.5/logstash-input-tcp.gemspec
./vendor/bundle/jruby/1.9/specifications/logstash-input-tcp-0.1.5.gemspec
And while it's removed from Gemfile, it's still present in the .lock:
% grep "input-tcp" Gemfile*
Gemfile.jruby-1.9.lock: logstash-input-tcp
Gemfile.jruby-1.9.lock: logstash-input-tcp (0.1.5)
|
The uninstalled plugin remains in vendor/bundle:
And while it's removed from Gemfile, it's still present in the .lock:
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
is that a regression from rc3 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
This is present in rc2 and rc3 as well, haven't tested rc1.. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
colinsurprenant
May 5, 2015
Contributor
ok, so I am "relieved" that this is not a #3111 regression and we should decided if we make that a rc4 blocker or not.
|
ok, so I am "relieved" that this is not a #3111 regression and we should decided if we make that a rc4 blocker or not. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
colinsurprenant
May 5, 2015
Contributor
Ok, here's the thing: it is totally normal that a plugin, or gem, that is a dependency of another plugin/gem is not uninstalled we asked to do so. To be able to remove it you'll have to remove the plugin/gem that depends on the one you are trying to remove.
I would even add: thanks to bundler for doing that, it avoid potential problem where if you uninstall a dependency, the plugin/gem that depend on it will obviously fail. If you were able to uninstall logstash-input-tcp using logstash-input-syslog would crash.
So, I am not sure how to deal with this, but for me it's more a UI problem. could we check that and report a warning to the user saying: sorry, impossible to uninstall ?
|
Ok, here's the thing: it is totally normal that a plugin, or gem, that is a dependency of another plugin/gem is not uninstalled we asked to do so. To be able to remove it you'll have to remove the plugin/gem that depends on the one you are trying to remove. I would even add: thanks to bundler for doing that, it avoid potential problem where if you uninstall a dependency, the plugin/gem that depend on it will obviously fail. If you were able to uninstall So, I am not sure how to deal with this, but for me it's more a UI problem. could we check that and report a warning to the user saying: sorry, impossible to uninstall ? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ph
May 5, 2015
Member
Keep in mind some plugins depends on other plugins only to run their tests but this dependencies is specified as a runtime dependency and not a development dependency in their gemspec. There is an open issue to clear them in #2078.
|
Keep in mind some plugins depends on other plugins only to run their tests but this dependencies is specified as a runtime dependency and not a development dependency in their gemspec. There is an open issue to clear them in #2078. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
suyograo
May 5, 2015
Member
How about adding a --force option to remove all associated dependencies and plugins by walking the dependency tree? Not sure if this dependency graph/API is available, but just throwing it out there.
|
How about adding a |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jsvd
May 6, 2015
Member
I agree that uninstall should not work if other gems depend on it. "can't uninstall this due to dependencies" seems to be the quickest and still sane fix to this situation, as @colinsurprenant suggested.
The current behaviour just isn't right:
% bin/plugin uninstall logstash-input-tcp
Uninstalling logstash-input-tcp
% bin/logstash -e 'input { tcp { port => 3333} } filter { split {} mutate { remove_field => [ "message" ] } } output { stdout { codec => rubydebug } }'
Logstash startup completed
^CSIGINT received. Shutting down the pipeline. {:level=>:warn}
Logstash shutdown completed
% bin/plugin uninstall logstash-input-tcp
ERROR: Uninstall Aborted, message: This plugin has not been previously installed, aborting
% bin/logstash -e 'input { tcp { port => 3333} } filter { split {} mutate { remove_field => [ "message" ] } } output { stdout { codec => rubydebug } }'
Logstash startup completed
^CSIGINT received. Shutting down the pipeline. {:level=>:warn}
Logstash shutdown completed
|
I agree that uninstall should not work if other gems depend on it. "can't uninstall this due to dependencies" seems to be the quickest and still sane fix to this situation, as @colinsurprenant suggested.
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
After talking to @jsvd I removed my comment as It was pointless. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ph
May 6, 2015
Member
Maybe give the user a nice warning message like this?
(taken from the gem)
You have requested to uninstall the gem:
arr-pm-0.0.9
fpm-1.3.3 depends on arr-pm (~> 0.0.9)
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN]
|
Maybe give the user a nice warning message like this? (taken from the gem)
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
+1 on nice warnings |
suyograo
removed
the
blocker
label
May 6, 2015
ph
added
v1.5.1
known issue
labels
May 14, 2015
This was referenced May 14, 2015
suyograo
assigned
jsvd
May 15, 2015
suyograo
added
the
bundler
label
May 15, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Some users on IRC are reporting this as well |
suyograo
added
v1.5.2
and removed
v1.5.1
labels
Jun 17, 2015
jordansissel
added
v1.5.3
and removed
v1.5.2
labels
Jul 6, 2015
suyograo
assigned
purbon
and unassigned
jsvd
Jul 15, 2015
suyograo
added
v1.6.0
and removed
v1.5.3
labels
Jul 22, 2015
suyograo
added
plugin manager
and removed
v1.6.0
labels
Sep 25, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
cdenneen
Nov 2, 2015
understood this is outstanding bug but what is a work around for now?
1.5.4 shipped with mutate locked to 1.0.1 which has a bug in it.
Need to install 1.0.2 but lockfile isn't allowing.
cdenneen
commented
Nov 2, 2015
|
understood this is outstanding bug but what is a work around for now? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
purbon
Nov 3, 2015
Contributor
@cdenneen if you take a look at the .lock file, the only plugin that has mutate as dependency is the multiline filter, a good workaround to fix this for now would be to uninstall the multiline, then update the mutate filter and so on in case you like to have multiline back. hope this helps.
That multiline has as a runtime dependency mutate, makes no sense. Will fix this now.
|
@cdenneen if you take a look at the .lock file, the only plugin that has mutate as dependency is the multiline filter, a good workaround to fix this for now would be to uninstall the multiline, then update the mutate filter and so on in case you like to have multiline back. hope this helps. That multiline has as a runtime dependency mutate, makes no sense. Will fix this now. |
purbon
referenced this issue
Nov 3, 2015
Closed
make logstash-filter-mutate a development dependency #21
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
cdenneen
Nov 5, 2015
Wouldn't the lock file dependency be better using ~> 1.0.1 syntax so all 1.0.x updates are permitted like 1.0.2?
cdenneen
commented
Nov 5, 2015
|
Wouldn't the lock file dependency be better using ~> 1.0.1 syntax so all 1.0.x updates are permitted like 1.0.2? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
I amend my previous messages, this is still an issue. |
purbon
referenced this issue
Nov 30, 2015
Closed
Provide feedback to users when trying to uninstall plugins that are dependencies of others. #4288
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
purbon
Nov 30, 2015
Contributor
A feedback loop has been proposed in #4288, this does not fix the issue per se, but provides feedback to users about the dependency tree involved when trying to uninstall a plugin.
|
A feedback loop has been proposed in #4288, this does not fix the issue per se, but provides feedback to users about the dependency tree involved when trying to uninstall a plugin. |
jsvd commentedMay 4, 2015
In a release, the .lock file will contain the reference to a plugin's locked version even after being uninstalled IF other plugins depend on it. Example: