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

config: more helpful error message on cli misuse #2974

Conversation

oliver-sanders
Copy link
Member

Response to user request for more informative feedback in the event that a user misses a -s flag when attempting to run a non-cycling suite e.g:

$ cylc run mysuite FOO=BAR
...
Conflicting syntax: 'integer vs cycling suite: are you missing a [dependencies][[[R1]]] section?'

It's difficult to provide suggestive feedback as it is not clear what the user's intent was. Also there are other ways we could end up with a malformed = separated pair on the CLI.

$ cylc run mysuite mode=simulation

@oliver-sanders oliver-sanders added this to the next-release milestone Mar 5, 2019
@oliver-sanders oliver-sanders self-assigned this Mar 5, 2019

def __str__(self):
return repr(self.msg)
Copy link
Member Author

Choose a reason for hiding this comment

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

This will probably break the test battery, if we are happy with this approach (removing the repr logic) I'll go through and fix any failures.

Copy link
Contributor

Choose a reason for hiding this comment

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

It broke everything last time I tried this. Good luck! 😉

Copy link
Contributor

@matthewrmshin matthewrmshin left a comment

Choose a reason for hiding this comment

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

Change is good otherwise.


def __str__(self):
return repr(self.msg)
Copy link
Contributor

Choose a reason for hiding this comment

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

It broke everything last time I tried this. Good luck! 😉

Copy link
Member

@kinow kinow left a comment

Choose a reason for hiding this comment

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

Looks good to me too! Merging! The one issue Codacy complains is actually a complexity increase, due to an extra if. Not really an issue IMO 🎉

@kinow
Copy link
Member

kinow commented Mar 7, 2019

Oh, actually looking at Travis now before merging... if it's failing due to one of those flaky tests, I'll kick it a few times.

@kinow
Copy link
Member

kinow commented Mar 7, 2019

This will probably break the test battery, if we are happy with this approach (removing the repr logic) I'll go through and fix any failures.

@oliver-sanders you got two 👍 here, and I just kicked Travis (just in case) but looks like it was as you suggested, and the test battery is now broken.

If you could fix it, then I think this will be ready to be merged.

@cylc cylc deleted a comment Mar 7, 2019
@oliver-sanders oliver-sanders force-pushed the cylc-run-invalid-cycle-point-conflicting-syntax branch from 501bcae to c21bf37 Compare March 7, 2019 14:13
@cylc cylc deleted a comment Mar 7, 2019
@matthewrmshin matthewrmshin mentioned this pull request Mar 7, 2019
5 tasks
@hjoliver
Copy link
Member

Now conflicted!

@oliver-sanders oliver-sanders changed the base branch from master to 7.8.x March 12, 2019 09:59
@oliver-sanders
Copy link
Member Author

oliver-sanders commented Mar 12, 2019

Have changed the base to 7.8.x, will address this on master in #2982.

@oliver-sanders oliver-sanders force-pushed the cylc-run-invalid-cycle-point-conflicting-syntax branch 2 times, most recently from a6b8f76 to c7b3249 Compare March 12, 2019 10:07
@oliver-sanders oliver-sanders force-pushed the cylc-run-invalid-cycle-point-conflicting-syntax branch from c7b3249 to 6472d9b Compare March 12, 2019 10:09
@cylc cylc deleted a comment Mar 12, 2019
@matthewrmshin
Copy link
Contributor

Re-approve after re-base. @kinow please perform similar sanity check and merge.

@kinow
Copy link
Member

kinow commented Mar 13, 2019

Looks good to me, merging!

@kinow kinow merged commit ac76150 into cylc:7.8.x Mar 13, 2019
@oliver-sanders oliver-sanders deleted the cylc-run-invalid-cycle-point-conflicting-syntax branch March 14, 2019 09:45
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.

4 participants