Skip to content
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

task pool: assign previous state to transient task proxy objects #6412

Open
ColemanTom opened this issue Aug 1, 2024 · 6 comments
Open

task pool: assign previous state to transient task proxy objects #6412

ColemanTom opened this issue Aug 1, 2024 · 6 comments
Labels
bug Something is wrong :(
Milestone

Comments

@ColemanTom
Copy link
Contributor

Description

Doing cylc set in order (at least of) succeeded, failed, succeeded gives incorrect symbol colouring. The status of outputs appears correct in cylc show, but incorrect (maybe?) in UI.

ui_bug_set_not_update

Reproducible Example

NOTE: Look at UI symbols in between each cylc set command, and on CLI to see the inconsistency.

  1. Run any workflow
  2. cylc set workflow//cycle/task (circle is fully coloured in)
  3. cylc set -o failed workflow//cycle/task (circle now has a cross in it)
  4. cylc set workflow//cycle/task (circle has no symbol or colouring)
  5. cylc set workflow//cycle/task (circle still has no symbol or colouring)

Expected Behaviour

I think it should be showing as fully coloured in. However, I recognise that it is perhaps in a confused state.

@ColemanTom ColemanTom added the bug Something is wrong :( label Aug 1, 2024
@hjoliver hjoliver removed the bug Something is wrong :( label Aug 7, 2024
@hjoliver
Copy link
Member

hjoliver commented Aug 7, 2024

Run any workflow

  • cylc set workflow//cycle/task (circle is fully coloured in)

This completes the succeeded output of cycle/task - so the task icon goes to the succeeded state, just as if the task had run and succeeded.

If there are any tasks downstream of cycle/task that depend on its :succeeded output (and they have not already run in this flow) they will be spawned.

  • cylc set -o failed workflow//cycle/task (circle now has a cross in it)

This completes the failed output of cycle/task - so the task icon goes to the failed state, just as if the task had submitted a second job (in the same flow) that failed.

If there are any tasks downstream of cycle/task that depend on its :failed output (and they have not already run in this flow) they will be spawned.

At this point cycle/task has completed two mutually exclusive outputs (succeeded and failed) - but that's OK because they were completed (in effect) by two different jobs.

  • cylc set workflow//cycle/task (circle has no symbol or colouring)

This completes the succeeded output of cycle/task again. I think 🤔 this should change the task icon back to succeeded, just as if we triggered a 3rd job in the same flow and it succeeded.

(No downstream children will spawn because that would already have happened in this flow, the first time the output got completed.)

So ... restoring the bug label!

@hjoliver hjoliver added the bug Something is wrong :( label Aug 7, 2024
@hjoliver
Copy link
Member

hjoliver commented Aug 7, 2024

(Issue probably needs to be moved to cylc/cylc-flow ... this is presumably a scheduler data store problem.)

@ColemanTom
Copy link
Contributor Author

I wasn't entirely sure how to label this I admit. It feels like a very odd behaviour to do, but I did do it whilst monkey testing some things so I thought I should report it in case it is a bug.

@oliver-sanders oliver-sanders transferred this issue from cylc/cylc-ui Oct 15, 2024
@oliver-sanders oliver-sanders added this to the 8.3.x milestone Oct 15, 2024
@oliver-sanders
Copy link
Member

I think the root cause of this issue is the "transient task proxy" objects that are used by task pool in some cases.

When we create a "transient" task proxy, we extract any previously completed outputs from the DB, however, we do not retrieve the previous task status, instead defaulting to "waiting".

@oliver-sanders oliver-sanders changed the title Cylc UI gets confused if you set a task succeeded, failed, succeeded task pool: assign previous state to transient task proxy objects Oct 15, 2024
@oliver-sanders
Copy link
Member

Taking a look at the loading of the outputs:

info = self.workflow_db_mgr.pri_dao.select_task_outputs(
itask.tdef.name, str(itask.point))

@hjoliver, shouldn't that function be filtering entries by flow number(s)?

@hjoliver
Copy link
Member

I think the root cause of this issue is the "transient task proxy" objects that are used by task pool in some cases.

Yeah I think you're right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong :(
Projects
None yet
Development

No branches or pull requests

3 participants