Skip to content

Commit dc1834e

Browse files
committed
Merging from upstream
2 parents 25c7cb0 + cd2f6bf commit dc1834e

File tree

61 files changed

+2160
-2178
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+2160
-2178
lines changed

.buildkite/pipeline.yml

+15
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ steps:
99
queue: "workers"
1010
docker: "*"
1111
command: "./gradlew --no-daemon test"
12+
timeout_in_minutes: 15
13+
retry:
14+
automatic:
15+
- exit_status: "*"
16+
limit: 3
1217
plugins:
1318
- docker-compose#v3.0.0:
1419
run: unit-test-test-service
@@ -19,6 +24,11 @@ steps:
1924
queue: "workers"
2025
docker: "*"
2126
command: "./gradlew --no-daemon test"
27+
timeout_in_minutes: 15
28+
retry:
29+
automatic:
30+
- exit_status: "*"
31+
limit: 3
2232
plugins:
2333
- docker-compose#v3.0.0:
2434
run: unit-test-docker-sticky-on
@@ -29,6 +39,11 @@ steps:
2939
queue: "workers"
3040
docker: "*"
3141
command: "./gradlew --no-daemon test"
42+
timeout_in_minutes: 15
43+
retry:
44+
automatic:
45+
- exit_status: "*"
46+
limit: 3
3247
plugins:
3348
- docker-compose#v3.0.0:
3449
run: unit-test-docker-sticky-off

CHANGELOG.md

+32
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
# Changelog
22

3+
## 2.7.8
4+
- Fix get raw history
5+
- Improve signal processing error and log
6+
- Fix replay error when querying workflow that contains activity retry
7+
8+
## 2.7.6
9+
- Fix getVersion override when added new version
10+
- Add async signal to untypedstub
11+
- Fix RetryOptions.addDoNotRetry
12+
- Add missing metrics from go client
13+
- Fix a bug in setting retry expiration while getting history
14+
- Fix start async return
15+
16+
## 2.7.5
17+
- Added supports contextPropagators for localActivity
18+
19+
## v2.7.4
20+
- Fix prometheus reporting issue
21+
- Fix Promise.allOf should not block on empty input
22+
- Misc: Added project directory to sourceItems path
23+
- Add async start to untype stub
24+
25+
## v2.7.3
26+
- Add wf type tag in decider metrics scope
27+
- Fix WorkflowStub.fromTyped method
28+
- Added missing fields to local activity task
29+
- Honor user timeout for get workflow result
30+
31+
## v2.7.2
32+
- Fix leak in Async GetWorkflowExecutionHistory
33+
- Fix context timeout in execute workflow
34+
335
## v2.7.1
436
- Fix a bug in build.gradle that prevented javadoc and sources from being published
537

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ Add *cadence-client* as a dependency to your *pom.xml*:
3131
<dependency>
3232
<groupId>com.uber.cadence</groupId>
3333
<artifactId>cadence-client</artifactId>
34-
<version>2.7.1</version>
34+
<version>2.7.8</version>
3535
</dependency>
3636

3737
or to *build.gradle*:
3838

39-
compile group: 'com.uber.cadence', name: 'cadence-client', version: '2.7.1'
39+
compile group: 'com.uber.cadence', name: 'cadence-client', version: '2.7.8'
4040

4141
## Documentation
4242

build.gradle

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
}
66

