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

Log command validation errors #6164

Merged

Conversation

oliver-sanders
Copy link
Member

@oliver-sanders oliver-sanders commented Jun 20, 2024

Follow up from #6112

Full exception traceback is reported in debug mode, but nothing gets logged in normal mode which is a tad unhelpful for determining why user's commands failed in retrospect, whoops.

To test, try using this cylc set command:

$ cylc vip
$ cylc set <workflow>//1/a --pre=1/a,all
--pre=all must be used alone

The error that is returned to the user via the CLI should also be logged in the workflow log like so:

$ cylc cat generic
...
INFO - Pausing the workflow: Paused on start up
WARNING - Command "set" received.
    InputError: --pre=all must be used alone

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.

@oliver-sanders oliver-sanders added this to the 8.3.1 milestone Jun 20, 2024
@oliver-sanders oliver-sanders self-assigned this Jun 20, 2024
@oliver-sanders oliver-sanders changed the base branch from master to 8.3.x June 21, 2024 13:39
@oliver-sanders oliver-sanders marked this pull request as ready for review June 27, 2024 10:11
Copy link
Member

@wxtim wxtim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable. Tested as working.

@markgrahamdawson markgrahamdawson merged commit 6d31111 into cylc:8.3.x Jul 2, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants