Remove usage of context.DeadlineExceeded

for internal decisions as this error is strongly used by other packages. By checking such wrapped errors the internal decision can be influenced accidentally.
In this case the retry mechanism checked if the error is context.DeadlineExceeded and assumed it would be created by the internal context. This assumption was wrong.
This commit is contained in:
Maximilian Paß
2023-10-30 14:51:31 +01:00
committed by Sebastian Serth
parent 6b69a2d732
commit d0dd5c08cb
6 changed files with 22 additions and 12 deletions

View File

@ -31,7 +31,10 @@ const (
TimerExpired TimerState = 2
)
var ErrorRunnerInactivityTimeout DestroyReason = errors.New("runner inactivity timeout exceeded")
var (
ErrorRunnerInactivityTimeout DestroyReason = errors.New("runner inactivity timeout exceeded")
ErrorExecutionTimeout = errors.New("execution timeout exceeded")
)
type InactivityTimerImplementation struct {
timer *time.Timer