Remove bwc_tests_enabled flag (#115456)

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.
This commit is contained in:
Ryan Ernst 2024-12-27 10:03:44 -08:00 committed by GitHub
parent c8f2703cdf
commit cda2b69f40
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 18 deletions

View File

@ -221,25 +221,11 @@ tasks.register("verifyVersions") {
} }
} }
/* // TODO: This flag existed as a mechanism to disable bwc tests during a backport. It is no
* When adding backcompat behavior that spans major versions, temporarily // longer used for that purpose, but instead a way to run only functional tests. We should
* disabling the backcompat tests is necessary. This flag controls // rework the functionalTests task to be more explicit about which tasks it wants to run
* the enabled state of every bwc task. It should be set back to true // so that that this flag is no longer needed.
* after the backport of the backcompat code is complete.
*/
boolean bwc_tests_enabled = true 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' }) { 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 // 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 bwc_tests_enabled = false