From 5e2f899e8a9243a091022c44bc9718c791a6e15a Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Wed, 18 Dec 2019 14:40:17 +0100 Subject: [PATCH] =?UTF-8?q?Keep=20Pipeline.status=20field=20for=20backward?= =?UTF-8?q?=20compatibility=20=F0=9F=91=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They are not used, and shouldn't be there, but client that have previous version of this struct would fail targeting the API. This is a *partial* revert of #1640, as it doesn't reintroduce the `UpdateStatus` generation. Signed-off-by: Vincent Demeester --- pkg/apis/pipeline/v1alpha1/pipeline_types.go | 13 ++++++++++++ .../v1alpha1/zz_generated.deepcopy.go | 21 +++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/pkg/apis/pipeline/v1alpha1/pipeline_types.go b/pkg/apis/pipeline/v1alpha1/pipeline_types.go index de19f38e23a..0c37dc103ac 100644 --- a/pkg/apis/pipeline/v1alpha1/pipeline_types.go +++ b/pkg/apis/pipeline/v1alpha1/pipeline_types.go @@ -59,6 +59,19 @@ type Pipeline struct { // Spec holds the desired state of the Pipeline from the client // +optional Spec PipelineSpec `json:"spec"` + + // Status is deprecated. + // It usually is used to communicate the observed state of the Pipeline from + // the controller, but was unused as there is no controller for Pipeline. + // +optional + Status *PipelineStatus `json:"status,omitempty"` +} + +// PipelineStatus does not contain anything because Pipelines on their own +// do not have a status, they just hold data which is later used by a +// PipelineRun. +// Deprecated +type PipelineStatus struct { } func (p *Pipeline) PipelineMetadata() metav1.ObjectMeta { diff --git a/pkg/apis/pipeline/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/pipeline/v1alpha1/zz_generated.deepcopy.go index 64ca02d8adf..04b6b5530db 100644 --- a/pkg/apis/pipeline/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/pipeline/v1alpha1/zz_generated.deepcopy.go @@ -489,6 +489,11 @@ func (in *Pipeline) DeepCopyInto(out *Pipeline) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(PipelineStatus) + **out = **in + } return } @@ -1013,6 +1018,22 @@ func (in *PipelineSpec) DeepCopy() *PipelineSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PipelineStatus) DeepCopyInto(out *PipelineStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineStatus. +func (in *PipelineStatus) DeepCopy() *PipelineStatus { + if in == nil { + return nil + } + out := new(PipelineStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PipelineTask) DeepCopyInto(out *PipelineTask) { *out = *in