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
Package elastic_integration
plugin.
#15769
Conversation
rakelib/plugin.rake
Outdated
@@ -61,6 +61,16 @@ namespace "plugin" do | |||
task.reenable # Allow this task to be run again | |||
end | |||
|
|||
task "install-default-oss" => "bootstrap" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review note: I am okay to add [:oss]
as an argument and exclude OSS except plugins but I prefered to separate to make clearly visible. When we add an argument to the task, multiple (ex: prepare
-> install-default
) tasks should carry this argument.
elastic_integration
plugin.
I think in terms of our dependency graph, it may be better to start with the complete list, and then uninstall/deactivate the non-OSS-licensed plugins. This would ensure that the graphs are otherwise identical. |
@@ -378,6 +378,7 @@ namespace "artifact" do | |||
|
|||
task "generate_build_metadata" do | |||
require 'time' | |||
require 'tempfile' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review note: when firing this rake task alone, we get uninitialized tempfile error.
96a9e3b
to
1f28cbf
Compare
buildkite test this again |
Retried CI, now 🟢 |
…SS exlucluded plugin list.
…s change removes the stayed files.
…nstalled gems, Gem::Specification doesn't recognize the gem. We have Bundle::setup in the removal logic but it is causing an issue when we re-use the bundle.
38ccd1f
to
770a1b0
Compare
…nce we don't pack the cache.
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
💚 Build Succeeded
History
cc @mashhurs |
@jsvd recap these changes:
|
puts("[plugin:remove-non-oss-plugins] Removing non-OSS plugins") | ||
|
||
LogStash::RakeLib::OSS_EXCLUDED_PLUGINS.each do |plugin| | ||
remove_plugin(plugin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note that for now this approach works but if in the future any non-OSS plugin has a dependency, we'll have one or two issues to be aware of:
- non-OSS may introduce dependencies that will not be used by Logstash
- if the non-OSS brings a non-OSS dependency we'll have to remove it as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@logstashmachine backport 8.13 |
* Exclude plugins feature in OSS distributions. * Set elastic_integration plugin default. * Remove non-OSS plugins after installing default plugins. * Testing local can't find gem bundler (= 2.3.26) issue. * Include extract non-OSS plugins logic indocker build operations. * Only default plugins can be excluded from OSS distros. * Simplification: instead conditional check, use intersection to make OSS exlucluded plugin list. * Gem and specification files still stay after removing the plugin. This change removes the stayed files. * Rename oss-exclude to skip-oss to align namings with other params. * Make intersection method simpler. * [Test] Temporary excluding elastic integration plugin from default plugin list. * Sets elastic_integration plugin default back. When removing locally installed gems, Gem::Specification doesn't recognize the gem. We have Bundle::setup in the removal logic but it is causing an issue when we re-use the bundle. * Test the build order, remove plugin from cache logic seems invalid since we don't pack the cache. (cherry picked from commit 3c9db65)
* Exclude plugins feature in OSS distributions. * Set elastic_integration plugin default. * Remove non-OSS plugins after installing default plugins. * Testing local can't find gem bundler (= 2.3.26) issue. * Include extract non-OSS plugins logic indocker build operations. * Only default plugins can be excluded from OSS distros. * Simplification: instead conditional check, use intersection to make OSS exlucluded plugin list. * Gem and specification files still stay after removing the plugin. This change removes the stayed files. * Rename oss-exclude to skip-oss to align namings with other params. * Make intersection method simpler. * [Test] Temporary excluding elastic integration plugin from default plugin list. * Sets elastic_integration plugin default back. When removing locally installed gems, Gem::Specification doesn't recognize the gem. We have Bundle::setup in the removal logic but it is causing an issue when we re-use the bundle. * Test the build order, remove plugin from cache logic seems invalid since we don't pack the cache. (cherry picked from commit 3c9db65) Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
Release notes
[rn:skip]
What does this PR do?
oss-skip
flag of the plugin metadata) to exclude plugins in OSS distributionselastic_integration
plugin as a default pluginHistory
CI fails were due to elastic/logstash-filter-elastic_integration#114
TarWriter
(inassembleOssTarDistribution
gradle task) complains on the path which cannot be longer than 256. The workaround is to shorten the JAR path in th plugin, the PR: Updating JAR output path to avoid using long path. logstash-filter-elastic_integration#114. We need to merge the PR and release new version of the plugin.Why is it important/What is the impact to the user?
Non-user affected.
Checklist
I have made corresponding changes to the documentationI have made corresponding change to the default configuration files (and/or docker env variables)I have added tests that prove my fix is effective or that my feature worksAuthor's Checklist
Before merging:
elastic_integration
plugin. #15769/merge)How to test this PR locally
rake artifact:archives_oss
(or any of [rpm_oss
,deb_oss
.docker_oss
]) command.oss-excluded
plugins.NOTE: currently gradle tasks (
./gradlew clean assembleOssTarDistribution
,./gradlew clean assembleOssZipDistribution
) to build OSS distros are broken, and the reason looks like this issueRelated issues
Use cases
Screenshots
Logs