Skip to content
15 changes: 14 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 Patches {
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_PENDING_VERSION = 8;
}

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

message OrchestratorStartedEvent {
// No payload data
optional Patches patches = 2;
}

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

message ExecutionPendingVersionEvent {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
message ExecutionPendingVersionEvent {
message ExecutionPending {
PendingReason reason = 1;
// Ideally we would have more stringy information here which would tell the user what went wrong, which will be surfaced in `dapr workfow history` etc.
}

// No payload data
}

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;
ExecutionPendingVersionEvent executionPendingVersion = 31;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ExecutionPendingVersionEvent executionPendingVersion = 31;
ExecutionPending executionPending = 31;

}
optional TaskRouter router = 30;
}
Expand Down Expand Up @@ -364,6 +374,9 @@ 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 Patches patches = 7;
bool patchMismatch = 8;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please wrap related fields into new messages to have better logical grouping and cleaner API extentions.

}

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 PendingReason {
OLD_VERSION = 1;
}

// 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 PendingReason pendingReason = 15;
}

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