File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -186,7 +186,19 @@ def adjust_ids_for_cluster(settings): #job_settings or task_settings
186186 create_resp = self .post ('/jobs/create' , job_settings )
187187 if logging_utils .check_error (create_resp ):
188188 logging .info ("Resetting job to use default cluster configs due to expired configurations." )
189- job_settings ['new_cluster' ] = self .get_jobs_default_cluster_conf ()
189+ if job_settings .get ("format" , "" ) == "MULTI_TASK" :
190+
191+ # if an MTJ has a cluster that no longer exists, use the default configuration for all tasks
192+ updated_tasks = []
193+ for task in job_settings .get ("tasks" ):
194+ if task .get ("existing_cluster_id" , None ):
195+ task .pop ("existing_cluster_id" )
196+ task ["new_cluster" ] = self .get_jobs_default_cluster_conf ()
197+ updated_tasks .append (task )
198+ job_settings ["tasks" ] = updated_tasks
199+ else :
200+ job_settings ['new_cluster' ] = self .get_jobs_default_cluster_conf ()
201+
190202 create_resp_retry = self .post ('/jobs/create' , job_settings )
191203 if not logging_utils .log_response_error (error_logger , create_resp_retry ):
192204 if 'job_id' in job_conf :
You can’t perform that action at this time.
0 commit comments