-
Notifications
You must be signed in to change notification settings - Fork 150
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
Move workflow update polling inside of interceptor #2159
Move workflow update polling inside of interceptor #2159
Conversation
public <R> UpdateHandle<R> startUpdate(StartUpdateInput<R> input) { | ||
super.startUpdate(input); |
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.
Side note: Why don't we have something like InputType.fromExisting(input)
and then some way to relatively easily modify the input? It's a bit annoying to have to re-pass every field through to a new constructor if you want to modify inputs.
I get why they're not directly mutable, but, might be nice to have a convenient way to do that.
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.
Modify inputs is not really an encouraged pattern. Not that some users don't but I it is a advanced path to take.
@@ -119,7 +120,7 @@ public <R> QueryOutput<R> query(QueryInput<R> input) { | |||
} | |||
|
|||
@Override | |||
public <R> StartUpdateOutput<R> startUpdate(StartUpdateInput<R> input) { | |||
public <R> UpdateHandle<R> startUpdate(StartUpdateInput<R> input) { |
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.
Hm I wonder if we would ever need to return more then UpdateHandle
here? I think other SDKs just return UpdateHandle
so if we do will have to address in all SDKs
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.
LGTM, thanks!
7405311
to
1cb3b82
Compare
What was changed
Moved update polling to be inside of the interceptor a-la other SDKs
Why?
Consistent, allows interceptor to change things post-polling
Checklist
Closes Java SDK
StartUpdate
waits outside of intercepted call #2094How was this tested:
Added an integ test using the interceptor
Any docs updates needed?