From 1203e8ad068884cb7c4d5b81cd55129c082acfed Mon Sep 17 00:00:00 2001 From: hrishikesh Date: Wed, 4 Mar 2020 13:23:25 +0530 Subject: [PATCH] Fixes Steps container spec serialization/deserialization When using `Task/ClusterTask` API with dynamic client, serlization/deserialization adds container as child key as Spec.steps[*].Container. Ideally, it should preserver the step spec state and should not add the step spec details under the child key container This patch fixes the issue by adding right json directive in step spec. Fixes https://github.com/tektoncd/pipeline/issues/2150 --- pkg/apis/pipeline/v1beta1/task_types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/apis/pipeline/v1beta1/task_types.go b/pkg/apis/pipeline/v1beta1/task_types.go index 81b290713c1..8cb2cde6c26 100644 --- a/pkg/apis/pipeline/v1beta1/task_types.go +++ b/pkg/apis/pipeline/v1beta1/task_types.go @@ -103,7 +103,7 @@ type TaskResult struct { // Step embeds the Container type, which allows it to include fields not // provided by Container. type Step struct { - corev1.Container + corev1.Container `json:",inline"` // Script is the contents of an executable file to execute. //