Monorepo for Tangled
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

spindle: do not abort pipeline on InitWorkflow failure

A single workflow failing to initialize would abort the entire pipeline.
Instead, mark the failed workflow and continue processing the rest,
matching the existing behavior for unknown engines.

Signed-off-by: Evan Jarrett <evan@evanjarrett.com>

authored by

Evan Jarrett and committed by tangled.org 184f47f2 1164e7a3

+9 -1
+9 -1
spindle/server.go
··· 361 361 362 362 ewf, err := s.engs[w.Engine].InitWorkflow(*w, tpl) 363 363 if err != nil { 364 - return fmt.Errorf("init workflow: %w", err) 364 + err = s.db.StatusFailed(models.WorkflowId{ 365 + PipelineId: pipelineId, 366 + Name: w.Name, 367 + }, fmt.Sprintf("init workflow: %s", err), -1, s.n) 368 + if err != nil { 369 + return fmt.Errorf("db.StatusFailed: %w", err) 370 + } 371 + 372 + continue 365 373 } 366 374 367 375 // inject TANGLED_* env vars after InitWorkflow