-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kill tasks during job prep. #5749
Conversation
After discussing removing a preparing task with Oliver (for #6472), this will probably be even more important as the task might end up submitting and running outside of the task pool if not killed? Not sure, haven't tested yet |
I am happy to take over this if needed, but more likely to end up in 8.4.1 rather than 8.4.0 |
Thanks @MetRonnie - yes this one slipped off my radar screen. IMO this is less important to get into 8.4.0 than trigger-when-paused. It's kind of a bug fix, but fairly niche circumstances. |
Assigning myself for now. If you get round to re-tackling before 2025, then unassign me |
@@ -483,6 +487,16 @@ def submit_task_jobs(self, workflow, itasks, curve_auth, | |||
) | |||
continue | |||
|
|||
if itask.killed_in_job_prep: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
itask
is possibly unbound
itask.waiting_on_job_prep = False | ||
itask.killed_in_job_prep = False | ||
itask.state_reset(TASK_STATUS_SUBMIT_FAILED) | ||
self.data_store_mgr.delta_task_state(itask) | ||
itask.local_job_file_path = None # reset for retry | ||
self._prep_submit_task_job_error( | ||
workflow, itask, '(killed in job prep)', '') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another problem is this does not get run for tasks that are cylc remove
d in the preparing state, as they are removed from the pool and do not get to the submission stage
Superseded by #6535 |
Close #5746
This PR allows
cylc kill
to abort jobs that are in the job preparation pipeline, resulting in the submit-failed state.To avoid dealing with the complexities of partial job preparation, I've take the following approach:
Tested by deliberately extending job preparation like this (and kill tasks whilst still in the preparing state)
Check List
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
(andconda-environment.yml
if present).CHANGES.md
entry included if this is a change that can affect users?.?.x
branch.