Skip to content

Commit

Permalink
Conditionally execute rolling upgrade tasks
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Widdis <[email protected]>
  • Loading branch information
dbwiddis committed Mar 7, 2024
1 parent d421109 commit b9bb931
Showing 1 changed file with 17 additions and 24 deletions.
41 changes: 17 additions & 24 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -524,16 +524,15 @@ List<Provider<RegularFile>> plugins = [
task "${baseName}#mixedClusterTask"(type: StandaloneRestIntegTestTask) {
dependsOn "${baseName}#oldVersionClusterTask0"
useCluster testClusters."${baseName}0"
// Only do mixed cluster tasks on same major version
if (bwc_major_version != opensearch_major_version) {
ignoreFailures = true
} else {
doFirst {
doFirst {
if (bwc_major_version == opensearch_major_version) {
testClusters."${baseName}0".upgradeNodeAndPluginToNextVersion(plugins)
} else {
testClusters."${baseName}0".upgradeAllNodesAndPluginsToNextVersion(plugins)
}
filter {
includeTestsMatching "org.opensearch.flowframework.bwc.*IT"
}
}
filter {
includeTestsMatching "org.opensearch.flowframework.bwc.*IT"
}
systemProperty 'tests.rest.bwcsuite', 'mixed_cluster'
systemProperty 'tests.rest.bwcsuite_round', 'first'
Expand All @@ -548,16 +547,13 @@ task "${baseName}#mixedClusterTask"(type: StandaloneRestIntegTestTask) {
task "${baseName}#twoThirdsUpgradedClusterTask"(type: StandaloneRestIntegTestTask) {
dependsOn "${baseName}#mixedClusterTask"
useCluster testClusters."${baseName}0"
// Only do mixed cluster tasks on same major version
if (bwc_major_version != opensearch_major_version) {
ignoreFailures = true
} else {
doFirst {
doFirst {
if (bwc_major_version == opensearch_major_version) {
testClusters."${baseName}0".upgradeNodeAndPluginToNextVersion(plugins)
}
filter {
includeTestsMatching "org.opensearch.flowframework.bwc.*IT"
}
}
filter {
includeTestsMatching "org.opensearch.flowframework.bwc.*IT"
}
systemProperty 'tests.rest.bwcsuite', 'mixed_cluster'
systemProperty 'tests.rest.bwcsuite_round', 'second'
Expand All @@ -572,16 +568,13 @@ task "${baseName}#twoThirdsUpgradedClusterTask"(type: StandaloneRestIntegTestTas
task "${baseName}#rollingUpgradeClusterTask"(type: StandaloneRestIntegTestTask) {
dependsOn "${baseName}#twoThirdsUpgradedClusterTask"
useCluster testClusters."${baseName}0"
// Only do mixed cluster tasks on same major version
if (bwc_major_version != opensearch_major_version) {
ignoreFailures = true
} else {
doFirst {
doFirst {
if (bwc_major_version == opensearch_major_version) {
testClusters."${baseName}0".upgradeNodeAndPluginToNextVersion(plugins)
}
filter {
includeTestsMatching "org.opensearch.flowframework.bwc.*IT"
}
}
filter {
includeTestsMatching "org.opensearch.flowframework.bwc.*IT"
}
mustRunAfter "${baseName}#mixedClusterTask"
systemProperty 'tests.rest.bwcsuite', 'mixed_cluster'
Expand Down

0 comments on commit b9bb931

Please sign in to comment.