From 9adb98b0099cfe16d41dd62f83e8caddefa26cb4 Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Wed, 18 Dec 2019 12:08:46 +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 +++++++++++++ .../pipeline/v1alpha1/zz_generated.deepcopy.go | 17 +++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/pkg/apis/pipeline/v1alpha1/pipeline_types.go b/pkg/apis/pipeline/v1alpha1/pipeline_types.go index de19f38e23a..2e2340960ed 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..b6493515ca0 100644 --- a/pkg/apis/pipeline/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/pipeline/v1alpha1/zz_generated.deepcopy.go @@ -489,6 +489,7 @@ func (in *Pipeline) DeepCopyInto(out *Pipeline) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status return } @@ -1013,6 +1014,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