cylc / cylc-flow

Cylc: a workflow engine for cycling systems.
https://cylc.github.io
GNU General Public License v3.0
335 stars 94 forks source link

dummy mode: subtract err-script from jobs #5820

Open oliver-sanders opened 1 year ago

oliver-sanders commented 1 year ago

In dummy mode, we remove any configured script items, except err-script for some reason.

See https://github.com/cylc/cylc-flow/pull/5721#discussion_r1391143979

oliver-sanders commented 6 months ago

@wxtim you might want to see if you can cross this off post skip-mode work, or have already resolved it as part of recent sim-mode work.

wxtim commented 6 months ago

This makes sense because:

But...

It makes sense to me that the user of dummy mode might want to keep the effect of the dummy script, especially if the error script is altering the workflow. If they were wanting to test a cylc reset or a cylc message or the state of the workflow.

Happy to remove it, but wanted to check that you've considered the reasons.

oliver-sanders commented 6 months ago

Dummy mode is supposed to run a dummy job commenting out all script. Given that dummy jobs should not fail (because they don't run anything), the inclusion of err-script should be symptomless (i.e. you can't use it to alter the workflow because it should never be called). The omission of err-script was an accident, likely because err-script was the most recently added of the bunch. Note that post-script (which is omitted) is essentially the "success" opposite of err-script.

wxtim commented 6 months ago

I will do this.

dummy jobs should not fail

Dummy jobs will currently fail if you set [simulation]fail cycle points = all.

evidence:

        err-script = 'echo "Hello, this is the exit script"'
        [[[simulation]]]
            default run length = "PT0S"
            fail cycle points = "all"
> cylc vip .
> cylc log new.buck/runN//1654/foo/ -f e
(dummy job fail)
Hello, this is the exit script
2024-05-15T11:35:58+01:00 CRITICAL - failed/ERR
oliver-sanders commented 6 months ago

Dummy jobs will currently fail if you set [simulation]fail cycle points = all.

:vomiting_face:

Hmm, dummy mode may require a rethink, or a deletion (see #5961).

wxtim commented 3 months ago

Also missing exit-script too.