Skip to content

Commit 52afe9c

Browse files
implement entity support for DTS (squashed commit and rebased) (#369)
1 parent 8f19c6f commit 52afe9c

11 files changed

+888
-57
lines changed

src/Client/AzureManaged/DurableTaskSchedulerClientExtensions.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ static void ConfigureSchedulerOptions(
8585
.Configure(additionalConfig ?? (_ => { }))
8686
.ValidateDataAnnotations();
8787

88+
builder.Configure(options =>
89+
{
90+
options.EnableEntitySupport = true;
91+
});
92+
8893
builder.Services.TryAddEnumerable(
8994
ServiceDescriptor.Singleton<IConfigureOptions<GrpcDurableTaskClientOptions>, ConfigureGrpcChannel>());
9095
builder.UseGrpc(_ => { });

src/Grpc/orchestrator_service.proto

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,15 @@ message TerminateOrchestrationAction {
288288
bool recurse = 3;
289289
}
290290

291+
message SendEntityMessageAction {
292+
oneof EntityMessageType {
293+
EntityOperationSignaledEvent entityOperationSignaled = 1;
294+
EntityOperationCalledEvent entityOperationCalled = 2;
295+
EntityLockRequestedEvent entityLockRequested = 3;
296+
EntityUnlockSentEvent entityUnlockSent = 4;
297+
}
298+
}
299+
291300
message OrchestratorAction {
292301
int32 id = 1;
293302
oneof orchestratorActionType {
@@ -297,6 +306,7 @@ message OrchestratorAction {
297306
SendEventAction sendEvent = 5;
298307
CompleteOrchestrationAction completeOrchestration = 6;
299308
TerminateOrchestrationAction terminateOrchestration = 7;
309+
SendEntityMessageAction sendEntityMessage = 8;
300310
}
301311
}
302312

@@ -329,6 +339,7 @@ message CreateInstanceRequest {
329339
OrchestrationIdReusePolicy orchestrationIdReusePolicy = 6;
330340
google.protobuf.StringValue executionId = 7;
331341
map<string, string> tags = 8;
342+
TraceContext parentTraceContext = 9;
332343
}
333344

334345
message OrchestrationIdReusePolicy {
@@ -550,6 +561,8 @@ message EntityBatchResult {
550561
repeated OperationAction actions = 2;
551562
google.protobuf.StringValue entityState = 3;
552563
TaskFailureDetails failureDetails = 4;
564+
string completionToken = 5;
565+
repeated OperationInfo operationInfos = 6; // used only with DTS
553566
}
554567

555568
message EntityRequest {
@@ -572,6 +585,11 @@ message OperationResult {
572585
}
573586
}
574587

588+
message OperationInfo {
589+
string requestId = 1;
590+
OrchestrationInstance responseDestination = 2; // null for signals
591+
}
592+
575593
message OperationResultSuccess {
576594
google.protobuf.StringValue result = 1;
577595
}

src/Grpc/versions.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# The following files were downloaded from branch main at 2025-01-30 00:06:14 UTC
2-
https://raw.githubusercontent.com/microsoft/durabletask-protobuf/c672a0dc97c06587d7399ee12f1c5b0b9fc492a7/protos/orchestrator_service.proto
1+
# The following files were downloaded from branch main at 2025-02-11 19:40:58 UTC
2+
https://raw.githubusercontent.com/microsoft/durabletask-protobuf/589cb5ecd9dd4b1fe463750defa3e2c84276b079/protos/orchestrator_service.proto

0 commit comments

Comments
 (0)