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

Support filtering waves by status and tag #354

Merged
merged 2 commits into from
Dec 22, 2023
Merged

Conversation

vkhoroz
Copy link
Member

@vkhoroz vkhoroz commented Dec 22, 2023

No description provided.

@vkhoroz vkhoroz self-assigned this Dec 22, 2023
@vkhoroz vkhoroz merged commit 9ce92c9 into main Dec 22, 2023
8 checks passed
@vkhoroz vkhoroz deleted the vkhoroz-wave-filter branch December 22, 2023 15:07
@@ -18,17 +18,17 @@ func init() {
cmd.AddCommand(listCmd)
listCmd.Flags().Uint64P("limit", "n", 20, "Limit the number of results displayed.")
listCmd.Flags().Uint64P("page", "p", 1, "Page of waves to display when pagination is needed")
listCmd.Flags().BoolP("only-active", "", false, "Only show currently active waves")
listCmd.Flags().StringP("status", "S", "", "Only show waves with a given status; one of (active, complete, canceled)")
Copy link
Member

Choose a reason for hiding this comment

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

I noticed we aren't super graceful when handling a bad status flag:

$ fioctl waves list --status foo
ERROR: HTTP error during GET 'https://api.foundries.io/ota/factories/andy-corp/waves/?limit=20&page=1&status=foo': 400 BAD REQUEST
= Input payload validation failed
 * status: Filter waves by status The value 'foo' is not a valid choice for 'status'.

I seem to remember Cobra doesn't really do enums so this might be about the best we can do w/o adding a bunch of code.

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.

2 participants