-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
plugins: improve
remove
command to support multiple plugins (#17030)
Removal works in a single pass by finding plugins that would have unmet dependencies if all of the specified plugins were to be removed, and proceeding with the removal only if no conflicts were created. > ~~~ > ╭─{ rye@perhaps:~/src/elastic/logstash@main (pluginmanager-remove-multiple ✘) } > ╰─● bin/logstash-plugin remove logstash-input-syslog logstash-filter-grok > Using system java: /Users/rye/.jenv/shims/java > Resolving dependencies...... > Successfully removed logstash-input-syslog > Successfully removed logstash-filter-grok > [success (00:00:05)] ~~~ (cherry picked from commit 0895588)
- Loading branch information
1 parent
e211af5
commit 7ed3a9d
Showing
11 changed files
with
349 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
|
||
cd "$( dirname "$0" )" | ||
find . -name '*.gemspec' | xargs -n1 gem build |
26 changes: 26 additions & 0 deletions
26
qa/integration/fixtures/plugins/logstash-filter-four_depends_on_one_and_three.gemspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Gem::Specification.new do |s| | ||
s.name = File.basename(__FILE__, ".gemspec") | ||
s.version = '0.1.1' | ||
s.licenses = ['Apache-2.0'] | ||
s.summary = "A dummy plugin with two plugin dependencies" | ||
s.description = "This plugin is only used in the acceptance test" | ||
s.authors = ["Elasticsearch"] | ||
s.email = '[email protected]' | ||
s.homepage = "http://www.elasticsearch.org/guide/en/logstash/current/index.html" | ||
s.require_paths = ["lib"] | ||
|
||
# Files | ||
s.files = [__FILE__] | ||
|
||
# Tests | ||
s.test_files = [] | ||
|
||
# Special flag to let us know this is actually a logstash plugin | ||
s.metadata = { "logstash_plugin" => "true", "logstash_group" => "filter" } | ||
|
||
# Gem dependencies | ||
s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99" | ||
|
||
s.add_runtime_dependency "logstash-filter-one_no_dependencies", "~> 0.1" | ||
s.add_runtime_dependency "logstash-filter-three_no_dependencies", "~> 0.1" | ||
end |
23 changes: 23 additions & 0 deletions
23
qa/integration/fixtures/plugins/logstash-filter-one_no_dependencies.gemspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Gem::Specification.new do |s| | ||
s.name = File.basename(__FILE__, ".gemspec") | ||
s.version = '0.1.1' | ||
s.licenses = ['Apache-2.0'] | ||
s.summary = "A dummy plugin with no dependencies" | ||
s.description = "This plugin is only used in the acceptance test" | ||
s.authors = ["Elasticsearch"] | ||
s.email = '[email protected]' | ||
s.homepage = "http://www.elasticsearch.org/guide/en/logstash/current/index.html" | ||
s.require_paths = ["lib"] | ||
|
||
# Files | ||
s.files = [__FILE__] | ||
|
||
# Tests | ||
s.test_files = [] | ||
|
||
# Special flag to let us know this is actually a logstash plugin | ||
s.metadata = { "logstash_plugin" => "true", "logstash_group" => "filter" } | ||
|
||
# Gem dependencies | ||
s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99" | ||
end |
23 changes: 23 additions & 0 deletions
23
qa/integration/fixtures/plugins/logstash-filter-three_no_dependencies.gemspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Gem::Specification.new do |s| | ||
s.name = File.basename(__FILE__, ".gemspec") | ||
s.version = '0.1.1' | ||
s.licenses = ['Apache-2.0'] | ||
s.summary = "A dummy plugin with no dependencies" | ||
s.description = "This plugin is only used in the acceptance test" | ||
s.authors = ["Elasticsearch"] | ||
s.email = '[email protected]' | ||
s.homepage = "http://www.elasticsearch.org/guide/en/logstash/current/index.html" | ||
s.require_paths = ["lib"] | ||
|
||
# Files | ||
s.files = [__FILE__] | ||
|
||
# Tests | ||
s.test_files = [] | ||
|
||
# Special flag to let us know this is actually a logstash plugin | ||
s.metadata = { "logstash_plugin" => "true", "logstash_group" => "filter" } | ||
|
||
# Gem dependencies | ||
s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99" | ||
end |
25 changes: 25 additions & 0 deletions
25
qa/integration/fixtures/plugins/logstash-filter-two_depends_on_one.gemspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Gem::Specification.new do |s| | ||
s.name = File.basename(__FILE__, ".gemspec") | ||
s.version = '0.1.1' | ||
s.licenses = ['Apache-2.0'] | ||
s.summary = "A dummy plugin with one plugin dependency" | ||
s.description = "This plugin is only used in the acceptance test" | ||
s.authors = ["Elasticsearch"] | ||
s.email = '[email protected]' | ||
s.homepage = "http://www.elasticsearch.org/guide/en/logstash/current/index.html" | ||
s.require_paths = ["lib"] | ||
|
||
# Files | ||
s.files = [__FILE__] | ||
|
||
# Tests | ||
s.test_files = [] | ||
|
||
# Special flag to let us know this is actually a logstash plugin | ||
s.metadata = { "logstash_plugin" => "true", "logstash_group" => "filter" } | ||
|
||
# Gem dependencies | ||
s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99" | ||
|
||
s.add_runtime_dependency "logstash-filter-one_no_dependencies", "~> 0.1" | ||
end |
23 changes: 23 additions & 0 deletions
23
qa/integration/fixtures/plugins/logstash-filter-zero_no_dependencies.gemspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Gem::Specification.new do |s| | ||
s.name = File.basename(__FILE__, ".gemspec") | ||
s.version = '0.1.1' | ||
s.licenses = ['Apache-2.0'] | ||
s.summary = "A dummy plugin with no dependencies" | ||
s.description = "This plugin is only used in the acceptance test" | ||
s.authors = ["Elasticsearch"] | ||
s.email = '[email protected]' | ||
s.homepage = "http://www.elasticsearch.org/guide/en/logstash/current/index.html" | ||
s.require_paths = ["lib"] | ||
|
||
# Files | ||
s.files = [__FILE__] | ||
|
||
# Tests | ||
s.test_files = [] | ||
|
||
# Special flag to let us know this is actually a logstash plugin | ||
s.metadata = { "logstash_plugin" => "true", "logstash_group" => "filter" } | ||
|
||
# Gem dependencies | ||
s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.