cylc-flow icon indicating copy to clipboard operation
cylc-flow copied to clipboard

Don't process messages from non-pool tasks.

Open hjoliver opened this issue 11 months ago • 6 comments

Close #6686

Bug caused by job polling callback, with a delayed poll result, on tasks that have already left the task pool as completed. (The core scheduler handles this OK, but an erroneous state change was logged and registered with the datastore).

We already have a task proxy flag whose exact purpose is to indicate "not task pool": TaskProxy.transient.

So the easiest way to fix this bug seems to be:

  1. set the transient flag on a task proxy when it is removed from the pool
  2. don't process task messages if the target task is marked as transient

Check List

  • [x] I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • [x] Contains logically grouped changes (else tidy your branch by rebase).
  • [x] Does not contain off-topic changes (use other PRs for other changes).
  • [x] Applied any dependency changes to both setup.cfg (and conda-environment.yml if present).
  • [ ] Tests are included (or explain why tests are not needed).
  • [ ] Changelog entry included if this is a change that can affect users
  • [x] Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • [x] If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

hjoliver avatar Mar 27 '25 04:03 hjoliver

(If test failures are meaningful, might have to consider a different approach such as checking task completion before processing messages...).

hjoliver avatar Mar 27 '25 04:03 hjoliver

(OK the initial two-line "fix" is a bit too simplistic - turns out we are calling process_message artificially, with a transient task proxy, to spawn on the outputs of inactive tasks targeted by cylc set).

hjoliver avatar Mar 27 '25 11:03 hjoliver

Is there any relationship to https://github.com/cylc/cylc-flow/issues/6412?

oliver-sanders avatar Mar 27 '25 13:03 oliver-sanders

Does this relate to https://github.com/cylc/cylc-flow/issues/4513 ?

ColemanTom avatar Mar 28 '25 00:03 ColemanTom

Does this relate to https://github.com/cylc/cylc-flow/issues/4513 ?

That issue predates "transient" task proxies.

oliver-sanders avatar Mar 28 '25 08:03 oliver-sanders

For reference, "transient task proxies" explained here: https://github.com/cylc/cylc-flow/issues/6412#issuecomment-2746488195

hjoliver avatar Mar 30 '25 20:03 hjoliver

I think this has been superseded by #6914

Re-open if not

MetRonnie avatar Sep 17 '25 13:09 MetRonnie

(Yes, superseded).

hjoliver avatar Sep 17 '25 23:09 hjoliver