Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide entity support for direct grpc connections to DTS #369

Merged
merged 1 commit into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ static void ConfigureSchedulerOptions(
.Configure(additionalConfig ?? (_ => { }))
.ValidateDataAnnotations();

builder.Configure(options =>
{
options.EnableEntitySupport = true;
});

builder.Services.TryAddEnumerable(
ServiceDescriptor.Singleton<IConfigureOptions<GrpcDurableTaskClientOptions>, ConfigureGrpcChannel>());
builder.UseGrpc(_ => { });
Expand Down
18 changes: 18 additions & 0 deletions src/Grpc/orchestrator_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,15 @@ message TerminateOrchestrationAction {
bool recurse = 3;
}

message SendEntityMessageAction {
oneof EntityMessageType {
EntityOperationSignaledEvent entityOperationSignaled = 1;
EntityOperationCalledEvent entityOperationCalled = 2;
EntityLockRequestedEvent entityLockRequested = 3;
EntityUnlockSentEvent entityUnlockSent = 4;
}
}

message OrchestratorAction {
int32 id = 1;
oneof orchestratorActionType {
Expand All @@ -297,6 +306,7 @@ message OrchestratorAction {
SendEventAction sendEvent = 5;
CompleteOrchestrationAction completeOrchestration = 6;
TerminateOrchestrationAction terminateOrchestration = 7;
SendEntityMessageAction sendEntityMessage = 8;
}
}

Expand Down Expand Up @@ -329,6 +339,7 @@ message CreateInstanceRequest {
OrchestrationIdReusePolicy orchestrationIdReusePolicy = 6;
google.protobuf.StringValue executionId = 7;
map<string, string> tags = 8;
TraceContext parentTraceContext = 9;
}

message OrchestrationIdReusePolicy {
Expand Down Expand Up @@ -550,6 +561,8 @@ message EntityBatchResult {
repeated OperationAction actions = 2;
google.protobuf.StringValue entityState = 3;
TaskFailureDetails failureDetails = 4;
string completionToken = 5;
repeated OperationInfo operationInfos = 6; // used only with DTS
}

message EntityRequest {
Expand All @@ -572,6 +585,11 @@ message OperationResult {
}
}

message OperationInfo {
string requestId = 1;
OrchestrationInstance responseDestination = 2; // null for signals
}

message OperationResultSuccess {
google.protobuf.StringValue result = 1;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Grpc/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# The following files were downloaded from branch main at 2025-01-30 00:06:14 UTC
https://raw.githubusercontent.com/microsoft/durabletask-protobuf/c672a0dc97c06587d7399ee12f1c5b0b9fc492a7/protos/orchestrator_service.proto
# The following files were downloaded from branch main at 2025-02-11 19:40:58 UTC
https://raw.githubusercontent.com/microsoft/durabletask-protobuf/589cb5ecd9dd4b1fe463750defa3e2c84276b079/protos/orchestrator_service.proto
Loading
Loading