Monorepo for Tangled tangled.org

spindle/db: prevent status events from overwriting terminal states #1063

Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:sshwio5obbx4zjfrn3fhsen6/sh.tangled.repo.pull/3mejkakpceu22
+7
Diff #1
+7
spindle/db/events.go
··· 77 77 exitCode *int64, 78 78 n *notifier.Notifier, 79 79 ) error { 80 + // don't overwrite a terminal status 81 + if current, err := d.GetStatus(workflowId); err == nil { 82 + if models.StatusKind(current.Status).IsFinish() { 83 + return nil 84 + } 85 + } 86 + 80 87 now := time.Now() 81 88 pipelineAtUri := workflowId.PipelineId.AtUri() 82 89 s := tangled.PipelineStatus{

History

2 rounds 2 comments
sign up or login to add to the discussion
1 commit
expand
spindle/db: prevent status events from overwriting terminal states
no conflicts, ready to merge
expand 1 comment

what are some scenarios where this happens? i think the fact this is happening is a side effect of a greater issue: that the final state of a workflow is in fact not the final state, it continues to do things.

1 commit
expand
spindle/db: prevent status events from overwriting terminal states
expand 1 comment

This prevents cancelled pipeline runs getting overwritten with a failed status by the workflow goroutine when its container is destroyed