@@ -1236,10 +1236,10 @@ def _prep_submit_task_job(
12361236 f"\" { itask .identity } \" the following are not compatible:\n "
12371237 )
12381238
1239- host_n , platform_name , orig_platform_name , orig_host_name = [None ] * 4
1239+ host_name , platform_name = [None ] * 2
12401240 try :
12411241 if rtconfig ['remote' ]['host' ] is not None :
1242- host_n = self .task_remote_mgr .eval_host (
1242+ host_name = self .task_remote_mgr .eval_host (
12431243 rtconfig ['remote' ]['host' ]
12441244 )
12451245 else :
@@ -1258,33 +1258,34 @@ def _prep_submit_task_job(
12581258 return False
12591259 else :
12601260 # host/platform select not ready
1261- if host_n is None and platform_name is None :
1261+ if host_name is None and platform_name is None :
12621262 return None
12631263 elif (
1264- host_n is None
1264+ host_name is None
12651265 and rtconfig ['platform' ]
12661266 and rtconfig ['platform' ] != platform_name
12671267 ):
12681268 LOG .debug (
12691269 f"for task { itask .identity } : platform = "
12701270 f"{ rtconfig ['platform' ]} evaluated as { platform_name } "
12711271 )
1272- orig_platform_name = rtconfig ['platform' ]
1273- rtconfig ['platform' ] = platform_name
1272+ # orig_platform_name = rtconfig['platform']
1273+ # rtconfig['platform'] = platform_name
12741274 elif (
12751275 platform_name is None
1276- and rtconfig ['remote' ]['host' ] != host_n
1276+ and rtconfig ['remote' ]['host' ] != host_name
12771277 ):
12781278 LOG .debug (
12791279 f"[{ itask } ] host = "
1280- f"{ rtconfig ['remote' ]['host' ]} evaluated as { host_n } "
1280+ f"{ rtconfig ['remote' ]['host' ]} evaluated as { host_name } "
12811281 )
1282- orig_host_name = host_n
1283- rtconfig ['remote' ]['host' ] = host_n
12841282
12851283 try :
12861284 platform = get_platform (
1287- rtconfig , itask .tdef .name , bad_hosts = self .bad_hosts
1285+ platform_name or rtconfig ,
1286+ itask .tdef .name ,
1287+ bad_hosts = self .bad_hosts ,
1288+ evaluated_host = host_name ,
12881289 )
12891290 except PlatformLookupError as exc :
12901291 itask .waiting_on_job_prep = False
@@ -1308,12 +1309,6 @@ def _prep_submit_task_job(
13081309 # Retry delays, needed for the try_num
13091310 self ._set_retry_timers (itask , rtconfig )
13101311
1311- # Put the original platform and host names back into the
1312- # rtconfig. Prevents storing first evaluation of shell expression.
1313- if orig_platform_name :
1314- rtconfig ['platform' ] = orig_platform_name
1315- if orig_host_name :
1316- rtconfig ['remote' ]['host' ] = orig_host_name
13171312
13181313 try :
13191314 job_conf = self ._prep_submit_task_job_impl (
0 commit comments