Skip to content

Commit

Permalink
remove other changes in sample plugin build.gradle
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <cwperx@amazon.com>
  • Loading branch information
cwperks committed Oct 23, 2024
1 parent b741a62 commit 461b8c7
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions sample-extension-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
apply plugin: 'opensearch.opensearchplugin'
apply plugin: 'opensearch.testclusters'
apply plugin: 'opensearch.java-rest-test'
apply plugin: 'opensearch.pluginzip'

import org.opensearch.gradle.test.RestIntegTestTask
import org.opensearch.gradle.testclusters.StandaloneRestIntegTestTask
Expand Down Expand Up @@ -126,7 +125,6 @@ testClusters.integTest {
debugPort += 1
}
}

setting 'path.repo', repo.absolutePath
}

Expand Down Expand Up @@ -296,3 +294,19 @@ run {
}
useCluster testClusters.integTest
}

// As of ES 7.7 the sample-extension-plugin is being added to the list of plugins for the testCluster during build before
// the job-scheduler plugin is causing build failures.
// The job-scheduler zip is added explicitly above but the sample-extension-plugin is added implicitly at some time during evaluation.
// Will need to do a deep dive to find out exactly what task adds the sample-extension-plugin and add job-scheduler there but a temporary hack is to
// reorder the plugins list after evaluation but prior to task execution when the plugins are installed.
afterEvaluate {
testClusters.javaRestTest.nodes.each { node ->
def nodePlugins = node.plugins
def firstPlugin = nodePlugins.get(0)
if (firstPlugin.provider == project.bundlePlugin.archiveFile) {
nodePlugins.remove(0)
nodePlugins.add(firstPlugin)
}
}
}

0 comments on commit 461b8c7

Please sign in to comment.