-
Notifications
You must be signed in to change notification settings - Fork 166
Add support for metadata to test server #2441
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,6 +136,22 @@ public interface WorkflowInfo { | |
*/ | ||
Optional<String> getParentRunId(); | ||
|
||
/** | ||
* @return Workflow ID of the root Workflow | ||
* @apiNote On server versions prior to v1.27.0, this method will return null. Otherwise, it will | ||
* always return a non-null value. | ||
*/ | ||
@Nullable | ||
String getRootWorkflowId(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 |
||
|
||
/** | ||
* @return Run ID of the root Workflow | ||
* @apiNote On server versions prior to v1.27.0, this method will return null. Otherwise, it will | ||
* always return a non-null value. | ||
*/ | ||
@Nullable | ||
String getRootRunId(); | ||
|
||
/** | ||
* @return Workflow retry attempt handled by this Workflow code execution. Starts on "1". | ||
*/ | ||
|
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