-
Notifications
You must be signed in to change notification settings - Fork 244
Add high level workflow describe #1924
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
Add high level workflow describe #1924
Conversation
client/client.go
Outdated
// - serviceerror.Internal | ||
// - serviceerror.Unavailable | ||
// - serviceerror.NotFound | ||
DescribeWorkflow(ctx context.Context, workflowID, runID string) (*DescribeWorkflowExecution, 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.
Returned a pointer here for consistency with some other APIs
@@ -901,6 +917,27 @@ type QueryWorkflowWithOptionsResponse struct { | |||
QueryRejected *querypb.QueryRejected | |||
} | |||
|
|||
type WorkflowExecutionMetadata struct { |
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 picked fields to expsoe here based of what dotnet exposed https://github.com/temporalio/sdk-dotnet/blob/main/src/Temporalio/Client/WorkflowExecutionDescription.cs#L10
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.
Works for me, though not the biggest fan of the term "metadata", but I know it's what Java uses, so up to you. I figure one day we'll deprecate all the bad forms of "list" and have a new "list" call that returns iter.Seq[WorkflowExecutionMetadata]
, but not sure if that affects your name choice.
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.
If you have a different name I am open to suggestions, when we add list I was going to add another type that would also embedded WorkflowExecutionMetadata
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, since WorkflowExecution
is already in use elsewhere, this is fine. Not sure at list time we need another type since list contents should be a subset of describe, but can discuss at that time.
client/client.go
Outdated
// - serviceerror.Internal | ||
// - serviceerror.Unavailable | ||
// - serviceerror.NotFound | ||
DescribeWorkflow(ctx context.Context, workflowID, runID string) (*DescribeWorkflowExecution, 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.
Do we want to accept DescribeWorkflowOptions
for future proofing?
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 was thinking we would add DescribeWorkflowWithOptions
if we ever add more options here
@@ -901,6 +917,27 @@ type QueryWorkflowWithOptionsResponse struct { | |||
QueryRejected *querypb.QueryRejected | |||
} | |||
|
|||
type WorkflowExecutionMetadata struct { |
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.
Works for me, though not the biggest fan of the term "metadata", but I know it's what Java uses, so up to you. I figure one day we'll deprecate all the bad forms of "list" and have a new "list" call that returns iter.Seq[WorkflowExecutionMetadata]
, but not sure if that affects your name choice.
// GetStaticSummary returns the summary set on workflow start. | ||
// | ||
// NOTE: Experimental | ||
func (w *WorkflowExecutionDescription) GetStaticSummary() (string, 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.
Arguably could be worth memoizing e.g. behind a sync.Once, but no strong opinion
9021a9b
to
aa30f1b
Compare
aa30f1b
to
095000f
Compare
Add high level workflow describe
close #1667