-
Notifications
You must be signed in to change notification settings - Fork 33
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
User metadata and workflow metadata support #378
Conversation
This reverts commit 64faaf9.
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.
Makes sense to me! Not much to think about really. Left a few comment suggestions
@@ -8,11 +9,23 @@ namespace Temporalio.Worker.Interceptors | |||
/// </summary> | |||
/// <param name="Delay">Delay duration.</param> | |||
/// <param name="CancellationToken">Optional cancellation token.</param> | |||
/// <param name="Summary">Summary for the delay.</param> |
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.
Maybe worth saying "which will appear in the workflow history" or something
For new users it might be really nonobvious why a "delay" would have a summary.
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.
This is the interceptor field (mostly because .NET linting makes me document it). For the one the user calls, in DelayOptions
, it states:
Gets or sets a simple string identifying this timer that may be visible in UI/CLI. While it can be normal text, it is best to treat as a timer ID.
/// This can be in single-line Temporal markdown format. | ||
/// </summary> | ||
/// <remarks>WARNING: This setting is experimental.</remarks> | ||
public string? Summary { get; set; } |
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 one not static?
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.
No, and neither is the timer one. And technically in history, neither is the workflow one. We only call the workflow one StaticSummary
because we want to use the term StaticDetails
and to clarify they are immutable/static and differentiate those from the concept of CurrentDetails
which is mutable. So workflows have "static" summary/details even though they are really just details, but we don't want confused with "current" details. We could not find better terminology for these when we designed them.
@@ -37,6 +37,12 @@ public WorkflowQueryAttribute(string name) | |||
/// </summary> | |||
public string? Name { get; } | |||
|
|||
/// <summary> | |||
/// Gets or sets a short description for this query that may appear in UI/CLI. |
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.
Maybe worth mentioning that this is returned when asking what queries a workflow supports, and that that is what may appear in UI/CLI
@@ -41,6 +41,12 @@ public WorkflowUpdateAttribute() | |||
/// </summary> | |||
public string? Name { get; } | |||
|
|||
/// <summary> | |||
/// Gets or sets a short description for this update that may appear in UI/CLI. |
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.
Same about when this is returned
What was changed
WorkflowOptions.StaticSummary
andWorkflowOptions.StaticDetails
for setting static summary/details on workflow start, workflow signal with start, and schedule workflow actionActivityOptions.Summary
for setting a summary for activity executionsChildWorkflowOptions.StaticSummary
andChildWorkflowOptions.StaticDetails
for setting summary/details on child workflow startWorkflow.DelayWithOptionsAsync
andDelayOptions
for an options-based overload that supports timerSummary
Workflow.WaitConditionWithOptionsAsync
andWaitConditionOptions
for an options-based overload that supports timeout timerSummary
WorkflowExecutionDescription.StaticSummary
andWorkflowExecutionDescription.StaticDetails
for viewing summary/details on workflow describeWorkflow.CurrentDetails
property with get/set, so it can be set with a string visible on workflow metadataDefinition
support for signal, query, and update attributes/definitions__temporal_workflow_metadata
query in workflow instanceCan ignore commits prior to the one for this PR, they are in main already.
Checklist