back interdiff of round #1 and #0

spindle/{config,engine}: configure a timeout for steps #259

merged
opened by anirudh.fi targeting master from push-momltwttmuyq

WaitStep and TailStep now run in goroutines, and are tracked with a stepCtx which has a timeout attached. Once stepCtx expires, the step is killed with DestroyStep.

The default timeout is set to 5m, and is configureable using SPINDLE_PIPELINES_STEP_TIMEOUT.

Signed-off-by: Anirudh Oppiliappan anirudh@tangled.sh

files
spindle
ERROR
spindle/config/config.go

Failed to calculate interdiff for this file.

ERROR
spindle/engine/engine.go

Failed to calculate interdiff for this file.

NEW
spindle/engine/ansi_stripper.go
···
import (
"io"
-
"github.com/go-enry/go-enry/v2/regex"
+
"regexp"
)
// regex to match ANSI escape codes (e.g., color codes, cursor moves)
const ansi = "[\u001B\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"
-
var re = regex.MustCompile(ansi)
+
var re = regexp.MustCompile(ansi)
type ansiStrippingWriter struct {
underlying io.Writer