-
Notifications
You must be signed in to change notification settings - Fork 146
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 support for user meta data #2218
Add support for user meta data #2218
Conversation
* <p>Default is none/empty. | ||
*/ | ||
@Experimental | ||
public Builder setStaticSummary(String staticSummary) { |
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 not gonna work until temporalio/temporal#6446 is in a released server version, unsure if you want to wait to expose until then. I do see the test is skipped currently for real servers.
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.
Yes this should be in 1.25.0
and the tests are skipped for the test server, not the real server
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.
Hrmm, child workflows may not have made the initial version (they weren't initially wired up). @gow - can you confirm whether or not the child workflow user metadata propagation is in a tagged server version?
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.
temporalio/temporal@dd0c6ca is part of release/v1.25.x and a parent of temporalio/temporal@be848c8
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.
Yes. It's included in 1.25 release - temporalio/temporal@v1.25.0...main
temporal-sdk/src/main/java/io/temporal/workflow/TimerOptions.java
Outdated
Show resolved
Hide resolved
temporal-sdk/src/main/java/io/temporal/workflow/TimerOptions.java
Outdated
Show resolved
Hide resolved
import org.junit.Rule; | ||
import org.junit.Test; | ||
|
||
public class ChildWorkflowMetadataTest { |
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.
Any integration/e2e tests for regular (i.e. non-child) workflows with static summary/details? Or is that more difficult because it requires test server support?
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 test also covers that, we test the parent workflow as well
@@ -89,6 +89,11 @@ public static Promise<Void> newTimer(Duration duration) { | |||
return getWorkflowOutboundInterceptor().newTimer(duration); | |||
} | |||
|
|||
public static Promise<Void> newTimer(Duration duration, TimerOptions options) { |
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.
@cretz one thing I debated on was if I should include duration
in TimerOptions
. We didn't in Go, but I didn't couldn't find a strong reason why?
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 strong reason. We just figured in Go (and other langs?) that having required duration in both overloaded forms makes sense, and these are just "additional" options beyond duration. If we want to change that stance (here or there), I have no strong opinion, and now would be the time to do it.
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.
One minor thing, then LGTM
Add support for user metadata on workflows and timer events. Other events can be added in the future, just picked these events to match the Go SDK.
Note: This does NOT cover
__temporal_workflow_metadata
, that feature is tracked herecloses #2216