polling: reset bad hosts on manual poll#7055
polling: reset bad hosts on manual poll#7055oliver-sanders wants to merge 1 commit intocylc:8.6.xfrom
Conversation
cylc/flow/task_job_mgr.py
Outdated
| if continue_if_no_good_hosts: | ||
| # no hosts available for this platform | ||
| # -> reset the bad hosts and try again | ||
| self.task_events_mgr.reset_bad_hosts() | ||
| host = get_host_from_platform( | ||
| platform, bad_hosts=self.bad_hosts | ||
| ) | ||
| else: | ||
| ctx.err = f'No available hosts for {platform["name"]}' | ||
| LOG.debug(ctx) | ||
| callback_255(ctx, itasks) | ||
| continue |
There was a problem hiding this comment.
Both branches here continue to the next iteration of the for loop. host is not used in the first branch. Did you mean to remove the else condition on the line below?
There was a problem hiding this comment.
Mildly concerned that if Ronnie is right (I think he is) that the test isn't failing....
There was a problem hiding this comment.
Ronnie is very much correct.
The test was passing because of the host = 'localhost' above which was providing an unwelcome default pathway through the code.
MB, that was some AI level BS.
|
Converting to draft pending resolution of #7055 (comment) |
| cmd.append("--") | ||
| cmd.append(get_remote_workflow_run_job_dir(self.workflow)) | ||
| job_log_dirs = [] | ||
| host = 'localhost' |
There was a problem hiding this comment.
Have removed the localhost default.
| platform, bad_hosts=self.bad_hosts | ||
| ) | ||
|
|
||
| if not host and continue_if_no_good_hosts: |
There was a problem hiding this comment.
Have flattened the if/try/except/if/else pathway.
| host = get_host_from_platform( | ||
| platform, bad_hosts=self.bad_hosts | ||
| ) |
There was a problem hiding this comment.
Have pushed localhost submissions through this interface to flatten the code.
This is a change, though localhost can't get into the bad hosts, so functionless. Happy to change if desired.
| assert poll_ctx.cmd_key == TaskJobManager.JOBS_POLL | ||
| assert poll_ctx.host == 'abc' |
Check List
CONTRIBUTING.mdand added my name as a Code Contributor.setup.cfg(andconda-environment.ymlif present).?.?.xbranch.