Skip to content

Commit

Permalink
Rely UCX on the latest 14.3 LTS DBR instead of 15.x (#1097)
Browse files Browse the repository at this point in the history
Fixes #1096

This is a quickfix. The long-term solution is tracked in #1098
  • Loading branch information
nfx authored Mar 25, 2024
1 parent bfc1a61 commit 62a42c6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/databricks/labs/ucx/installer/policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ def _get_instance_pool_id(self) -> str | None:
return None

def _definition(self, conf: dict, instance_profile: str | None, instance_pool_id: str | None) -> str:
latest_lts_dbr = self._ws.clusters.select_spark_version(latest=True, long_term_support=True)
policy_definition = {
"spark_version": self._policy_config(self._ws.clusters.select_spark_version(latest=True)),
"spark_version": self._policy_config(latest_lts_dbr),
"node_type_id": self._policy_config(self._ws.clusters.select_node_type(local_disk=True)),
}
if instance_pool_id:
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/installer/test_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def common():
w.cluster_policies.create.return_value = policy

w.cluster_policies.list.return_value = [policy]
w.clusters.select_spark_version = lambda latest: "14.2.x-scala2.12"
w.clusters.select_spark_version = lambda **_: "14.2.x-scala2.12"
w.clusters.select_node_type = lambda local_disk: "Standard_F4s"
w.current_user.me = lambda: iam.User(user_name="[email protected]", groups=[iam.ComplexValue(display="admins")])
prompts = MockPrompts(
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def download(path: str) -> io.StringIO | io.BytesIO:
workspace_client.dashboard_widgets.create.return_value = Widget(id="abc")
workspace_client.clusters.list.return_value = mock_clusters()
workspace_client.cluster_policies.create.return_value = CreatePolicyResponse(policy_id="foo")
workspace_client.clusters.select_spark_version = lambda latest: "14.2.x-scala2.12"
workspace_client.clusters.select_spark_version = lambda **_: "14.2.x-scala2.12"
workspace_client.clusters.select_node_type = lambda local_disk: "Standard_F4s"
workspace_client.workspace.download = download

Expand Down

0 comments on commit 62a42c6

Please sign in to comment.