Skip to content

Commit

Permalink
remove PipelineStatus and PipelineResourceStatus
Browse files Browse the repository at this point in the history
This removes two struct types:

* `PipelineStatus`
* `PipelineResourceStatus`

These Status types were unused and did not follow the pattern of using
Knative's DuckType. Other types such as `Task` do not have a Status type
and instead defer to their corresponding `TaskRun` status.

fixes #1636
  • Loading branch information
poy authored and tekton-robot committed Dec 6, 2019
1 parent fb36ff3 commit e75dbaa
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 111 deletions.
11 changes: 1 addition & 10 deletions pkg/apis/pipeline/v1alpha1/pipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ type PipelineSpec struct {
Params []ParamSpec `json:"params,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.
type PipelineStatus struct {
}

// Check that Pipeline may be validated and defaulted.
// TaskKind defines the type of Task used by the pipeline.
type TaskKind string
Expand All @@ -52,6 +46,7 @@ const (

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +genclient:noStatus

// Pipeline describes a list of Tasks to execute. It expresses how outputs
// of tasks feed into inputs of subsequent tasks.
Expand All @@ -64,10 +59,6 @@ type Pipeline struct {
// Spec holds the desired state of the Pipeline from the client
// +optional
Spec PipelineSpec `json:"spec"`
// Status communicates the observed state of the Pipeline from the
// controller.
// +optional
Status PipelineStatus `json:"status"`
}

func (p *Pipeline) PipelineMetadata() metav1.ObjectMeta {
Expand Down
10 changes: 1 addition & 9 deletions pkg/apis/pipeline/v1alpha1/resource_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,9 @@ type PipelineResourceSpec struct {
SecretParams []SecretParam `json:"secrets,omitempty"`
}

// PipelineResourceStatus does not contain anything because Resources on their own
// do not have a status, they just hold data which is later used by PipelineRuns
// and TaskRuns.
type PipelineResourceStatus struct {
}

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +genclient:noStatus

// PipelineResource describes a resource that is an input to or output from a
// Task.
Expand All @@ -167,9 +162,6 @@ type PipelineResource struct {

// Spec holds the desired state of the PipelineResource from the client
Spec PipelineResourceSpec `json:"spec,omitempty"`
// Status communicates the observed state of the PipelineResource from the controller
// +optional
Status PipelineResourceStatus `json:"status,omitempty"`
}

// PipelineResourceBinding connects a reference to an instance of a PipelineResource
Expand Down
34 changes: 0 additions & 34 deletions pkg/apis/pipeline/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 0 additions & 17 deletions pkg/client/clientset/versioned/typed/pipeline/v1alpha1/pipeline.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e75dbaa

Please sign in to comment.