Fix wheel task not working with with 13.x clusters (#898)

## Changes

This lets us recognize 13.x as "13.1 or higher," making it possible to
use wheel tasks on 13.x-snapshot clusters.
This commit is contained in:
Lennart Kats (databricks) 2023-10-23 10:19:26 +02:00 committed by GitHub
parent fc98c455f5
commit 9049f11479
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -79,6 +79,9 @@ func lowerThanExpectedVersion(ctx context.Context, sparkVersion string) bool {
return false
}
if parts[1][0] == 'x' { // treat versions like 13.x as the very latest minor (13.99)
parts[1] = "99"
}
v := "v" + parts[0] + "." + parts[1]
return semver.Compare(v, "v13.1") < 0
}

View File

@ -390,6 +390,8 @@ func TestSparkVersionLowerThanExpected(t *testing.T) {
"13.3.x-scala2.12": false,
"14.0.x-scala2.12": false,
"14.1.x-scala2.12": false,
"13.x-snapshot-scala-2.12": false,
"13.x-rc-scala-2.12": false,
"10.4.x-aarch64-photon-scala2.12": true,
"10.4.x-scala2.12": true,
"13.0.x-scala2.12": true,