Skip to content

Commit

Permalink
Use new TerminationReason attribute
Browse files Browse the repository at this point in the history
The v1.StepState now has an attribute, `TerminationReason`, which holds
the reason why the container was terminated. Prior to this,
`Terminated.Reason` had to be used. In v1, `Terminated` could be nil, so
accessing the reason that way can cause a panic.

Signed-off-by: Luiz Carvalho <[email protected]>
  • Loading branch information
lcarva committed Sep 3, 2024
1 parent 51f3326 commit 3576099
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion acceptance/kubernetes/kind/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ func (k *kindCluster) TaskInfo(ctx context.Context) (*types.TaskInfo, error) {

info.Steps = append(info.Steps, types.Step{
Name: s.Name,
Status: s.Terminated.Reason,
Status: s.TerminationReason,
Logs: logs,
EnvVars: envVars,
})
Expand Down

0 comments on commit 3576099

Please sign in to comment.