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

bin/logstash-plugin update should not include major versions changes by default #16894

Open
robbavey opened this issue Jan 10, 2025 · 1 comment

Comments

@robbavey
Copy link
Member

Currently, running bin/logstash-plugin update will update plugins to the latest version possible, regardless of whether a major version has changed in the plugin.

This may cause issues, and cause the plugin manager to install a version of the plugin which is incompatible with the associated version of Logstash.

The default behavior for plugin updates should be to attempt to install the latest version in the same minor rather than the absolute latest version, but allow that update to be made if required.

@jsvd
Copy link
Member

jsvd commented Jan 13, 2025

diff --git a/lib/bootstrap/bundler.rb b/lib/bootstrap/bundler.rb
index 325222021..eb5d6b08e 100644
--- a/lib/bootstrap/bundler.rb
+++ b/lib/bootstrap/bundler.rb
@@ -266,6 +266,7 @@ module LogStash
         arguments << expand_logstash_mixin_dependencies(options[:update])
         arguments << "--local" if options[:local]
         arguments << "--conservative" if options[:conservative]
+        arguments << "--minor"
       elsif options[:clean]
         arguments << "clean"
       elsif options[:package]

This is the changeset needed to affect the update command.
But it's necessary to:

a) Introduce a new parameter to the update command such as :constraint, that defaults to "minor", but can also be "patch" or "major".
b) Understand how it behaves with the existing conservative parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants