Skip to content

Commit 5e0a8f6

Browse files
committed
chore: test and protos
Signed-off-by: Javier Aliaga <[email protected]>
1 parent baa8dd7 commit 5e0a8f6

File tree

5 files changed

+25
-12
lines changed

5 files changed

+25
-12
lines changed

client/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ dependencies {
3939

4040
testImplementation(platform('org.junit:junit-bom:5.7.2'))
4141
testImplementation('org.junit.jupiter:junit-jupiter')
42+
testRuntimeOnly('org.junit.platform:junit-platform-launcher')
43+
4244

4345
// Netty dependencies for TLS
4446
implementation "io.grpc:grpc-netty-shaded:${grpcVersion}"

client/src/test/java/io/dapr/durabletask/ErrorHandlingIntegrationTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import java.util.concurrent.atomic.AtomicBoolean;
1414
import java.util.concurrent.atomic.AtomicInteger;
1515

16-
import org.junit.jupiter.api.BeforeEach;
1716
import static org.junit.jupiter.api.Assertions.*;
1817

1918
/**

client/src/test/java/io/dapr/durabletask/IntegrationTests.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import java.util.stream.Stream;
3434

3535
import org.junit.jupiter.api.AfterEach;
36-
import org.junit.jupiter.api.BeforeEach;
3736
import org.junit.jupiter.api.Disabled;
3837
import org.junit.jupiter.api.Tag;
3938
import org.junit.jupiter.api.Test;
@@ -1062,7 +1061,6 @@ void purgeInstanceFilter() throws TimeoutException {
10621061

10631062
DurableTaskClient client = new DurableTaskGrpcClientBuilder().build();
10641063
try (worker; client) {
1065-
client.createTaskHub(true);
10661064
Instant startTime = Instant.now();
10671065

10681066
String instanceId = client.scheduleNewOrchestrationInstance(orchestratorName, 0);
@@ -1616,7 +1614,6 @@ public void taskExecutionIdTest() {
16161614
DurableTaskClient client = new DurableTaskGrpcClientBuilder().build();
16171615

16181616
try(worker; client) {
1619-
client.createTaskHub(true);
16201617
String instanceId = client.scheduleNewOrchestrationInstance(orchestratorName);
16211618
OrchestrationMetadata instance = client.waitForInstanceCompletion(instanceId, defaultTimeout, true);
16221619
assertNotNull(instance);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cc00765eeb3307f8fdac7da610915d3a0757702b
1+
545663a4db0040bb02c642c27010e337b9be8d31

internal/durabletask-protobuf/protos/orchestrator_service.proto

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
syntax = "proto3";
55

6-
option csharp_namespace = "Microsoft.DurableTask.Protobuf";
6+
option csharp_namespace = "Dapr.DurableTask.Protobuf";
77
option java_package = "io.dapr.durabletask.implementation.protobuf";
88
option go_package = "/api/protos";
99

@@ -12,6 +12,11 @@ import "google/protobuf/duration.proto";
1212
import "google/protobuf/wrappers.proto";
1313
import "google/protobuf/empty.proto";
1414

15+
message TaskRouter {
16+
string source = 1; // orchestrationAppID
17+
optional string target = 2; // appID
18+
}
19+
1520
message OrchestrationInstance {
1621
string instanceId = 1;
1722
google.protobuf.StringValue executionId = 2;
@@ -24,6 +29,7 @@ message ActivityRequest {
2429
OrchestrationInstance orchestrationInstance = 4;
2530
int32 taskId = 5;
2631
TraceContext parentTraceContext = 6;
32+
string taskExecutionId = 7;
2733
}
2834

2935
message ActivityResponse {
@@ -94,16 +100,19 @@ message TaskScheduledEvent {
94100
google.protobuf.StringValue version = 2;
95101
google.protobuf.StringValue input = 3;
96102
TraceContext parentTraceContext = 4;
103+
string taskExecutionId = 5;
97104
}
98105

99106
message TaskCompletedEvent {
100107
int32 taskScheduledId = 1;
101108
google.protobuf.StringValue result = 2;
109+
string taskExecutionId = 3;
102110
}
103111

104112
message TaskFailedEvent {
105113
int32 taskScheduledId = 1;
106114
TaskFailureDetails failureDetails = 2;
115+
string taskExecutionId = 3;
107116
}
108117

109118
message SubOrchestrationInstanceCreatedEvent {
@@ -192,10 +201,10 @@ message EntityOperationCalledEvent {
192201
}
193202

194203
message EntityLockRequestedEvent {
195-
string criticalSectionId = 1;
204+
string criticalSectionId = 1;
196205
repeated string lockSet = 2;
197206
int32 position = 3;
198-
google.protobuf.StringValue parentInstanceId = 4; // used only within messages, null in histories
207+
google.protobuf.StringValue parentInstanceId = 4; // used only within messages, null in histories
199208
}
200209

201210
message EntityOperationCompletedEvent {
@@ -210,14 +219,14 @@ message EntityOperationFailedEvent {
210219

211220
message EntityUnlockSentEvent {
212221
string criticalSectionId = 1;
213-
google.protobuf.StringValue parentInstanceId = 2; // used only within messages, null in histories
222+
google.protobuf.StringValue parentInstanceId = 2; // used only within messages, null in histories
214223
google.protobuf.StringValue targetInstanceId = 3; // used only within histories, null in messages
215224
}
216225

217226
message EntityLockGrantedEvent {
218227
string criticalSectionId = 1;
219228
}
220-
229+
221230
message HistoryEvent {
222231
int32 eventId = 1;
223232
google.protobuf.Timestamp timestamp = 2;
@@ -244,25 +253,29 @@ message HistoryEvent {
244253
ExecutionResumedEvent executionResumed = 22;
245254
EntityOperationSignaledEvent entityOperationSignaled = 23;
246255
EntityOperationCalledEvent entityOperationCalled = 24;
247-
EntityOperationCompletedEvent entityOperationCompleted = 25;
248-
EntityOperationFailedEvent entityOperationFailed = 26;
256+
EntityOperationCompletedEvent entityOperationCompleted = 25;
257+
EntityOperationFailedEvent entityOperationFailed = 26;
249258
EntityLockRequestedEvent entityLockRequested = 27;
250259
EntityLockGrantedEvent entityLockGranted = 28;
251260
EntityUnlockSentEvent entityUnlockSent = 29;
252261
}
262+
optional TaskRouter router = 30;
253263
}
254264

255265
message ScheduleTaskAction {
256266
string name = 1;
257267
google.protobuf.StringValue version = 2;
258268
google.protobuf.StringValue input = 3;
269+
optional TaskRouter router = 4;
270+
string taskExecutionId = 5;
259271
}
260272

261273
message CreateSubOrchestrationAction {
262274
string instanceId = 1;
263275
string name = 2;
264276
google.protobuf.StringValue version = 3;
265277
google.protobuf.StringValue input = 4;
278+
optional TaskRouter router = 5;
266279
}
267280

268281
message CreateTimerAction {
@@ -311,6 +324,7 @@ message OrchestratorAction {
311324
TerminateOrchestrationAction terminateOrchestration = 7;
312325
SendEntityMessageAction sendEntityMessage = 8;
313326
}
327+
optional TaskRouter router = 9;
314328
}
315329

316330
message OrchestratorRequest {
@@ -320,6 +334,7 @@ message OrchestratorRequest {
320334
repeated HistoryEvent newEvents = 4;
321335
OrchestratorEntityParameters entityParameters = 5;
322336
bool requiresHistoryStreaming = 6;
337+
optional TaskRouter router = 7;
323338
}
324339

325340
message OrchestratorResponse {

0 commit comments

Comments
 (0)