-
Notifications
You must be signed in to change notification settings - Fork 158
Respect WorkflowClientInterceptors in newUntypedWorkflowStub(WorkflowExecution, ...) #813
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Respect WorkflowClientInterceptors in newUntypedWorkflowStub(WorkflowExecution, ...) #813
Conversation
@nagl-stripe Thanks for the PR! |
Yes please - it passes locally. |
|
…TestWorkflowEnvironmentSleepTest
The CI failure was just a misalignment between two timeouts. I'd made a last minute change to one, but not both, and hadn't tested after. |
Hello, after having upgrade from 1.1.0 to 1.6.0 and a long day of debugging, I found out, using git bisect that this PR was leading to one of my test failing.
The only way I found to make it pass again, except by removing this commit, was to do add a sleep before the "newUntypedWorkflowStub" where sleep ends after all activities run, i found that useful comment https://github.com/temporalio/sdk-java/blob/v1.5.0/temporal-sdk/src/test/java/io/temporal/workflow/cancellationTests/ActivityCancellationTest.java#L59 While I understand the goal of this PR, it seems to not work for such use case. Is there a method to remove timeskipping interceptors? maybe it is not related to that EDIT: it is fixed in 1.7.0, thanks! |
@nmeylan Right now time-skipping is always on by default for tests, yes. And it was this bug that it wasn't for only this one method of creating the stubs. |
See #937 |
What was changed
This PR contains a bug report in the form of a test case, and also a proposed fix.
WARNING: This is only a suggested fix. Be paranoid.
Given some of the
@Deprecated
warnings around these calls, I'm not sure if the fix I made is the right one or not. Maybe the problem is actually somewhere inTestWorkflowEnvironmentInternal
? Maybe it's inTimeLockingInterceptor
itself? (Perhaps it should overloadworkflowClientCallsInterceptor
?).Context
I have a java user at Stripe who is writing tests for a flow that starts a long-lived workflow, stores its wf-id/run-id, and checks up on it later. I think they've found a bug around
TestWorkflowEnvironment
, where timeskipping is enabled or not based on which overload ofnewUntypedWorkflowStub
you use.Why?
This change makes it so that all 3 overloads of
newUntypedWorkflowStub
wire in theWorkflowClientInterceptors
. This is particularly important for theTestWorkflowEnvironment
, which uses an interceptor to enable timeskipping.Checklist
Closes (...I didn't file a bug, but I'm happy to make one, especially if the fix is more involved)
How was this tested:
./gradlew test
passes, and I added a test toTestWorkflowEnvironmentSleepTest
that fails if you remove the fix.Any docs updates needed?
No