Skip to content

Commit

Permalink
Remove "Building" status reason
Browse files Browse the repository at this point in the history
This was a vestige of the days when Tekton (née "build pipelines") was
focused on "building" instead of arbitrary "task execution".

Fixes #815
  • Loading branch information
imjasonh authored and tekton-robot committed Aug 21, 2019
1 parent c371bef commit b810085
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
2 changes: 1 addition & 1 deletion pkg/reconciler/taskrun/taskrun_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/status/taskrunpod.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
})
}

Expand Down Expand Up @@ -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:
Expand Down
12 changes: 3 additions & 9 deletions pkg/status/taskrunpod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,14 @@ 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,
Status: corev1.ConditionTrue,
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
Expand Down Expand Up @@ -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{
Expand Down Expand Up @@ -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{
Expand Down
4 changes: 0 additions & 4 deletions pkg/status/taskrunreasons.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit b810085

Please sign in to comment.