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

fix: improve error message for ListArchivedWorkflows #7345

Merged
merged 2 commits into from
Dec 7, 2021

Conversation

domderen
Copy link
Contributor

@domderen domderen commented Dec 6, 2021

Error message that is returned when user tries to list archived workflows and doesn't specify a namespace is very generic and hard to understand. This PR tries to make it a bit more clear as to what might be the cause of the issue, to help guide the user.

I thought that it might be a good idea to check if namespace is an empty string, and if it is, return a custom error for this case, telling user that namespace can't be empty. But I assume that this would not be correct for cases when Argo-Workflows runs with ClusterRole permissions?

Error message that is returned when user tries to list archived workflows and doesn't specify a namespace is very generic and hard to understand. This PR tries to make it a bit more clear as to what might be the cause of the issue, to help guide the user.

I thought that it might be a good idea to check if `namespace` is an empty string, and if it is, return a custom error for this case, telling user that `namespace` can't be empty. But I assume that this would not be correct for cases when Argo-Workflows runs with ClusterRole permissions?

Signed-off-by: Dominik Deren <dominik.deren@live.com>
Signed-off-by: Dominik Deren <dominik.deren@live.com>
@sarabala1979 sarabala1979 merged commit 1a3b87b into argoproj:master Dec 7, 2021
@domderen domderen deleted the patch-2 branch December 7, 2021 08:58
@sarabala1979 sarabala1979 mentioned this pull request Dec 15, 2021
73 tasks
sarabala1979 pushed a commit that referenced this pull request Dec 15, 2021
* fix: improve error message for ListArchivedWorkflows

Error message that is returned when user tries to list archived workflows and doesn't specify a namespace is very generic and hard to understand. This PR tries to make it a bit more clear as to what might be the cause of the issue, to help guide the user.

I thought that it might be a good idea to check if `namespace` is an empty string, and if it is, return a custom error for this case, telling user that `namespace` can't be empty. But I assume that this would not be correct for cases when Argo-Workflows runs with ClusterRole permissions?

Signed-off-by: Dominik Deren <dominik.deren@live.com>

* Fixing test & adding string formatting.

Signed-off-by: Dominik Deren <dominik.deren@live.com>
@sarabala1979 sarabala1979 mentioned this pull request Mar 1, 2022
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

2 participants