Skip to content

Commit

Permalink
explicitly specify enum values for RunStatus (#1322)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdzombak committed May 7, 2024
1 parent e572083 commit 3146876
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions pkg/enums/run_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,32 @@ import (
type RunStatus int

// NOTE:
// DO NOT EVER DELETE. There are Lua scripts that rely on the integer values in the state metadata.
// Deleting value enum will result in a change in order, and will break things.
// DO NOT EVER DELETE OR REUSE.
// There are Lua scripts that rely on the integer values in the state metadata.
// Deleting/reusing enum value will break things.
//
//goland:noinspection GoDeprecation
const (
// RunStatusRunning indicates that the function is running. This is the
// default state, even if steps are scheduled in the future.
RunStatusRunning RunStatus = iota
RunStatusRunning RunStatus = 0
// RunStatusCompleted indicates that the function has completed running.
RunStatusCompleted
RunStatusCompleted RunStatus = 1
// RunStatusFailed indicates that the function failed in one or more steps.
RunStatusFailed
RunStatusFailed RunStatus = 2
// RunStatusCancelled indicates that the function has been cancelled prior
// to any errors
RunStatusCancelled
RunStatusCancelled RunStatus = 3
// RunStatusOverflowed indicates that the function had too many steps ran.
// Deprecated. This must be RunStatusFailed with an appropriate error code.
RunStatusOverflowed
RunStatusOverflowed RunStatus = 4
// RunStatusScheduled indicates that the function is scheduled but have not started
// processing
RunStatusScheduled
RunStatusScheduled RunStatus = 5
// RunStatusUnknown indicates that the function is in an unknown status.
// This is unlikely to happen during normal execution, and more likely when converting between
// the status code
RunStatusUnknown
RunStatusUnknown RunStatus = 6
)

var (
Expand Down

0 comments on commit 3146876

Please sign in to comment.