-
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
Implement cylc remove
proposal
#6472
base: master
Are you sure you want to change the base?
Conversation
`json.dumps()`/`json.loads()` are relatively slow (~1us). But these functions are likely to be called many times with `flow={1}`.
…tasks in the given flow(s)
- Update data store with changed prereqs - Don't un-queue downstream task if: - the task is already preparing - the task exists in flows other than that being removed - the task's prereqs are still satisfied overall - Remove the downstream task from the pool if it no longer has any satisfied prerequisite tasks
This will allow it to call the method to kill submitted/running tasks
Plus ensure traceback for internal errors when cleaning gets logged in verbose mode
4509bbf
to
7a651e7
Compare
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.
Still part way through, looks great so far.
(Did some testing today, so far so good, but I'm not done yet.) |
This PR removes flow nums from the However, it doesn't remove flow nums from the |
(It does, but only for submitted/running tasks that get killed by |
Functional question: If I do
In the scheduler log, which is great. Any possibility of a warning from command validation? Or is this a sufficiently silly foot-shooting that we're not worrying? |
Closes #5643. Supersedes #6370.
Summary
This fully implements the "Cylc Remove Extension" proposal.
Flow numbers
cylc remove
now has a--flow
option for removing a task from specific flows.If not used, it will remove the task from all flows that it belongs to.
If the removed task is active/waiting, if it is removed from a subset of flows that it belongs to, it will remain in the task pool; if it is removed from all flows that it belongs to, it will be removed from the task pool (as is the current behaviour).
If a task is removed from all flows that it belongs to, it will become a no-flow task (
flow=None
).For ease of reviewing, you can use my UI branch that displays flow numbers: https://github.com/MetRonnie/cylc-ui/tree/flow-nums 1.
Historical tasks
cylc remove
now can remove tasks that are no longer active, making it look like they never ran. It does this by removing the task from the specified flows in the database (in thetask_states
andtask_outputs
tables)2, and un-setting any prerequisites of active tasks that the removed task had naturally satisfied3. If a task is removed from all flows that it belongs to, a no-flow task is left in the DB for provenance.The above also applies to active/waiting tasks that
cylc remove
is used on.Kill submitted/running tasks
Using
cylc remove
on a submitted/running task will now kill it if you are removing the task from all flows that it belongs to.Unlike with
cylc kill
, downstream tasks will not spawn off the:fail
or:submit-fail
outputs as the task is inflow=none
, and also thefailed
andsubmission failed
handlers will not run.Check List
CONTRIBUTING.md
and added my name as a Code Contributor.?.?.x
branch.Footnotes
Waiting tasks that are not yet in the pool have greyed out flow numbers at the moment. ↩
If removing flows would result in two rows in the DB no longer being unique, the SQLite
UPDATE OR REPLACE
statement is used, so the first entry will be removed and the most recent entry will remain. ↩Prerequisites manually satisfied by
cylc set --pre
are not affected bycylc remove
. ↩