Commit 3892394
💥 Standalone Activities for Java (#2858)
* vc
* Integration tests.
* Options .toBuilder() should duplicate 'this'.
* equals and hashCode for StartActivityOptions
* Only throw ActivityAlreadyStartedException if error detail is present
* Same for getActivityResult
* equals/hashcode/tostring for ActivityExecution
Remove isEmpty() check from isWorkflowActivity.
* use-api-design
* match fully
* More tests
* Rename ActivityExecution to ActivityExecutionMetadata.
* Store ActivityExecutionInfo instead of DescribeActivityExecutionResponse.
* Rename getRetryPolicy to getRetryOptions.
* Missing methods in ActivityExecutionDescription.
* Correct naming for interceptor interfaces.
* Update ActivityInfo interface.
* More tests.
* Tests for standalone completion client methods.
* Interceptor tests.
* Nullable fields.
* swap args
* Rename IsInWorkflow to IsWorkflowActivity.
* Test: contextPropagatorValueAppearsInStartActivityHeader.
* Revert "Test: contextPropagatorValueAppearsInStartActivityHeader."
This reverts commit 381e66c.
* ActivityClientInterceptor and ActivityClientInterceptorBase.
* Correct order for activity interceptors.
* Rename to initializeClientInvoker.
* Javadoc warnings, unused classes, a deprecated method.
* Remove runtime rethrow.
* Pass null instead of "" for summary/details.
* Remove section dividers.
* useless test comments
* Enable SAA in test server.
* Remove trivial tests.
* wip
* Rename to ActivityClientCallsInterceptorBaseTest.
* Non-mocked completion client tests.
* Tweak javadoc
* Box for capturing
* Box for capturing
* MethodExtractor
* All overloads of same
* Refactor ME
* .start() pulls headers from context propagators.
* Distinguish standalone method names in completion client.
* Use long poll token in describeActivity.
* Expose lastFailure and raw proto on ActivityExecutionDescription.
* Completion handled at gPRC layer.
* Cache for ActivityHandleImpl.getResultAsync.
* Rename ActivityHandleWrapper to ActivityHandleImpl.
* Javadoc for ActivityClientCallsInterceptor
* ActivityException base class
* Remove throws clauses for unchecked exceptions
* Don't expose ActivityClient.listExecutionsPaginated
* Examples for all overloads in ActivityClient
* Update temporal-sdk/src/main/java/io/temporal/client/ActivityClient.java
Co-authored-by: Quinn Klassen <klassenq@gmail.com>
* Finish removing implementation detail in comment.
* Remove trivial tests
* Update testFromUntypedWithExplicitTypePassesTypeToInterceptor to make sure type is forwarded
* testGetActivityResultAsyncDelegatesToNext
* Javadoc: missing import
* Revert "Use long poll token in describeActivity."
This reverts commit 749a8c7.
* Address small review changes
* Default implementations for some untyped execute/executeAsync
* Remove ActivityCountOptions
* Apply DataConverter to results of .getLastFailure
* Polling can outlast server timeout
* Remove ActivityListOptions and ActivityListPaginatedOptions; keep both listActivities and listActivitiesPaginated in the interceptor
* getResult/Async continue polling across the server's long-poll boundary
* getResult/Async continue polling across the server's long-poll boundary and the client's rpc boundary (this and previous)
* Split slow tests for speed
* Increase timeout tolerance for GetActivityResultOverLongPollWaitTest.
* Remaining two default overloads of execute/executeAsync, and remove redundant Impl implementations.
* Remove unused listActivitiesPaginated interceptor
* Add overload to ActivityHandle.getResult with timeout.
Implemented this by adding a Deadline to RootActivityClientInvoker.getActivityResult.
Also:
In tests, use .start(...).get() instead of .executeAsync, for clarity.
Added stopwatch check to testGetActivityResultAsyncTimeoutAbortsPolling to avoid possibility of false negative.
* TODO
* getWorkflowNamespace returns null if no workflow execution
* Update comment on ActivityInfo for getActivityNamespace() returning null for SAA.
* Remove result caching, will revisit later.
* Rename isWorkflowActivity to isInWorkflow
* Remove default ActivityClientCallsInterceptor.getActivityResultAsync
* Move Func7 to the correct spot
* Remove internal ActivityExecutionDescription.info()
* Tests that check that both only scheduleToCloseTimeout and only startToCloseTimeout are allowed.
* ActivityClientCallsInterceptorChainTest: confirm ordering for 2 interceptors with real ActivityClient.
* Added tests testGetHandleWithNullRunId and testVoidExecuteOverloadDiscardsNonVoidResult.
Renames: ActivityInfoStandaloneTest -> ActivityInfoImplTest, testDescribeNoToken -> testDescribe in ActivityHandleImplTest.
---------
Co-authored-by: Quinn Klassen <klassenq@gmail.com>1 parent 4b2c294 commit 3892394
55 files changed
Lines changed: 7597 additions & 27 deletions
File tree
- .github/workflows
- contrib/temporal-opentracing/src/main/java/io/temporal/opentracing/internal
- temporal-sdk/src
- main/java/io/temporal
- activity
- client
- common/interceptors
- internal
- activity
- client
- external
- util
- payload/context
- workflow
- test/java/io/temporal
- activity
- client
- functional
- common/interceptors
- internal
- activity
- client
- util
- payload/context
- temporal-serviceclient/src/main/java/io/temporal/serviceclient
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
114 | 118 | | |
115 | 119 | | |
116 | 120 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
Lines changed: 40 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
29 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
30 | 35 | | |
| 36 | + | |
| 37 | + | |
31 | 38 | | |
32 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
33 | 54 | | |
34 | 55 | | |
35 | 56 | | |
| |||
82 | 103 | | |
83 | 104 | | |
84 | 105 | | |
85 | | - | |
| 106 | + | |
| 107 | + | |
86 | 108 | | |
| 109 | + | |
87 | 110 | | |
88 | 111 | | |
89 | 112 | | |
| |||
92 | 115 | | |
93 | 116 | | |
94 | 117 | | |
95 | | - | |
| 118 | + | |
| 119 | + | |
96 | 120 | | |
97 | 121 | | |
98 | 122 | | |
| 123 | + | |
99 | 124 | | |
100 | 125 | | |
101 | 126 | | |
| |||
110 | 135 | | |
111 | 136 | | |
112 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
113 | 141 | | |
114 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
115 | 151 | | |
116 | 152 | | |
117 | 153 | | |
| |||
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
0 commit comments