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

cylc message: three or more outputs cause problems #5883

Open
oliver-sanders opened this issue Dec 15, 2023 · 3 comments · May be fixed by #5921
Open

cylc message: three or more outputs cause problems #5883

oliver-sanders opened this issue Dec 15, 2023 · 3 comments · May be fixed by #5921
Assignees
Labels
Milestone

Comments

@oliver-sanders
Copy link
Member

In a task script you can do this:

cylc message -- x
cylc message -- y

Or, for efficiency, you could do this:

cylc message -- x y

Which does the same thing with one less call. But for some reason this:

cylc message -- x y z

Does not work:

InputError: Workflow ID not found: x

Yet this usage appears to be supported:

Usage: cylc message [OPTIONS] -- [WORKFLOW] [JOB] [[SEVERITY:]MESSAGE ...]

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.

@oliver-sanders oliver-sanders added this to the cylc-8.x milestone Dec 15, 2023
@wxtim wxtim self-assigned this Jan 11, 2024
@wxtim
Copy link
Member

wxtim commented Jan 11, 2024

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?

@oliver-sanders
Copy link
Member Author

Note the command usage:

$ cylc message --help
Usage: cylc message [OPTIONS] -- [WORKFLOW] [JOB] [[SEVERITY:]MESSAGE ...] 

@wxtim
Copy link
Member

wxtim commented Jan 11, 2024

Usage: cylc message [OPTIONS] -- [WORKFLOW JOB [[SEVERITY:]MESSAGE ...]]]
Usage: cylc message [OPTIONS] -- [SEVERITY:]MESSAGE [[SEVERITY:]MESSAGE]

@wxtim wxtim linked a pull request Jan 12, 2024 that will close this issue
7 tasks
@wxtim wxtim linked a pull request Jan 16, 2024 that will close this issue
7 tasks
@oliver-sanders oliver-sanders modified the milestones: cylc-8.x, 8.2.x Feb 22, 2024
@MetRonnie MetRonnie modified the milestones: 8.2.x, 8.3.x May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants