Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Unified Diff: common/api/dm/service/v1/execution_state_evolve.go

Issue 1537883002: Initial distributor implementation (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: fix imports and make dummy.go a real file Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « common/api/dm/service/v1/execution_data.go ('k') | common/api/dm/service/v1/execution_state_evolve_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/api/dm/service/v1/execution_state_evolve.go
diff --git a/common/api/dm/service/v1/execution_state_evolve.go b/common/api/dm/service/v1/execution_state_evolve.go
index 11679ba25890d6c3834de7737e6eca0619996303..a329ac2146b4bfa303ad073834ce12567489961d 100644
--- a/common/api/dm/service/v1/execution_state_evolve.go
+++ b/common/api/dm/service/v1/execution_state_evolve.go
@@ -12,15 +12,21 @@ import (
// transitions. The identity transition (X -> X) is implied, as long as X has an
// entry in this mapping.
var validExecutionStateEvolution = map[Execution_State][]Execution_State{
- Execution_SCHEDULED: {Execution_RUNNING, Execution_FINISHED, Execution_MISSING, Execution_CANCELLED, Execution_TIMED_OUT},
- Execution_RUNNING: {Execution_FINISHED, Execution_FAILED, Execution_MISSING, Execution_CANCELLED},
-
- Execution_CANCELLED: {},
- Execution_FINISHED: {},
- Execution_FAILED: {},
- Execution_MISSING: {},
- Execution_REJECTED: {},
- Execution_TIMED_OUT: {},
+ Execution_SCHEDULING: {
+ Execution_RUNNING, // ActivateExecution
+ Execution_ABNORMAL_FINISHED, // cancel/timeout/err/etc.
+ },
+ Execution_RUNNING: {
+ Execution_STOPPING, // FinishAttempt/EnsureGraphData
+ Execution_ABNORMAL_FINISHED, // cancel/timeout/err/etc.
+ },
+ Execution_STOPPING: {
+ Execution_FINISHED, // got persistent state from distributor
+ Execution_ABNORMAL_FINISHED, // cancel/timeout/err/etc.
+ },
+
+ Execution_FINISHED: {},
+ Execution_ABNORMAL_FINISHED: {},
}
// Evolve attempts to evolve the state of this Attempt. If the state
« no previous file with comments | « common/api/dm/service/v1/execution_data.go ('k') | common/api/dm/service/v1/execution_state_evolve_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698