Skip to content

Commit 03c4fc5

Browse files
authored
Run correct ssh server binary with prod releases (#3588)
## Changes Run correct ssh server binary with prod releases ## Why <!-- Why are these changes needed? Provide the context that the reviewer might be missing. For example, were there any decisions behind the change that are not reflected in the code itself? --> ## Tests <!-- How have you tested the changes? --> <!-- If your PR needs to be included in the release notes for next release, add a separate entry in NEXT_CHANGELOG.md as part of your PR. -->
1 parent 1ba0b06 commit 03c4fc5

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

experimental/ssh/internal/client/ssh-server-bootstrap.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import platform
1111
import time
1212

13-
SSH_TUNNEL_BASENAME = "databricks_cli_linux"
13+
SSH_TUNNEL_BASENAME = "databricks_cli"
1414

1515
dbutils.widgets.text("version", "")
1616
dbutils.widgets.text("secretsScope", "")
@@ -103,13 +103,19 @@ def run_ssh_server():
103103

104104
arch = platform.machine()
105105
if arch == "x86_64":
106-
cli_arch = "amd64"
106+
cli_arch = "linux_amd64"
107107
elif arch == "aarch64" or arch == "arm64":
108-
cli_arch = "arm64"
108+
cli_arch = "linux_arm64"
109109
else:
110110
raise RuntimeError(f"Unsupported architecture: {arch}")
111111

112-
binary_path = f"/Workspace/Users/{user_name}/.databricks/ssh-tunnel/{version}/{SSH_TUNNEL_BASENAME}_{cli_arch}/databricks"
112+
if version.find("dev") != -1:
113+
cli_name = f"{SSH_TUNNEL_BASENAME}_{cli_arch}"
114+
else:
115+
cli_name = f"{SSH_TUNNEL_BASENAME}_{version}_{cli_arch}"
116+
117+
binary_path = f"/Workspace/Users/{user_name}/.databricks/ssh-tunnel/{version}/{cli_name}/databricks"
118+
113119
try:
114120
subprocess.run(
115121
[

0 commit comments

Comments
 (0)