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

`cylc set` bug fix for new flows

Open hjoliver opened this issue 7 months ago • 2 comments

Damn it, found a bug in 8.3.0 for cylc set --flow=new on future tasks: the task_outputs table won't be updated because of "WHERE flow is n" in the DB statement.

From: https://github.com/hjoliver/ecox-interventions?tab=readme-ov-file#scenario-2-rerun-some-tasks-from-upstream-of-a-failed-task

Example:

[task parameters]
    m = 1..3
[scheduling]
    [[graph]]
        R1 = "a => b => c<m> => d"
[runtime]
    [[root]]
        pre-script = sleep 5
    [[a, b, d]]
    [[c<m>]]
    [[c<m=2>]]
        script = """
            if (( CYLC_TASK_SUBMIT_NUMBER == 1 )); then
                false
            fi
        """

The scenario:

  • 1/c_m2 fails, stalling the workflow due to a corrupted output from 1/b
  • want to return 1/b and 1/c_m2, but not 1/c_m1, m3, then continue to 1/d and finish

Method:

  • run a new flow (2) from 1/b after setting 1/c_m1, m3 to succeeded in the new flow
  1. cylc set test //1/c_m1 //1/c_m2 --flow=2
  2. cylc trigger test//1/b --flow=2

On master this reruns 1/c_m1 and 1/c_m3 because the set outputs don't end up in the DB.

Check List

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

hjoliver avatar Jul 01 '24 09:07 hjoliver