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
fix(cli): Check mutual exclusivity for argo CLI flags #3493
Conversation
Could I ask that you also go over the rest of the flags and commands and do all mutex checks that are applicable? |
@simster7 Absolutely. I'll include all changes in this PR. |
@simster7 Just went over and there doesn't seem to be many of them left. I updated the PR with the ones I found. The build failure is unrelated. |
Can you please investigate failing tests? |
I am seeing the following error that's unrelated to this PR. It also happens in other PRs as well, e.g. #3488.
|
The failing test is:
Tip: search for Could this be related to this PR? |
Signed-off-by: terrytangyuan <terrytangyuan@gmail.com>
Signed-off-by: terrytangyuan <terrytangyuan@gmail.com>
Signed-off-by: terrytangyuan <terrytangyuan@gmail.com>
@alexec Thanks! That's good tip. It's fixed now. |
test/e2e/cli_test.go
Outdated
@@ -391,7 +391,7 @@ func (s *CLISuite) TestWorkflowDeleteAll() { | |||
SubmitWorkflow(). | |||
WaitForWorkflow(30*time.Second). | |||
Given(). | |||
RunCli([]string{"delete", "--all", "-l", "argo-e2e"}, func(t *testing.T, output string, err error) { | |||
RunCli([]string{"delete", "--all"}, func(t *testing.T, output string, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can't be correct - all workflows created by e2e test must get this label - so this probably means there is a bug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you clarify where is incorrect? There is only one workflow called basic at this point so deleting all would just means only this workflow gets deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All test workflows must be annotated with argo-e2e
- if it fails to delete, then it indicates that --all
is not deleting all workflows labelled with argo-e2e
. --all
should work with -l
, but does not appear to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I see. I've reverted the flag check in delete command. Please take another look.
Signed-off-by: terrytangyuan <terrytangyuan@gmail.com>
This sets the right expectations to users.
--resubmitted
can be used jointly while--completed
and--running
are mutually exclusive.Signed-off-by: terrytangyuan terrytangyuan@gmail.com
Checklist:
"fix(controller): Updates such and such. Fixes #1234"
.