Skip to content

Commit f6dc9f1

Browse files
authored
Merge pull request #21 from acroca/workflow-versioning
Workflow versioning
2 parents a87e1c9 + 7b90a17 commit f6dc9f1

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

protos/orchestrator_service.proto

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ message TaskRouter {
1717
optional string targetAppID = 2;
1818
}
1919

20+
message OrchestrationVersion {
21+
repeated string patches = 1;
22+
}
23+
2024
message OrchestrationInstance {
2125
string instanceId = 1;
2226
google.protobuf.StringValue executionId = 2;
@@ -57,6 +61,7 @@ enum OrchestrationStatus {
5761
ORCHESTRATION_STATUS_TERMINATED = 5;
5862
ORCHESTRATION_STATUS_PENDING = 6;
5963
ORCHESTRATION_STATUS_SUSPENDED = 7;
64+
ORCHESTRATION_STATUS_STALLED = 8;
6065
}
6166

6267
message ParentInstanceInfo {
@@ -162,7 +167,7 @@ message TimerFiredEvent {
162167
}
163168

164169
message OrchestratorStartedEvent {
165-
// No payload data
170+
optional OrchestrationVersion version = 1;
166171
}
167172

168173
message OrchestratorCompletedEvent {
@@ -200,6 +205,10 @@ message ExecutionResumedEvent {
200205
google.protobuf.StringValue input = 1;
201206
}
202207

208+
message ExecutionStalledEvent {
209+
StalledReason reason = 1;
210+
}
211+
203212
message EntityOperationSignaledEvent {
204213
string requestId = 1;
205214
string operation = 2;
@@ -276,6 +285,7 @@ message HistoryEvent {
276285
EntityLockRequestedEvent entityLockRequested = 27;
277286
EntityLockGrantedEvent entityLockGranted = 28;
278287
EntityUnlockSentEvent entityUnlockSent = 29;
288+
ExecutionStalledEvent executionStalled = 31;
279289
}
280290
optional TaskRouter router = 30;
281291
}
@@ -364,6 +374,8 @@ message OrchestratorResponse {
364374
// The number of work item events that were processed by the orchestrator.
365375
// This field is optional. If not set, the service should assume that the orchestrator processed all events.
366376
google.protobuf.Int32Value numEventsProcessed = 5;
377+
378+
optional OrchestrationVersion version = 6;
367379
}
368380

369381
message CreateInstanceRequest {

protos/runtime_state.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ import "orchestrator_service.proto";
2424
import "google/protobuf/timestamp.proto";
2525
import "google/protobuf/wrappers.proto";
2626

27+
enum StalledReason {
28+
PATCH_MISMATCH = 0;
29+
}
30+
2731
// OrchestrationRuntimeState holds the current state for an orchestration.
2832
message OrchestrationRuntimeState {
2933
string instanceId = 1;
@@ -42,6 +46,7 @@ message OrchestrationRuntimeState {
4246
bool isSuspended = 13;
4347

4448
google.protobuf.StringValue customStatus = 14;
49+
optional StalledReason stalledReason = 15;
4550
}
4651

4752
// OrchestrationRuntimeStateMessage holds an OrchestratorMessage and the target instance ID.

0 commit comments

Comments
 (0)