File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
src/dstack/_internal/server/services Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -1074,10 +1074,18 @@ def _calculate_ssh_hosts_changes(
10741074 if isinstance (current_host , str ) or isinstance (new_host , str ):
10751075 if current_host != new_host :
10761076 changed_hosts .add (host )
1077- elif diff_models (
1078- current_host , new_host , reset = {"identity_file" : True , "proxy_jump" : {"identity_file" }}
1079- ):
1080- changed_hosts .add (host )
1077+ else :
1078+ current_host = copy_model (current_host , reset = {"identity_file" })
1079+ new_host = copy_model (new_host , reset = {"identity_file" })
1080+ # XXX: cannot use copy_model() or diff_models() with
1081+ # `reset={..., "proxy_jump": {"identity_file"}}`
1082+ # as SSHProxyParams.identity_file has no default value
1083+ if current_host .proxy_jump is not None :
1084+ current_host .proxy_jump .identity_file = ""
1085+ if new_host .proxy_jump is not None :
1086+ new_host .proxy_jump .identity_file = ""
1087+ if diff_models (current_host , new_host ):
1088+ changed_hosts .add (host )
10811089 return added_hosts , removed_hosts , changed_hosts
10821090
10831091
You can’t perform that action at this time.
0 commit comments