Skip to content

Commit

Permalink
Merge pull request #33061 from vespa-engine/logstash_plugins_lean_output
Browse files Browse the repository at this point in the history
[logstash-plugins] trim gem size for output
  • Loading branch information
kkraune authored Dec 30, 2024
2 parents 323c114 + 0ff4f79 commit a35dc8f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ If you're developing the plugin, you'll want to do something like:
# run tests
./gradlew test
# install it as a Logstash plugin
/opt/logstash/bin/logstash-plugin install /path/to/logstash-output-vespa/logstash-output-vespa_feed-0.5.2.gem
/opt/logstash/bin/logstash-plugin install /path/to/logstash-output-vespa/logstash-output-vespa_feed-0.6.1.gem
# profit
/opt/logstash/bin/logstash
```
Expand Down
2 changes: 1 addition & 1 deletion integration/logstash-plugins/logstash-output-vespa/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.0
0.6.1
16 changes: 5 additions & 11 deletions integration/logstash-plugins/logstash-output-vespa/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ plugins {
ext {
snakeYamlVersion = '2.2'
shadowGradlePluginVersion = '8.1.1'
log4jVersion = '2.17.1'
}

apply from: LOGSTASH_CORE_PATH + "/../rubyUtils.gradle"
Expand Down Expand Up @@ -47,12 +48,12 @@ repositories {

shadowJar {
archiveClassifier.set('')
configurations = [project.configurations.runtimeClasspath, project.configurations.testRuntimeClasspath]
configurations = [project.configurations.runtimeClasspath]
}

dependencies {
implementation 'org.apache.logging.log4j:log4j-api:2.17.0'
implementation 'org.apache.logging.log4j:log4j-core:2.17.0'
implementation "org.apache.logging.log4j:log4j-api:${log4jVersion}"
implementation "org.apache.logging.log4j:log4j-core:${log4jVersion}"
implementation fileTree(dir: LOGSTASH_CORE_PATH, include: "**/logstash-core.jar")

implementation("com.yahoo.vespa:vespa-feed-client:${VESPA_VERSION}")
Expand All @@ -64,7 +65,7 @@ dependencies {

testImplementation 'org.jruby:jruby-complete:9.4.3.0'
testImplementation 'org.jruby:jruby-core:9.4.3.0'
testImplementation 'org.apache.logging.log4j:log4j-core:2.9.1'
testImplementation "org.apache.logging.log4j:log4j-core:${log4jVersion}"
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:5.11.0'
testImplementation("com.yahoo.vespa:vespa-feed-client:${VESPA_VERSION}")
Expand Down Expand Up @@ -122,13 +123,6 @@ tasks.register("gem"){
}
}

test {
doFirst {
println "Test runtime classpath:"
classpath.each { println it }
}
}

task integrationTest(type: Exec) {
workingDir 'integration-test'
commandLine './run_tests.sh'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,20 @@ fi
echo "Building plugin..."
cd ..
./gradlew clean gem
cd integration-test
# bail if the plugin is not built
if [ $? -ne 0 ]; then
echo -e "${RED}Error: Plugin not built${NC}"
exit 1
fi

cd integration-test
echo "Installing plugin..."
$LOGSTASH_HOME/bin/logstash-plugin install --no-verify ../logstash-output-vespa_feed-$PLUGIN_VERSION.gem
# bail if the plugin is not installed
if [ $? -ne 0 ]; then
echo -e "${RED}Error: Plugin not installed${NC}"
exit 1
fi

# Wait for Vespa to be ready
echo "Checking Vespa availability..."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# encoding: utf-8

require 'jar_dependencies'
require_jar('org.logstashplugins', 'logstash-output-vespa_feed', '0.6.0')
require_jar('org.logstashplugins', 'logstash-output-vespa_feed', '0.6.1')

0 comments on commit a35dc8f

Please sign in to comment.