fix: persist and retry run alerts and honor notification modes

This commit is contained in:
2026-10-20 15:42:21 +01:00
parent e4f48ecbb1
commit 016fcb552a
20 changed files with 697 additions and 41 deletions
+5 -1
View File
@@ -101,7 +101,10 @@ func newRunner(ctx context.Context, s *pipeline.Store) (*runner, error) {
return nil, err
}
root := filepath.Join(s.Directory(), "artifacts")
return &runner{ctx: ctx, store: s, artifactsRoot: root, active: map[int64]activeRun{}, idents: map[int64]runIdentity{}, attentionSent: map[int64]map[string]bool{}, notifyModes: map[int64]string{}, exportSession: stage.ExportSession}, nil
r := &runner{ctx: ctx, store: s, artifactsRoot: root, active: map[int64]activeRun{}, idents: map[int64]runIdentity{}, attentionSent: map[int64]map[string]bool{}, notifyModes: map[int64]string{}, exportSession: stage.ExportSession}
r.schedulerWG.Add(1)
go func() { defer r.schedulerWG.Done(); r.resumeRunNotifications() }()
return r, nil
}
func (r *runner) start(request protocol.Message, retryOf ...int64) (*protocol.RunDetail, error) {
@@ -1257,6 +1260,7 @@ func (r *runner) emitRun(frame protocol.RunEventFrame, terminal bool) {
return
}
r.stampRunIdentity(&frame)
frame.NotifyMode = r.notifyMode(frame.RunID)
r.events.emit(frame, terminal)
}