Open oliver-sanders opened 11 months ago
The Python 7 and 8 Docstrings contain the following info:
For backward compatibility, if number of arguments is less than or equal to 2,
the command assumes the classic interface, where all arguments are messages.
Otherwise, the first 2 arguments are assumed to be the suite name and the task
job identifier.
So I think that this is working exactly as intended. It does look peculier if you don't spot this documentation.
@oliver-sanders - would you care to close this issue, or would you like me to generate some solutions warning users/documenting this better?
Note the command usage:
$ cylc message --help
Usage: cylc message [OPTIONS] -- [WORKFLOW] [JOB] [[SEVERITY:]MESSAGE ...]
Usage: cylc message [OPTIONS] -- [WORKFLOW JOB [[SEVERITY:]MESSAGE ...]]] Usage: cylc message [OPTIONS] -- [SEVERITY:]MESSAGE [[SEVERITY:]MESSAGE]
@oliver-sanders - What is x in this case:
cylc message -- x y z
Because this works for me, but only if there is a workflow called x
. Else it will fail, and I would expect it to.
In a task script you can do this:
Or, for efficiency, you could do this:
Which does the same thing with one less call. But for some reason this:
Does not work:
Yet this usage appears to be supported:
No one has reported this, so this functionality probably isn't in use or any users of this functionality are still on Cylc 7.
Note, we have to be very careful not to create any breaking changes in the
cylc message
interface as these calls may be embedded in users scripts/executables where they are hard to change.