Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controller crashes for certain Pipeline after upgrade #8086

Closed
khrm opened this issue Jul 1, 2024 · 1 comment · Fixed by #8089 · May be fixed by #8088
Closed

Controller crashes for certain Pipeline after upgrade #8086

khrm opened this issue Jul 1, 2024 · 1 comment · Fixed by #8089 · May be fixed by #8088
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@khrm
Copy link
Contributor

khrm commented Jul 1, 2024

Expected Behavior

Validation should either fail or pass. There shouldn't be a panic.

Actual Behavior

Controller crashes.

Steps to Reproduce the Problem

  1. Install v0.47 Pipeline
  2. Install Pipeline and Task from here: https://gist.githubusercontent.com/khrm/33b8022e6d6cc87d1f3300b117995193/raw/f8548f4deaa84f0dc718e238cb7842f888be1665/gistfile0.txt
  3. Upgrade to v0.53 Pipeline
  4. Run PipelineRun from here: https://gist.githubusercontent.com/khrm/33b8022e6d6cc87d1f3300b117995193/raw/f8548f4deaa84f0dc718e238cb7842f888be1665/gistfile0.txt

Additional Info

  • Kubernetes version:

    Output of kubectl version:

2024-06-28T15:47:20.228928232Z panic: runtime error: index out of range [1] with length 1
2024-06-28T15:47:20.228928232Z 
2024-06-28T15:47:20.228928232Z goroutine 216 [running]:
2024-06-28T15:47:20.228956693Z github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.validateMatrixedPipelineTaskConsumed({0xc008c50cc0?, 0x2, 0x294fd6e?}, 0x5?)
2024-06-28T15:47:20.228970432Z 	/go/src/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipeline_validation.go:813 +0x3b8
2024-06-28T15:47:20.228970432Z github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.findAndValidateResultRefsForMatrix({0xc007f1ec00?, 0x12, 0x0?}, 0x4e13f6bc00000000?)
2024-06-28T15:47:20.229001048Z 	/go/src/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipeline_validation.go:795 +0x292
2024-06-28T15:47:20.229001048Z github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.validateTaskResultsFromMatrixedPipelineTasksConsumed({0xc007f1ec00, 0x12, 0x13})
2024-06-28T15:47:20.229023233Z 	/go/src/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipeline_validation.go:831 +0x189
2024-06-28T15:47:20.229023233Z github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.validateMatrix({0x2d38580, 0xc0067652f0}, {0xc007f1ec00?, 0x12, 0x13})
2024-06-28T15:47:20.229058360Z 	/go/src/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipeline_validation.go:783 +0x137
2024-06-28T15:47:20.229058360Z github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.(*PipelineSpec).Validate(0xc002db8aa0, {0x2d38580, 0xc0067652f0})
2024-06-28T15:47:20.229074818Z 	/go/src/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipeline_validation.go:88 +0x69b
2024-06-28T15:47:20.229087082Z github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun.(*Reconciler).reconcile(0xc0009907e0, {0x2d38580, 0xc006765260}, 0xc001392000, 0x0?, 0xc00667f490)
2024-06-28T15:47:20.229111017Z 	/go/src/github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun/pipelinerun.go:463 +0xd7b
2024-06-28T15:47:20.229123006Z github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun.(*Reconciler).ReconcileKind(0xc0009907e0, {0x2d38580, 0xc0067650e0}, 0xc001392000)
2024-06-28T15:47:20.229146874Z 	/go/src/github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun/pipelinerun.go:264 +0x114b
2024-06-28T15:47:20.229158835Z github.com/tektoncd/pipeline/pkg/client/injection/reconciler/pipeline/v1/pipelinerun.(*reconcilerImpl).Reconcile(0xc00077cfa0, {0x2d38580, 0xc006765020}, {0xc00675f560, 0x53})
2024-06-28T15:47:20.229181513Z 	/go/src/github.com/tektoncd/pipeline/pkg/client/injection/reconciler/pipeline/v1/pipelinerun/reconciler.go:236 +0x542
2024-06-28T15:47:20.229193825Z knative.dev/pkg/controller.(*Impl).processNextWorkItem(0xc000513500)
2024-06-28T15:47:20.229193825Z 	/go/src/github.com/tektoncd/pipeline/vendor/knative.dev/pkg/controller/controller.go:542 +0x4cd
2024-06-28T15:47:20.229206315Z knative.dev/pkg/controller.(*Impl).RunContext.func3()
2024-06-28T15:47:20.229206315Z 	/go/src/github.com/tektoncd/pipeline/vendor/knative.dev/pkg/controller/controller.go:491 +0x68
2024-06-28T15:47:20.229218796Z created by knative.dev/pkg/controller.(*Impl).RunContext
2024-06-28T15:47:20.229218796Z 	/go/src/github.com/tektoncd/pipeline/vendor/knative.dev/pkg/controller/controller.go:489 +0x354

@khrm khrm added the kind/bug Categorizes issue or PR as related to a bug. label Jul 1, 2024
@khrm
Copy link
Contributor Author

khrm commented Jul 1, 2024

/assign @khrm

khrm added a commit to khrm/pipeline that referenced this issue Jul 4, 2024
This disables the Matrix Validation for Results in non Matrixed Pipelines.
This ensure we don't encounter any crash or such for these pipelines like
did at issue tektoncd#8086
khrm added a commit to khrm/pipeline that referenced this issue Jul 4, 2024
This disables the Matrix Validation for Results in non Matrixed Pipelines.
This ensures that the controller doesn't encounter any crash or such for these pipelines as it
did at issue tektoncd#8086

Fixes tektoncd#8086
khrm added a commit to khrm/pipeline that referenced this issue Jul 4, 2024
This disables the Matrix Validation for Results in non Matrixed Pipelines.
This ensures that the controller doesn't encounter any crash or such for these pipelines as it
did at issue tektoncd#8086

Fixes tektoncd#8086
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
1 participant