TaskState
: remove cached prereq satisfaction in preparation for cylc remove
#6287
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These manually cached satisfaction states have the possibility to drift out of sync with individual
Prerequisite
satisfaction states, especially withcylc remove
work in progress #5643 (cylc remove
will have to unset any satisfied prerequisites that the removed task provided).It looks like they are barely used in the first place (at least not anymore):
_is_satisfied
only has any savings at this call toTaskState.prerequisites_are_not_all_satisfied()
:cylc-flow/cylc/flow/task_pool.py
Lines 1755 to 1760 in 80fa008
which is the case for absolute triggers e.g.
foo[2001] => bar
which are not so common?_suicide_is_satisfied
only has any savings at the call above and this call:cylc-flow/cylc/flow/task_pool.py
Lines 1425 to 1430 in 80fa008
suicide triggers are also not so common.
I am not sure this is strictly necessary for
cylc remove
(but not happy about the current situation), hence putting it up for review standalone first.These cached values were first introduced in #1775. There was an issue #1857 mentioning it - looks like it was the cached states drifting out of sync that caused the problem in that case, which is why I am unhappy about it generally.
Check List
CONTRIBUTING.md
and added my name as a Code Contributor.