-
Notifications
You must be signed in to change notification settings - Fork 152
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 metadata to test server #2441
Add support for metadata to test server #2441
Conversation
* @return Workflow ID of the root Workflow | ||
*/ | ||
@Nullable | ||
String getRootWorkflowId(); |
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 a bit awkward since this can only be null on old servers that didn't have this value.
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, may be worth documenting that here in the javadoc. I do appreciate that this is not using Optional
.
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.
Minor things, nothing blocking
* @return Workflow ID of the root Workflow | ||
*/ | ||
@Nullable | ||
String getRootWorkflowId(); |
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, may be worth documenting that here in the javadoc. I do appreciate that this is not using Optional
.
/** Get the fixed summary for this workflow execution. */ | ||
@Experimental | ||
@Nullable | ||
public String getStaticSummary() { |
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.
Might consider memoizing this (e.g. backed by an AtomicReference
). If not, at least worth clarifying in the javadoc each invocation does data conversion.
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.
We generally don't ever memoize conversion for these type of things, same for memo
. I'll note in the docs
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 wonder if it's worth a more generic implementation of command-to-event user metadata propagation like server instead of the only known current use cases. This would make it more future proof. I understand it'd change the code a bit since there is no generic place where an event is created from a command nor is there a common place to affect an event after it is created. Up to you.
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 possibly, child workflow would still need some special logic, but yeah this should be generic
c90dad2
to
763c7ff
Compare
This PR does a few things:
closes: