tektoncd / results

Long term storage of execution results.
Apache License 2.0
78 stars 74 forks source link

Watcher in crashloop #858

Closed khrm closed 2 weeks ago

khrm commented 1 month ago

Expected Behavior

Watcher should keep running properly.

Actual Behavior

{"level":"info","time":"2024-10-22T11:06:30.567Z","logger":"watcher","caller":"controller/controller.go:550","msg":"Reconcile succeeded","commit":"c1839d5","knative.dev/controller":"github.com.tektoncd.results.pkg.watcher.reconciler.taskrun.Reconciler","knative.dev/kind":"tekton.dev.TaskRun","knative.dev/traceid":"dcc871c3-e967-48b6-9979-92be11e712b2","knative.dev/key":"mbison/acceptance-tests-111-on-414-v4fh7-cli-tests-fedora","duration":"63.312466ms"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x33e4d0d]

goroutine 48 [running]:
github.com/tektoncd/results/pkg/watcher/reconciler/taskrun.(*Reconciler).FinalizeKind(0xc00015e770, {0x407db08, 0xc017146060}, 0xc00c67c848)
    /go/src/github.com/tektoncd/results/pkg/watcher/reconciler/taskrun/reconciler.go:94 +0xcd
github.com/tektoncd/pipeline/pkg/client/injection/reconciler/pipeline/v1/taskrun.(*reconcilerImpl).Reconcile(0xc00035ebe0, {0x407db08, 0xc013f2bf20}, {0xc00c1cf580, 0x3f})
    /go/src/github.com/tektoncd/results/vendor/github.com/tektoncd/pipeline/pkg/client/injection/reconciler/pipeline/v1/taskrun/reconciler.go:241 +0x3b8
knative.dev/pkg/controller.(*Impl).processNextWorkItem(0xc000a1e900)
    /go/src/github.com/tektoncd/results/vendor/knative.dev/pkg/controller/controller.go:542 +0x508
knative.dev/pkg/controller.(*Impl).RunContext.func3()
    /go/src/github.com/tektoncd/results/vendor/knative.dev/pkg/controller/controller.go:491 +0x59
created by knative.dev/pkg/controller.(*Impl).RunContext in goroutine 45
    /go/src/github.com/tektoncd/results/vendor/knative.dev/pkg/controller/controller.go:489 +0x325

Steps to Reproduce the Problem

  1. Install result v0.12.1
  2. Use third party logging API.

Additional Info

khrm commented 1 month ago

/assign @khrm

khrm commented 1 month ago

This is because there can be cases where done TaskRun don't have Completion time.

khrm commented 2 weeks ago

Fixed by https://github.com/tektoncd/results/commit/e9da502f8ba4f748f256ca13d03c84f037f770a5

khrm commented 2 weeks ago

/close