Skip to content

Commit cfb9da3

Browse files
committed
update protos
Signed-off-by: Cassandra Coyle <[email protected]>
1 parent 5094800 commit cfb9da3

File tree

4 files changed

+31
-9
lines changed

4 files changed

+31
-9
lines changed

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,16 @@ Build & test:
22

33
```shell
44
./gradlew build
5+
```
6+
7+
## Updating Protobuf Definitions
8+
9+
When updating the protobuf definitions in `internal/durabletask-protobuf/protos/orchestrator_service.proto`:
10+
11+
1. Manually copy the updated protobuf file from dapr/durabletask-protobuf
12+
2. Update the commit hash in `internal/durabletask-protobuf/PROTO_SOURCE_COMMIT_HASH` to reflect the new commit
13+
3. Regenerate the Java classes from the protobuf definitions:
14+
15+
```shell
16+
./gradlew generateProto
517
```
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cc00765eeb3307f8fdac7da610915d3a0757702b
1+
ce184193bcf2d4dcf643bcc934d3ea897c4c8c5c

internal/durabletask-protobuf/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Durable Task Protobuf Files
22

3-
This directory contains the protocol buffer definitions used by the Durable Task Framework Java SDK. The files in this directory are automatically downloaded and updated during the build process from the [microsoft/durabletask-protobuf](https://github.com/microsoft/durabletask-protobuf) repository.
3+
This directory contains the protocol buffer definitions used by the Durable Task Framework Java SDK. The files in this directory are automatically downloaded and updated during the build process from the [dapr/durabletask-protobuf](https://github.com/dapr/durabletask-protobuf) repository.
44

55
## Directory Structure
66

internal/durabletask-protobuf/protos/orchestrator_service.proto

Lines changed: 17 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+
string target = 2; // appID
18+
}
19+
1520
message OrchestrationInstance {
1621
string instanceId = 1;
1722
google.protobuf.StringValue executionId = 2;
@@ -192,10 +197,10 @@ message EntityOperationCalledEvent {
192197
}
193198

194199
message EntityLockRequestedEvent {
195-
string criticalSectionId = 1;
200+
string criticalSectionId = 1;
196201
repeated string lockSet = 2;
197202
int32 position = 3;
198-
google.protobuf.StringValue parentInstanceId = 4; // used only within messages, null in histories
203+
google.protobuf.StringValue parentInstanceId = 4; // used only within messages, null in histories
199204
}
200205

201206
message EntityOperationCompletedEvent {
@@ -210,14 +215,14 @@ message EntityOperationFailedEvent {
210215

211216
message EntityUnlockSentEvent {
212217
string criticalSectionId = 1;
213-
google.protobuf.StringValue parentInstanceId = 2; // used only within messages, null in histories
218+
google.protobuf.StringValue parentInstanceId = 2; // used only within messages, null in histories
214219
google.protobuf.StringValue targetInstanceId = 3; // used only within histories, null in messages
215220
}
216221

217222
message EntityLockGrantedEvent {
218223
string criticalSectionId = 1;
219224
}
220-
225+
221226
message HistoryEvent {
222227
int32 eventId = 1;
223228
google.protobuf.Timestamp timestamp = 2;
@@ -244,25 +249,28 @@ message HistoryEvent {
244249
ExecutionResumedEvent executionResumed = 22;
245250
EntityOperationSignaledEvent entityOperationSignaled = 23;
246251
EntityOperationCalledEvent entityOperationCalled = 24;
247-
EntityOperationCompletedEvent entityOperationCompleted = 25;
248-
EntityOperationFailedEvent entityOperationFailed = 26;
252+
EntityOperationCompletedEvent entityOperationCompleted = 25;
253+
EntityOperationFailedEvent entityOperationFailed = 26;
249254
EntityLockRequestedEvent entityLockRequested = 27;
250255
EntityLockGrantedEvent entityLockGranted = 28;
251256
EntityUnlockSentEvent entityUnlockSent = 29;
252257
}
258+
optional TaskRouter router = 30;
253259
}
254260

255261
message ScheduleTaskAction {
256262
string name = 1;
257263
google.protobuf.StringValue version = 2;
258264
google.protobuf.StringValue input = 3;
265+
optional TaskRouter router = 4;
259266
}
260267

261268
message CreateSubOrchestrationAction {
262269
string instanceId = 1;
263270
string name = 2;
264271
google.protobuf.StringValue version = 3;
265272
google.protobuf.StringValue input = 4;
273+
optional TaskRouter router = 5;
266274
}
267275

268276
message CreateTimerAction {
@@ -311,6 +319,7 @@ message OrchestratorAction {
311319
TerminateOrchestrationAction terminateOrchestration = 7;
312320
SendEntityMessageAction sendEntityMessage = 8;
313321
}
322+
optional TaskRouter router = 9;
314323
}
315324

316325
message OrchestratorRequest {
@@ -320,6 +329,7 @@ message OrchestratorRequest {
320329
repeated HistoryEvent newEvents = 4;
321330
OrchestratorEntityParameters entityParameters = 5;
322331
bool requiresHistoryStreaming = 6;
332+
optional TaskRouter router = 7;
323333
}
324334

325335
message OrchestratorResponse {

0 commit comments

Comments
 (0)