Skip to content

Commit 1e98eca

Browse files
piyush-gargtekton-robot
authored andcommitted
Mark step and side state inline
If we dont do this, then with dynamic client or using unstructured to unsmarshal, these structs are resulting in empty/nil values
1 parent ab391e7 commit 1e98eca

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pkg/apis/pipeline/v1beta1/taskrun_types.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -220,18 +220,18 @@ func (trs *TaskRunStatus) SetCondition(newCond *apis.Condition) {
220220

221221
// StepState reports the results of running a step in a Task.
222222
type StepState struct {
223-
corev1.ContainerState
224-
Name string `json:"name,omitempty"`
225-
ContainerName string `json:"container,omitempty"`
226-
ImageID string `json:"imageID,omitempty"`
223+
corev1.ContainerState `json:",inline"`
224+
Name string `json:"name,omitempty"`
225+
ContainerName string `json:"container,omitempty"`
226+
ImageID string `json:"imageID,omitempty"`
227227
}
228228

229229
// SidecarState reports the results of running a sidecar in a Task.
230230
type SidecarState struct {
231-
corev1.ContainerState
232-
Name string `json:"name,omitempty"`
233-
ContainerName string `json:"container,omitempty"`
234-
ImageID string `json:"imageID,omitempty"`
231+
corev1.ContainerState `json:",inline"`
232+
Name string `json:"name,omitempty"`
233+
ContainerName string `json:"container,omitempty"`
234+
ImageID string `json:"imageID,omitempty"`
235235
}
236236

237237
// CloudEventDelivery is the target of a cloud event along with the state of

0 commit comments

Comments
 (0)