From b8100856fedda3cb77f31b9487d093af5597fc7c Mon Sep 17 00:00:00 2001 From: Jason Hall Date: Wed, 21 Aug 2019 09:04:47 -0400 Subject: [PATCH] Remove "Building" status reason MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was a vestige of the days when Tekton (née "build pipelines") was focused on "building" instead of arbitrary "task execution". Fixes #815 --- pkg/reconciler/taskrun/taskrun_test.go | 2 +- pkg/status/taskrunpod.go | 4 ++-- pkg/status/taskrunpod_test.go | 12 +++--------- pkg/status/taskrunreasons.go | 4 ---- 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/pkg/reconciler/taskrun/taskrun_test.go b/pkg/reconciler/taskrun/taskrun_test.go index ddd176a45a9..b14d4869c7a 100644 --- a/pkg/reconciler/taskrun/taskrun_test.go +++ b/pkg/reconciler/taskrun/taskrun_test.go @@ -1363,8 +1363,8 @@ func TestReconcilePodUpdateStatus(t *testing.T) { if d := cmp.Diff(newTr.Status.GetCondition(apis.ConditionSucceeded), &apis.Condition{ Type: apis.ConditionSucceeded, Status: corev1.ConditionUnknown, - Message: "Running", Reason: "Running", + Message: "Not all Steps in the Task have finished executing", }, ignoreLastTransitionTime); d != "" { t.Fatalf("-got, +want: %v", d) } diff --git a/pkg/status/taskrunpod.go b/pkg/status/taskrunpod.go index 9fbae507648..60999ab40f7 100644 --- a/pkg/status/taskrunpod.go +++ b/pkg/status/taskrunpod.go @@ -40,7 +40,7 @@ func UpdateStatusFromPod(taskRun *v1alpha1.TaskRun, pod *corev1.Pod, resourceLis Type: apis.ConditionSucceeded, Status: corev1.ConditionUnknown, Reason: ReasonRunning, - Message: ReasonRunning, + Message: "Not all Steps in the Task have finished executing", }) } @@ -98,7 +98,7 @@ func updateIncompleteTaskRun(taskRun *v1alpha1.TaskRun, pod *corev1.Pod) { taskRun.Status.SetCondition(&apis.Condition{ Type: apis.ConditionSucceeded, Status: corev1.ConditionUnknown, - Reason: ReasonBuilding, + Reason: ReasonRunning, Message: "Not all Steps in the Task have finished executing", }) case corev1.PodPending: diff --git a/pkg/status/taskrunpod_test.go b/pkg/status/taskrunpod_test.go index adfffda331d..5c383a25df1 100644 --- a/pkg/status/taskrunpod_test.go +++ b/pkg/status/taskrunpod_test.go @@ -41,7 +41,7 @@ func TestUpdateStatusFromPod(t *testing.T) { Type: apis.ConditionSucceeded, Status: corev1.ConditionUnknown, Reason: ReasonRunning, - Message: ReasonRunning, + Message: "Not all Steps in the Task have finished executing", } conditionTrue := apis.Condition{ Type: apis.ConditionSucceeded, @@ -49,12 +49,6 @@ func TestUpdateStatusFromPod(t *testing.T) { Reason: ReasonSucceeded, Message: "All Steps have completed executing", } - conditionBuilding := apis.Condition{ - Type: apis.ConditionSucceeded, - Status: corev1.ConditionUnknown, - Reason: ReasonBuilding, - Message: "Not all Steps in the Task have finished executing", - } for _, c := range []struct { desc string podStatus corev1.PodStatus @@ -176,7 +170,7 @@ func TestUpdateStatusFromPod(t *testing.T) { }, want: v1alpha1.TaskRunStatus{ Status: duckv1beta1.Status{ - Conditions: []apis.Condition{conditionBuilding}, + Conditions: []apis.Condition{conditionRunning}, }, Steps: []v1alpha1.StepState{{ ContainerState: corev1.ContainerState{ @@ -390,7 +384,7 @@ func TestUpdateStatusFromPod(t *testing.T) { }, want: v1alpha1.TaskRunStatus{ Status: duckv1beta1.Status{ - Conditions: []apis.Condition{conditionBuilding}, + Conditions: []apis.Condition{conditionRunning}, }, Steps: []v1alpha1.StepState{{ ContainerState: corev1.ContainerState{ diff --git a/pkg/status/taskrunreasons.go b/pkg/status/taskrunreasons.go index f70745a8f3b..26960a509b6 100644 --- a/pkg/status/taskrunreasons.go +++ b/pkg/status/taskrunreasons.go @@ -33,10 +33,6 @@ const ( // is just starting to be reconciled ReasonRunning = "Running" - // reasonBuilding indicates that the reason for the in-progress status is that the TaskRun - // is just being built - ReasonBuilding = "Building" - // reasonTimedOut indicates that the TaskRun has taken longer than its configured timeout ReasonTimedOut = "TaskRunTimeout"