Build: Add master flag for disabling bwc tests (#25230)
This commit adds a gradle project, set inside the root build.gradle, which controls all our bwc tests. This allows for seamless (ie no errant CI failures) backporting of behavior.
This commit is contained in:
parent
caf7792db1
commit
106e373412
20
build.gradle
20
build.gradle
|
@ -152,10 +152,28 @@ task verifyVersions {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* When adding backcompat behavior that spans major versions, temporarily
|
||||
* disabling the backcompat tests is necessary. This flag controls
|
||||
* the enabled state of every bwc task. It should be set back to true
|
||||
* after the backport of the backcompat code is complete.
|
||||
*/
|
||||
allprojects {
|
||||
ext.bwc_tests_enabled = true
|
||||
}
|
||||
|
||||
task verifyBwcTestsEnabled {
|
||||
doLast {
|
||||
if (project.bwc_tests_enabled == false) {
|
||||
throw new GradleException('Bwc tests are disabled. They must be re-enabled after completing backcompat behavior backporting.')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task branchConsistency {
|
||||
description 'Ensures this branch is internally consistent. For example, that versions constants match released versions.'
|
||||
group 'Verification'
|
||||
dependsOn verifyVersions
|
||||
dependsOn verifyVersions, verifyBwcTestsEnabled
|
||||
}
|
||||
|
||||
subprojects {
|
||||
|
|
|
@ -79,14 +79,18 @@ for (Version version : indexCompatVersions) {
|
|||
dependsOn = [upgradedClusterTest]
|
||||
}
|
||||
|
||||
bwcTest.dependsOn(versionBwcTest)
|
||||
if (project.bwc_tests_enabled == false) {
|
||||
bwcTest.dependsOn(versionBwcTest)
|
||||
}
|
||||
}
|
||||
|
||||
test.enabled = false // no unit tests for rolling upgrades, only the rest integration test
|
||||
|
||||
// basic integ tests includes testing bwc against the most recent version
|
||||
task integTest {
|
||||
dependsOn = ["v${indexCompatVersions[-1]}#bwcTest"]
|
||||
if (project.bwc_tests_enabled) {
|
||||
dependsOn = ["v${indexCompatVersions[-1]}#bwcTest"]
|
||||
}
|
||||
}
|
||||
|
||||
check.dependsOn(integTest)
|
||||
|
|
|
@ -51,14 +51,18 @@ for (Version version : wireCompatVersions) {
|
|||
dependsOn = [mixedClusterTest]
|
||||
}
|
||||
|
||||
bwcTest.dependsOn(versionBwcTest)
|
||||
if (project.bwc_tests_enabled) {
|
||||
bwcTest.dependsOn(versionBwcTest)
|
||||
}
|
||||
}
|
||||
|
||||
test.enabled = false // no unit tests for rolling upgrades, only the rest integration test
|
||||
|
||||
// basic integ tests includes testing bwc against the most recent version
|
||||
task integTest {
|
||||
dependsOn = ["v${wireCompatVersions[-1]}#bwcTest"]
|
||||
if (project.bwc_tests_enabled) {
|
||||
dependsOn = ["v${wireCompatVersions[-1]}#bwcTest"]
|
||||
}
|
||||
}
|
||||
|
||||
check.dependsOn(integTest)
|
||||
|
|
|
@ -95,17 +95,22 @@ for (Version version : wireCompatVersions) {
|
|||
}
|
||||
|
||||
Task versionBwcTest = tasks.create(name: "${baseName}#bwcTest") {
|
||||
enabled = project.bwc_tests_enabled
|
||||
dependsOn = [upgradedClusterTest]
|
||||
}
|
||||
|
||||
bwcTest.dependsOn(versionBwcTest)
|
||||
if (project.bwc_tests_enabled) {
|
||||
bwcTest.dependsOn(versionBwcTest)
|
||||
}
|
||||
}
|
||||
|
||||
test.enabled = false // no unit tests for rolling upgrades, only the rest integration test
|
||||
|
||||
// basic integ tests includes testing bwc against the most recent version
|
||||
task integTest {
|
||||
dependsOn = ["v${wireCompatVersions[-1]}#bwcTest"]
|
||||
if (project.bwc_tests_enabled) {
|
||||
dependsOn = ["v${wireCompatVersions[-1]}#bwcTest"]
|
||||
}
|
||||
}
|
||||
|
||||
check.dependsOn(integTest)
|
||||
|
|
Loading…
Reference in New Issue