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

PipelineLoop controller crashes on Run with no "status" field #981

Closed
Udiknedormin opened this issue Jun 20, 2022 · 0 comments · Fixed by #982
Closed

PipelineLoop controller crashes on Run with no "status" field #981

Udiknedormin opened this issue Jun 20, 2022 · 0 comments · Fixed by #982
Labels

Comments

@Udiknedormin
Copy link
Contributor

/kind bug

What steps did you take and what happened:
When a PipelineLoop contains a break Run and this Run doesn't immediately produce the "status" field at runtime, PipelineLoop controller crashes with the following stacktrace:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1171022]

goroutine 545 [running]:
github.com/tektoncd/pipeline/pkg/apis/run/v1alpha1.(*RunStatus).GetConditions(0x0)
	<autogenerated>:1 +0x22
knative.dev/pkg/apis.conditionsImpl.GetCondition({{{0x2652b75, 0x9}, {0x4070960, 0x0, 0x0}}, {0x2a6cc48, 0x0}}, {0x2652b75, 0x9})
	knative.dev/[email protected]/apis/condition_set.go:177 +0x7f
github.com/tektoncd/pipeline/pkg/apis/run/v1alpha1.(*RunStatus).GetCondition(...)
	github.com/tektoncd/[email protected]/pkg/apis/run/v1alpha1/runstatus_types.go:82
github.com/kubeflow/kfp-tekton/tekton-catalog/pipeline-loops/pkg/reconciler/pipelinelooprun.(*Reconciler).updatePipelineRunStatus(0xc000228000, {0x2a94fd8, 0xc008a56360}, {0xc008768520, 0x2, 0x70}, 0xc0033ffd40, 0xc00203a5b8)
	github.com/kubeflow/kfp-tekton/tekton-catalog/[email protected]/pkg/reconciler/pipelinelooprun/pipelinelooprun.go:768 +0x1025
github.com/kubeflow/kfp-tekton/tekton-catalog/pipeline-loops/pkg/reconciler/pipelinelooprun.(*Reconciler).reconcile(0xc000228000, {0x2a94fd8, 0xc005132de0}, 0xc0033ffd40, 0xc00203a5b8)
	github.com/kubeflow/kfp-tekton/tekton-catalog/[email protected]/pkg/reconciler/pipelinelooprun/pipelinelooprun.go:389 +0x6c5
github.com/kubeflow/kfp-tekton/tekton-catalog/pipeline-loops/pkg/reconciler/pipelinelooprun.(*Reconciler).ReconcileKind(0xc000228000, {0x2a94fd8, 0xc005132de0}, 0xc0033ffd40)
	github.com/kubeflow/kfp-tekton/tekton-catalog/[email protected]/pkg/reconciler/pipelinelooprun/pipelinelooprun.go:228 +0x1407
github.com/tektoncd/pipeline/pkg/client/injection/reconciler/pipeline/v1alpha1/run.(*reconcilerImpl).Reconcile(0xc00021c0a0, {0x2a94fd8, 0xc005132db0}, {0xc0085bf5e0, 0x64})
	github.com/tektoncd/[email protected]/pkg/client/injection/reconciler/pipeline/v1alpha1/run/reconciler.go:239 +0x5d7
knative.dev/pkg/controller.(*Impl).processNextWorkItem(0xc00055afc0)
	knative.dev/[email protected]/controller/controller.go:542 +0x5a5
knative.dev/pkg/controller.(*Impl).RunContext.func3()
	knative.dev/[email protected]/controller/controller.go:491 +0x68
created by knative.dev/pkg/controller.(*Impl).RunContext
	knative.dev/[email protected]/controller/controller.go:489 +0x31c

What did you expect to happen:
PipelineLoop controller should work just fine if the break Run doesn't immediately produce "status" field.

Additional information:
"status" field is declared as optional in Tekton:

type PipelineRunRunStatus struct {
	// PipelineTaskName is the name of the PipelineTask.
	PipelineTaskName string `json:"pipelineTaskName,omitempty"`
	// Status is the RunStatus for the corresponding Run
	// +optional
	Status *runv1alpha1.RunStatus `json:"status,omitempty"`
	// WhenExpressions is the list of checks guarding the execution of the PipelineTask
	// +optional
	// +listType=atomic
	WhenExpressions []WhenExpression `json:"whenExpressions,omitempty"`
}

so it should be supported for a run not to have it.

Environment:

  • Python Version (use python --version): 3.9.0
  • SDK Version: irrelevant
  • Tekton Version (use tkn version): 0.36.0
  • Kubernetes Version (use kubectl version): v1.22.10+IKS
  • OS (e.g. from /etc/os-release): irrelevant
@Udiknedormin Udiknedormin changed the title Pipelineloops controller crashes on Run with no "status" field PipelineLoop controller crashes on Run with no "status" field Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant