Skip to content

Commit

Permalink
Correct required v.s. optional fields in run status
Browse files Browse the repository at this point in the history
Fixes #5818.

Prior, `startTime` and `completionTime` are marked as optional fields in Run
status, and `provenance` field was not marked as optional in Run status.

Now, we remove `+optional` tag for `startTime` and `completionTime` in Run
status, and add `+optional` tag for the `provenance` field.

Signed-off-by: Chuang Wang <[email protected]>
  • Loading branch information
chuangw6 authored and tekton-robot committed Dec 23, 2022
1 parent aedc346 commit 07598ee
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 16 deletions.
12 changes: 4 additions & 8 deletions docs/pipeline-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2229,7 +2229,6 @@ Kubernetes meta/v1.Time
</em>
</td>
<td>
<em>(Optional)</em>
<p>StartTime is the time the PipelineRun is actually started.</p>
</td>
</tr>
Expand All @@ -2243,7 +2242,6 @@ Kubernetes meta/v1.Time
</em>
</td>
<td>
<em>(Optional)</em>
<p>CompletionTime is the time the PipelineRun completed.</p>
</td>
</tr>
Expand Down Expand Up @@ -2326,6 +2324,7 @@ Provenance
</em>
</td>
<td>
<em>(Optional)</em>
<p>Provenance contains some key authenticated metadata about how a software artifact was built (what sources, what inputs/outputs, etc.).</p>
</td>
</tr>
Expand Down Expand Up @@ -5018,7 +5017,6 @@ Kubernetes meta/v1.Time
</em>
</td>
<td>
<em>(Optional)</em>
<p>StartTime is the time the build is actually started.</p>
</td>
</tr>
Expand All @@ -5032,7 +5030,6 @@ Kubernetes meta/v1.Time
</em>
</td>
<td>
<em>(Optional)</em>
<p>CompletionTime is the time the build completed.</p>
</td>
</tr>
Expand Down Expand Up @@ -5116,6 +5113,7 @@ Provenance
</em>
</td>
<td>
<em>(Optional)</em>
<p>Provenance contains some key authenticated metadata about how a software artifact was built (what sources, what inputs/outputs, etc.).</p>
</td>
</tr>
Expand Down Expand Up @@ -9896,7 +9894,6 @@ Kubernetes meta/v1.Time
</em>
</td>
<td>
<em>(Optional)</em>
<p>StartTime is the time the PipelineRun is actually started.</p>
</td>
</tr>
Expand All @@ -9910,7 +9907,6 @@ Kubernetes meta/v1.Time
</em>
</td>
<td>
<em>(Optional)</em>
<p>CompletionTime is the time the PipelineRun completed.</p>
</td>
</tr>
Expand Down Expand Up @@ -10023,6 +10019,7 @@ Provenance
</em>
</td>
<td>
<em>(Optional)</em>
<p>Provenance contains some key authenticated metadata about how a software artifact was built (what sources, what inputs/outputs, etc.).</p>
</td>
</tr>
Expand Down Expand Up @@ -13355,7 +13352,6 @@ Kubernetes meta/v1.Time
</em>
</td>
<td>
<em>(Optional)</em>
<p>StartTime is the time the build is actually started.</p>
</td>
</tr>
Expand All @@ -13369,7 +13365,6 @@ Kubernetes meta/v1.Time
</em>
</td>
<td>
<em>(Optional)</em>
<p>CompletionTime is the time the build completed.</p>
</td>
</tr>
Expand Down Expand Up @@ -13483,6 +13478,7 @@ Provenance
</em>
</td>
<td>
<em>(Optional)</em>
<p>Provenance contains some key authenticated metadata about how a software artifact was built (what sources, what inputs/outputs, etc.).</p>
</td>
</tr>
Expand Down
3 changes: 1 addition & 2 deletions pkg/apis/pipeline/v1/pipelinerun_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,9 @@ type ChildStatusReference struct {
// consume these fields via duck typing.
type PipelineRunStatusFields struct {
// StartTime is the time the PipelineRun is actually started.
// +optional
StartTime *metav1.Time `json:"startTime,omitempty"`

// CompletionTime is the time the PipelineRun completed.
// +optional
CompletionTime *metav1.Time `json:"completionTime,omitempty"`

// Results are the list of results written out by the pipeline task's containers
Expand All @@ -429,6 +427,7 @@ type PipelineRunStatusFields struct {
FinallyStartTime *metav1.Time `json:"finallyStartTime,omitempty"`

// Provenance contains some key authenticated metadata about how a software artifact was built (what sources, what inputs/outputs, etc.).
// +optional
Provenance *Provenance `json:"provenance,omitempty"`
}

Expand Down
3 changes: 1 addition & 2 deletions pkg/apis/pipeline/v1/taskrun_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,9 @@ type TaskRunStatusFields struct {
PodName string `json:"podName"`

// StartTime is the time the build is actually started.
// +optional
StartTime *metav1.Time `json:"startTime,omitempty"`

// CompletionTime is the time the build completed.
// +optional
CompletionTime *metav1.Time `json:"completionTime,omitempty"`

// Steps describes the state of each build step container.
Expand Down Expand Up @@ -235,6 +233,7 @@ type TaskRunStatusFields struct {
TaskSpec *TaskSpec `json:"taskSpec,omitempty"`

// Provenance contains some key authenticated metadata about how a software artifact was built (what sources, what inputs/outputs, etc.).
// +optional
Provenance *Provenance `json:"provenance,omitempty"`
}

Expand Down
3 changes: 1 addition & 2 deletions pkg/apis/pipeline/v1beta1/pipelinerun_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,11 +417,9 @@ type ChildStatusReference struct {
// consume these fields via duck typing.
type PipelineRunStatusFields struct {
// StartTime is the time the PipelineRun is actually started.
// +optional
StartTime *metav1.Time `json:"startTime,omitempty"`

// CompletionTime is the time the PipelineRun completed.
// +optional
CompletionTime *metav1.Time `json:"completionTime,omitempty"`

// Deprecated - use ChildReferences instead.
Expand Down Expand Up @@ -457,6 +455,7 @@ type PipelineRunStatusFields struct {
FinallyStartTime *metav1.Time `json:"finallyStartTime,omitempty"`

// Provenance contains some key authenticated metadata about how a software artifact was built (what sources, what inputs/outputs, etc.).
// +optional
Provenance *Provenance `json:"provenance,omitempty"`
}

Expand Down
3 changes: 1 addition & 2 deletions pkg/apis/pipeline/v1beta1/taskrun_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,9 @@ type TaskRunStatusFields struct {
PodName string `json:"podName"`

// StartTime is the time the build is actually started.
// +optional
StartTime *metav1.Time `json:"startTime,omitempty"`

// CompletionTime is the time the build completed.
// +optional
CompletionTime *metav1.Time `json:"completionTime,omitempty"`

// Steps describes the state of each build step container.
Expand Down Expand Up @@ -285,6 +283,7 @@ type TaskRunStatusFields struct {
TaskSpec *TaskSpec `json:"taskSpec,omitempty"`

// Provenance contains some key authenticated metadata about how a software artifact was built (what sources, what inputs/outputs, etc.).
// +optional
Provenance *Provenance `json:"provenance,omitempty"`
}

Expand Down

0 comments on commit 07598ee

Please sign in to comment.