Skip to content

Commit

Permalink
Remove bwc_tests_enabled flag (#115456)
Browse files Browse the repository at this point in the history
In the past, making bwc changes across major version branches required temporarily disabling bwc tests. This was due to timing of adding the change in the old branch, so that bwc tests on the newer branch would pass. In particular there could be discrepancies in transport messages between the two versions. TransportVersion now handles this problem since a new transport version is added along with the bwc change. Unfortunately the gradle flag is used for another purpose now, but developers should no longer manually set it. This commit removes the documentation suggesting the flag be changed for backports.
  • Loading branch information
rjernst authored Dec 27, 2024
1 parent c8f2703 commit cda2b69
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -221,25 +221,11 @@ tasks.register("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.
*/

// TODO: This flag existed as a mechanism to disable bwc tests during a backport. It is no
// longer used for that purpose, but instead a way to run only functional tests. We should
// rework the functionalTests task to be more explicit about which tasks it wants to run
// so that that this flag is no longer needed.
boolean bwc_tests_enabled = true
// place a PR link here when committing bwc changes:
String bwc_tests_disabled_issue = ""
if (bwc_tests_enabled == false) {
if (bwc_tests_disabled_issue.isEmpty()) {
throw new GradleException("bwc_tests_disabled_issue must be set when bwc_tests_enabled == false")
}
println "========================= WARNING ========================="
println " Backwards compatibility tests are disabled!"
println "See ${bwc_tests_disabled_issue}"
println "==========================================================="
}
if (project.gradle.startParameter.taskNames.any { it.startsWith("checkPart") || it == 'functionalTests' }) {
// Disable BWC tests for checkPart* tasks and platform support tests as it's expected that this will run on it's own check
bwc_tests_enabled = false
Expand Down

0 comments on commit cda2b69

Please sign in to comment.