77
plugins {
8-
id 'net.minecrell.licenser' version '0.4.1'
8+
id "com.github.hierynomus.license" version"0.15.0"
99
id 'com.github.sherter.google-java-format' version '0.8'
1010
id 'net.ltgt.errorprone' version '1.1.1'
1111
id 'java-library'
@@ -37,7 +37,7 @@ googleJavaFormat {
3737
}
3838

3939
group = 'com.uber.cadence'
40-
version = '2.7.1'
40+
version = '2.7.8'
4141

4242
description = '''Uber Cadence Java Client'''
4343

@@ -69,7 +69,9 @@ dependencies {
6969

7070
license {
7171
header rootProject.file('license-header.txt')
72+
skipExistingHeaders true
7273
exclude 'com/uber/cadence/*.java' // generated code
74+
excludes(["**/*.json"])
7375
}
7476

7577
task initDlsSubmodule(type: Exec) {
@@ -215,7 +217,7 @@ task registerDomain(type:JavaExec) {
215217

216218
test {
217219
dependsOn 'registerDomain'
218-
dependsOn 'checkLicenseMain'
220+
dependsOn 'licenseMain'
219221
testLogging {
220222
events 'passed', 'skipped', 'failed'
221223
exceptionFormat 'full'

docker/buildkite/docker-compose.yaml

+2-31
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ services:
77
driver: none
88
ports:
99
- "9042:9042"
10-
networks:
11-
services-network:
12-
aliases:
13-
- cassandra
1410

1511
statsd:
1612
image: hopsoft/graphite-statsd
@@ -21,13 +17,9 @@ services:
2117
- "2003:2003"
2218
- "8125:8125"
2319
- "8126:8126"
24-
networks:
25-
services-network:
26-
aliases:
27-
- statsd
2820

2921
cadence:
30-
image: ubercadence/server:master-auto-setup
22+
image: ubercadence/server:latestRelease-auto-setup
3123
logging:
3224
driver: none
3325
ports:
@@ -41,10 +33,6 @@ services:
4133
depends_on:
4234
- cassandra
4335
- statsd
44-
networks:
45-
services-network:
46-
aliases:
47-
- cadence
4836

4937
unit-test-docker-sticky-off:
5038
build:
@@ -60,10 +48,6 @@ services:
6048
- cadence
6149
volumes:
6250
- "../../:/cadence-java-client"
63-
networks:
64-
services-network:
65-
aliases:
66-
- unit-test-docker-sticky-off
6751

6852
unit-test-docker-sticky-on:
6953
build:
@@ -79,10 +63,6 @@ services:
7963
- cadence
8064
volumes:
8165
- "../../:/cadence-java-client"
82-
networks:
83-
services-network:
84-
aliases:
85-
- unit-test-docker-sticky-on
8666

8767
unit-test-test-service:
8868
build:
@@ -93,13 +73,4 @@ services:
9373
- "USER=unittest"
9474
- "USE_DOCKER_SERVICE=false"
9575
volumes:
96-
- "../../:/cadence-java-client"
97-
networks:
98-
services-network:
99-
aliases:
100-
- unit-test-test-service
101-
102-
networks:
103-
services-network:
104-
name: services-network
105-
driver: bridge
76+
- "../../:/cadence-java-client"

src/main/idls

Submodule idls updated from 0037578 to 3edd104

src/main/java/com/uber/cadence/client/ActivityWorkerShutdownException.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
import java.util.concurrent.TimeUnit;
2222

2323
/**
24-
* Indicates that {@link com.uber.cadence.worker.Worker.Factory#shutdown()} or {@link
25-
* com.uber.cadence.worker.Worker.Factory#shutdownNow()} was called. It is OK to ignore the
26-
* exception to let activity to complete. It assumes that {@link
27-
* com.uber.cadence.worker.Worker.Factory#awaitTermination(long, TimeUnit)} is called with a timeout
24+
* Indicates that {@link com.uber.cadence.worker.WorkerFactory#shutdown()} or {@link
25+
* com.uber.cadence.worker.WorkerFactory#shutdownNow()} was called. It is OK to ignore the exception
26+
* to let activity to complete. It assumes that {@link
27+
* com.uber.cadence.worker.WorkerFactory#awaitTermination(long, TimeUnit)} is called with a timeout
2828
* larger than the activity execution time.
2929
*/
3030
public final class ActivityWorkerShutdownException extends ActivityCompletionException {

src/main/java/com/uber/cadence/client/WorkflowClient.java

+7-58
Original file line numberDiff line numberDiff line change
@@ -107,77 +107,29 @@ public interface WorkflowClient {
107107
/** Replays workflow to the current state and returns empty result or error if replay failed. */
108108
String QUERY_TYPE_REPLAY_ONLY = "__replay_only";
109109

110-
/**
111-
* Creates worker that connects to the local instance of the Cadence Service that listens on a
112-
* default port (7933).
113-
*
114-
* @param domain domain that worker uses to poll.
115-
*/
116-
static WorkflowClient newInstance(String domain) {
117-
return WorkflowClientInternal.newInstance(domain);
118-
}
119-
120-
/**
121-
* Creates worker that connects to the local instance of the Cadence Service that listens on a
122-
* default port (7933).
123-
*
124-
* @param domain domain that worker uses to poll.
125-
* @param options Options (like {@link com.uber.cadence.converter.DataConverter}er override) for
126-
* configuring client.
127-
*/
128-
static WorkflowClient newInstance(String domain, WorkflowClientOptions options) {
129-
return WorkflowClientInternal.newInstance(domain, options);
130-
}
131-
132-
/**
133-
* Creates client that connects to an instance of the Cadence Service.
134-
*
135-
* @param host of the Cadence Service endpoint
136-
* @param port of the Cadence Service endpoint
137-
* @param domain domain that worker uses to poll.
138-
*/
139-
static WorkflowClient newInstance(String host, int port, String domain) {
140-
return WorkflowClientInternal.newInstance(host, port, domain);
141-
}
142-
143-
/**
144-
* Creates client that connects to an instance of the Cadence Service.
145-
*
146-
* @param host of the Cadence Service endpoint
147-
* @param port of the Cadence Service endpoint
148-
* @param domain domain that worker uses to poll.
149-
* @param options Options (like {@link com.uber.cadence.converter.DataConverter}er override) for
150-
* configuring client.
151-
*/
152-
static WorkflowClient newInstance(
153-
String host, int port, String domain, WorkflowClientOptions options) {
154-
return WorkflowClientInternal.newInstance(host, port, domain, options);
155-
}
156-
157110
/**
158111
* Creates client that connects to an instance of the Cadence Service.
159112
*
160113
* @param service client to the Cadence Service endpoint.
161-
* @param domain domain that worker uses to poll.
162114
*/
163-
static WorkflowClient newInstance(IWorkflowService service, String domain) {
164-
return WorkflowClientInternal.newInstance(service, domain);
115+
static WorkflowClient newInstance(IWorkflowService service) {
116+
return WorkflowClientInternal.newInstance(service, WorkflowClientOptions.defaultInstance());
165117
}
166118

167119
/**
168120
* Creates client that connects to an instance of the Cadence Service.
169121
*
170122
* @param service client to the Cadence Service endpoint.
171-
* @param domain domain that worker uses to poll.
172123
* @param options Options (like {@link com.uber.cadence.converter.DataConverter}er override) for
173124
* configuring client.
174125
*/
175-
static WorkflowClient newInstance(
176-
IWorkflowService service, String domain, WorkflowClientOptions options) {
177-
return WorkflowClientInternal.newInstance(service, domain, options);
126+
static WorkflowClient newInstance(IWorkflowService service, WorkflowClientOptions options) {
127+
return WorkflowClientInternal.newInstance(service, options);
178128
}
179129

180-
String getDomain();
130+
WorkflowClientOptions getOptions();
131+
132+
IWorkflowService getService();
181133

182134
/**
183135
* Creates workflow client stub that can be used to start a single workflow execution. The first
@@ -728,7 +680,4 @@ static <A1, A2, A3, A4, A5, A6, R> CompletableFuture<R> execute(
728680
A6 arg6) {
729681
return WorkflowClientInternal.execute(workflow, arg1, arg2, arg3, arg4, arg5, arg6);
730682
}
731-
732-
/** Closes the workflow client and the underlying IWorkflowService when this method is called. */
733-
void close();
734683
}

0 commit comments

Comments
 (0)