Skip to content
14 changes: 13 additions & 1 deletion protos/orchestrator_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ message TaskRouter {
optional string targetAppID = 2;
}

message OrchestrationVersion {
repeated string patches = 1;
}

message OrchestrationInstance {
string instanceId = 1;
google.protobuf.StringValue executionId = 2;
Expand Down Expand Up @@ -57,6 +61,7 @@ enum OrchestrationStatus {
ORCHESTRATION_STATUS_TERMINATED = 5;
ORCHESTRATION_STATUS_PENDING = 6;
ORCHESTRATION_STATUS_SUSPENDED = 7;
ORCHESTRATION_STATUS_STALLED = 8;
}

message ParentInstanceInfo {
Expand Down Expand Up @@ -162,7 +167,7 @@ message TimerFiredEvent {
}

message OrchestratorStartedEvent {
// No payload data
optional OrchestrationVersion version = 1;
}

message OrchestratorCompletedEvent {
Expand Down Expand Up @@ -200,6 +205,10 @@ message ExecutionResumedEvent {
google.protobuf.StringValue input = 1;
}

message ExecutionStalledEvent {
StalledReason reason = 1;
}

message EntityOperationSignaledEvent {
string requestId = 1;
string operation = 2;
Expand Down Expand Up @@ -276,6 +285,7 @@ message HistoryEvent {
EntityLockRequestedEvent entityLockRequested = 27;
EntityLockGrantedEvent entityLockGranted = 28;
EntityUnlockSentEvent entityUnlockSent = 29;
ExecutionStalledEvent executionStalled = 31;
}
optional TaskRouter router = 30;
}
Expand Down Expand Up @@ -364,6 +374,8 @@ message OrchestratorResponse {
// The number of work item events that were processed by the orchestrator.
// This field is optional. If not set, the service should assume that the orchestrator processed all events.
google.protobuf.Int32Value numEventsProcessed = 5;

optional OrchestrationVersion version = 6;
}

message CreateInstanceRequest {
Expand Down
5 changes: 5 additions & 0 deletions protos/runtime_state.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ import "orchestrator_service.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";

enum StalledReason {
PATCH_MISMATCH = 0;
}

// OrchestrationRuntimeState holds the current state for an orchestration.
message OrchestrationRuntimeState {
string instanceId = 1;
Expand All @@ -42,6 +46,7 @@ message OrchestrationRuntimeState {
bool isSuspended = 13;

google.protobuf.StringValue customStatus = 14;
optional StalledReason stalledReason = 15;
}

// OrchestrationRuntimeStateMessage holds an OrchestratorMessage and the target instance ID.
Expand Down