-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Workflow: List -> Show, and Expand Metadata #6544
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
Changes from all commits
030d8b2
3c270d9
1152414
141ff34
6c1fc30
1e51804
8377347
a76f5fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -478,7 +478,7 @@ var commands = []commandGroup{ | |
| "Workflow", []command{ | ||
| {"Workflow", commandWorkflow, | ||
| "<ks.workflow> <action> --dry-run", | ||
| "Start/Stop/Delete/List/ListAll Workflow on all target tablets in workflow. Example: Workflow merchant.morders Start", | ||
| "Start/Stop/Delete/Show/ListAll Workflow on all target tablets in workflow. Example: Workflow merchant.morders Start", | ||
| }, | ||
| }, | ||
| }, | ||
|
|
@@ -2950,6 +2950,10 @@ func commandWorkflow(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag. | |
| } | ||
| keyspace := subFlags.Arg(0) | ||
| action := strings.ToLower(subFlags.Arg(1)) | ||
| // Note: List is deprecated and replaced by show. | ||
| if action == "list" { | ||
| action = "show" | ||
| } | ||
| var workflow string | ||
| var err error | ||
| if action != "listall" { | ||
|
|
@@ -2967,7 +2971,7 @@ func commandWorkflow(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag. | |
| if err != nil { | ||
| return err | ||
| } | ||
| if action == "list" || action == "listall" { | ||
| if action == "show" || action == "listall" { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we not print anything out for
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rohit-nayak-ps this doesn't look right. However, it is unrelated to the changes in this PR so I'm going to move this forward.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The printing happens internally actually. From what I can tell this is a way of handling split code paths from subcommands.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As Peter replied, show/listall follows a separate path and outputs a json doc. Otherwise we just return rows affected (result of vexec for stop/start/delete workflow) |
||
| return nil | ||
| } | ||
| if len(results) == 0 { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.