Skip to content

Commit

Permalink
Fix wheel task not working with with 13.x clusters (#898)
Browse files Browse the repository at this point in the history
## Changes

This lets us recognize 13.x as "13.1 or higher," making it possible to
use wheel tasks on 13.x-snapshot clusters.
  • Loading branch information
lennartkats-db committed Oct 23, 2023
1 parent fc98c45 commit 9049f11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bundle/python/warning.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 2 additions & 0 deletions bundle/python/warning_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9049f11

Please sign in to comment.