Skip to content

Commit 69fb5a7

Browse files
check baseExecution before validating worker request
1 parent 519e272 commit 69fb5a7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

shared.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22086,6 +22086,11 @@ func ValidateNewWorkerExecution(ctx context.Context, body []byte, shouldReset bo
2208622086
return errors.New(fmt.Sprintf("Bad length of trigger: %d (probably normal app)", len(execution.Workflow.Triggers)))
2208722087
}
2208822088

22089+
if baseExecution.Status == "FINISHED" || baseExecution.Status == "ABORTED" || baseExecution.Status == "FAILURE" {
22090+
log.Printf("[INFO][%s] Execution is already finished, not overriding", execution.ExecutionId)
22091+
return errors.New("Execution is already finished, not overriding")
22092+
}
22093+
2208922094
if len(baseExecution.Results) > len(execution.Results) {
2209022095
if shouldReset == true {
2209122096
// Letting it pass and override. This is to ensure worker can override

0 commit comments

Comments
 (0)