-
Bug
-
Resolution: Done
-
Major
-
Pipelines 1.7
-
None
-
None
-
2
-
False
-
None
-
False
-
Pipelines Sprint 227
Expected behavior
"tkn pr delete" can handle all cases
Actual behavior
tkn cannot remove pipelinerun that has "unknown" status, fix in https://github.com/tektoncd/cli/pull/1532 was not sufficient because the pipeline run contains conditions field but the status is Unknown
Steps to reproduce
On our CI cluster, run "tkn pipelinerun delete --keep-since=14400 -n=kabhishe-tests -f" (the same command that pruner job is running
Result:
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1ca6fdb] goroutine 1 [running]: github.com/tektoncd/cli/pkg/cmd/pipelinerun.keepPipelineRunsByAge(0xc00058c000, 0x3840, 0x22, 0x22, 0x23, 0xc000cb0000, 0x22, 0x44) /builddir/build/BUILD/openshift-pipelines-601c8ce76b71194d012b71e5987d73e8f90a4ec0/pkg/cmd/pipelinerun/delete.go:255 +0x13b github.com/tektoncd/cli/pkg/cmd/pipelinerun.allPipelineRunNames(0xc000600d00, 0x0, 0x3840, 0x1, 0x0, 0x0, 0x7ffc783f2f46, 0xe, 0x1, 0xc00071f990, ...) /builddir/build/BUILD/openshift-pipelines-601c8ce76b71194d012b71e5987d73e8f90a4ec0/pkg/cmd/pipelinerun/delete.go:244 +0x2e7 github.com/tektoncd/cli/pkg/cmd/pipelinerun.deletePipelineRuns(0xc001e9bcc0, 0x26cb420, 0xc000063240, 0xc0002c6f30, 0x0, 0x3, 0xc000471ce0, 0x0, 0x0) /builddir/build/BUILD/openshift-pipelines-601c8ce76b71194d012b71e5987d73e8f90a4ec0/pkg/cmd/pipelinerun/delete.go:120 +0x163b github.com/tektoncd/cli/pkg/cmd/pipelinerun.deleteCommand.func1(0xc000168a00, 0xc0002c6f30, 0x0, 0x3, 0x0, 0x0) /builddir/build/BUILD/openshift-pipelines-601c8ce76b71194d012b71e5987d73e8f90a4ec0/pkg/cmd/pipelinerun/delete.go:92 +0x2aa github.com/spf13/cobra.(*Command).execute(0xc000168a00, 0xc0002c6f00, 0x3, 0x3, 0xc000168a00, 0xc0002c6f00) /builddir/build/BUILD/openshift-pipelines-601c8ce76b71194d012b71e5987d73e8f90a4ec0/vendor/github.com/spf13/cobra/command.go:856 +0x47c github.com/spf13/cobra.(*Command).ExecuteC(0xc0006bf400, 0xc00004c1f0, 0x5, 0x5) /builddir/build/BUILD/openshift-pipelines-601c8ce76b71194d012b71e5987d73e8f90a4ec0/vendor/github.com/spf13/cobra/command.go:974 +0x375 github.com/spf13/cobra.(*Command).Execute(...) /builddir/build/BUILD/openshift-pipelines-601c8ce76b71194d012b71e5987d73e8f90a4ec0/vendor/github.com/spf13/cobra/command.go:902 main.main() /builddir/build/BUILD/openshift-pipelines-601c8ce76b71194d012b71e5987d73e8f90a4ec0/cmd/tkn/main.go:66 +0x4ac
Pipeline run's status:
status: conditions: - lastTransitionTime: '2022-03-11T07:40:53Z' message: >- PipelineRun "test-triggers-updated-awmbjt" was cancelled but had errors trying to cancel TaskRuns and/or Runs: Failed to patch TaskRun `test-triggers-updated-awmbjt-clone-plumbing-git-7l67g` with cancellation: taskruns.tekton.dev "test-triggers-updated-awmbjt-clone-plumbing-git-7l67g" not found Failed to patch TaskRun `test-triggers-updated-awmbjt-clone-release-tests-git-sss7j` with cancellation: taskruns.tekton.dev "test-triggers-updated-awmbjt-clone-release-tests-git-sss7j" not found Failed to patch TaskRun `test-triggers-updated-awmbjt-generate-build-artifacts-958rj` with cancellation: taskruns.tekton.dev "test-triggers-updated-awmbjt-generate-build-artifacts-958rj" not found Failed to patch TaskRun `test-triggers-updated-awmbjt-generate-ids-zpqjx` with cancellation: taskruns.tekton.dev "test-triggers-updated-awmbjt-generate-ids-zpqjx" not found reason: PipelineRunCouldntCancel status: Unknown type: Succeeded
- clones
-
SRVKP-2077 Tkn cannot delete pipelinerun with unknown status
- Closed