-
Notifications
You must be signed in to change notification settings - Fork 42
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
Enhance task-queue describe #399
Conversation
common/defs-flags.go
Outdated
@@ -135,6 +135,7 @@ const ( | |||
// Task Queue flags | |||
FlagTaskQueueName = "Name of the Task Queue." | |||
FlagTaskQueueTypeDefinition = "Task Queue type [workflow|activity]" | |||
FlagPartitionsDefinition = "Query for all partitions up to this number" |
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.
Since this may be removed in the future when implemented server-side, can we mark this flag as experimental and add a note?
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.
definitely
taskqueue/task_queue_commands.go
Outdated
return output.PrintItems(c, items, opts) | ||
|
||
opts = &output.PrintOptions{ | ||
Fields: []string{"Partition", "PollerInfo.Identity", "PollerInfo.LastAccessTime", "PollerInfo.RatePerSecond", "VersionCaps.BuildId", "VersionCaps.UseVersioning"}, |
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.
Can we spell Capabilities
out or use a different field name?
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.
I would use WorkerVersionCapabilities
but that would shadow the field in PollerInfo
. How about Versioning
?
note that the first part of the field name is not displayed in table view, so it's mostly not visible. it is in card view or as the input to --fields
taskqueue/task_queue_commands.go
Outdated
// copy this out to display nicer in table or card, but not json | ||
VersionCaps *commonpb.WorkerVersionCapabilities `json:"-"` |
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.
Is this still printed in the JSON view, just not flattened?
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.
yeah, it's in pollerinfo. but the table+card output functions can't handle doubly-nested fields so I had to pull it out. but json can of course (if I handle it separately)
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.
btw, this is admittedly a bit of a hack: the output library is not meant to be used twice in one invocation, it won't work well with a pager. but there are already a bunch of pager-related bugs, and we'll probably rewrite this all soon. I just didn't want to throw away the code I used for debugging.
common/defs-flags.go
Outdated
@@ -135,6 +135,7 @@ const ( | |||
// Task Queue flags | |||
FlagTaskQueueName = "Name of the Task Queue." | |||
FlagTaskQueueTypeDefinition = "Task Queue type [workflow|activity]" | |||
FlagPartitionsDefinition = "Query for all partitions up to this number" |
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.
definitely
taskqueue/task_queue_commands.go
Outdated
// copy this out to display nicer in table or card, but not json | ||
VersionCaps *commonpb.WorkerVersionCapabilities `json:"-"` |
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.
yeah, it's in pollerinfo. but the table+card output functions can't handle doubly-nested fields so I had to pull it out. but json can of course (if I handle it separately)
taskqueue/task_queue_commands.go
Outdated
return output.PrintItems(c, items, opts) | ||
|
||
opts = &output.PrintOptions{ | ||
Fields: []string{"Partition", "PollerInfo.Identity", "PollerInfo.LastAccessTime", "PollerInfo.RatePerSecond", "VersionCaps.BuildId", "VersionCaps.UseVersioning"}, |
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.
I would use WorkerVersionCapabilities
but that would shadow the field in PollerInfo
. How about Versioning
?
note that the first part of the field name is not displayed in table view, so it's mostly not visible. it is in card view or as the input to --fields
What was changed
temporal task-queue describe
prints theTaskQueueStatus
parts of theDescribeTaskQueue
response--partitions
flag to query for multiple partitions.Partition fan-out is more properly done server-side, but that'll take longer and in the meantime (and on older server versions) this is still useful.
Why?
More useful for debugging.
Checklist
Closes
How was this tested:
Manually
Any docs updates needed?