cylc / cylc-flow

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

workflow-state: handle submitted as a message/trigger not status #6157

Closed oliver-sanders closed 4 days ago

oliver-sanders commented 2 months ago

The workflow-state command defaults to polling task status rather than task trigger.

The CLI upgrade advise tells you to upgrade an existing message poller into a status poller:

$ cylc workflow-state generic --point 20191209T1200Z --task bar --message=submitted
WARNING - --task, --status, --message, --output, --point, --task-point are deprecated. Please use an ID:
    generic//20191209T1200Z/bar:submitted

This is inconsistent with the xtrigger upgrade advice which tells you to use is_message=True:

        workflow_state(message=submitted, point=1234, task=foo, workflow=ab) -->
    workflow_state(workflow_task_id=ab//1234/foo:submitted, is_message=True)

The CLI advice becomes a problem in the case of the submitted output. Because submitted is a status, it defaults to status polling. However, the submitted status is transitory so this test is not safe.

Suggest:

hjoliver commented 2 months ago

I commented on this in the recent workflow-state overhaul PR, here:

https://github.com/cylc/cylc-flow/pull/5809#issuecomment-2149481816

Initially I did automatically convert transient statuses to outputs, but backed out of that for the following reasons:

Maybe that was the wrong call, but @MetRonnie seemed satisfied at the time.

hjoliver commented 2 months ago

The CLI upgrade advise tells you to upgrade an existing message poller into a status poller:

Definitely not deliberate.

Suggest:

Agreed on all counts.