@@ -112,7 +112,7 @@ func RunClient(ctx context.Context, client *databricks.WorkspaceClient, opts Cli
112
112
return startSSHProxy (ctx , client , opts .ClusterID , serverPort , opts .HandoverTimeout )
113
113
} else {
114
114
cmdio .LogString (ctx , fmt .Sprintf ("Additional SSH arguments: %v" , opts .AdditionalArgs ))
115
- return spawnSSHClient (ctx , opts .ClusterID , userName , privateKeyPath , serverPort , opts .AdditionalArgs )
115
+ return spawnSSHClient (ctx , opts .ClusterID , userName , privateKeyPath , serverPort , opts .HandoverTimeout , opts . AdditionalArgs )
116
116
}
117
117
}
118
118
@@ -236,14 +236,14 @@ func submitSSHTunnelJob(ctx context.Context, client *databricks.WorkspaceClient,
236
236
return runResult .Response .RunId , nil
237
237
}
238
238
239
- func spawnSSHClient (ctx context.Context , clusterID , userName , privateKeyPath string , serverPort int , additionalArgs []string ) error {
239
+ func spawnSSHClient (ctx context.Context , clusterID , userName , privateKeyPath string , serverPort int , handoverTimeout time. Duration , additionalArgs []string ) error {
240
240
executablePath , err := os .Executable ()
241
241
if err != nil {
242
242
return fmt .Errorf ("failed to get current executable path: %w" , err )
243
243
}
244
244
245
- proxyCommand := fmt .Sprintf ("%s ssh connect --proxy --cluster=%s --metadata=%s,%d" ,
246
- executablePath , clusterID , userName , serverPort )
245
+ proxyCommand := fmt .Sprintf ("%s ssh connect --proxy --cluster=%s --handover-timeout=%s -- metadata=%s,%d" ,
246
+ executablePath , clusterID , handoverTimeout . String (), userName , serverPort )
247
247
248
248
sshArgs := []string {
249
249
"-l" , userName ,
0 commit comments