Skip to content

Commit

Permalink
Remove unused ReasonCouldntGetTask
Browse files Browse the repository at this point in the history
This commit removes the unused pod.ReasonCouldntGetTask.
ReasonCouldntGetTask has been moved from reconciler to pod/status pkg
via tektoncd#1627. The reference to it has been removed since tektoncd#6295.

/kind cleanup
  • Loading branch information
JeromeJu committed Nov 23, 2023
1 parent 7b881ae commit ff59bae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
4 changes: 0 additions & 4 deletions pkg/pod/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ import (
)

const (
// ReasonCouldntGetTask indicates that the reason for the failure status is that the
// Task couldn't be found
ReasonCouldntGetTask = "CouldntGetTask"

// ReasonFailedResolution indicated that the reason for failure status is
// that references within the TaskRun could not be resolved
ReasonFailedResolution = "TaskRunResolutionFailed"
Expand Down
6 changes: 3 additions & 3 deletions test/resolvers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
"github.com/goccy/kpoward"
"github.com/jenkins-x/go-scm/scm/factory"
resolverconfig "github.com/tektoncd/pipeline/pkg/apis/config/resolver"
"github.com/tektoncd/pipeline/pkg/pod"
v1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
"github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun"
"github.com/tektoncd/pipeline/pkg/resolution/resolver/git"
"github.com/tektoncd/pipeline/test/parse"
Expand Down Expand Up @@ -193,7 +193,7 @@ spec:
t.Logf("Waiting for PipelineRun %s in namespace %s to complete", prName, namespace)
if err := WaitForPipelineRunState(ctx, c, prName, timeout,
Chain(
FailedWithReason(pod.ReasonCouldntGetTask, prName),
FailedWithReason(v1.PipelineRunReasonCouldntGetTask.String(), prName),
FailedWithMessage("fail to fetch Artifact Hub resource: requested resource 'https://artifacthub.io/api/v1/packages/tekton-task/tekton-catalog-tasks/git-clone-this-does-not-exist' not found on hub", prName),
), "PipelineRunFailed", v1Version); err != nil {
t.Fatalf("Error waiting for PipelineRun to finish with expected error: %s", err)
Expand Down Expand Up @@ -357,7 +357,7 @@ spec:
t.Logf("Waiting for PipelineRun %s in namespace %s to complete", prName, namespace)
if err := WaitForPipelineRunState(ctx, c, prName, timeout,
Chain(
FailedWithReason(pod.ReasonCouldntGetTask, prName),
FailedWithReason(v1.PipelineRunReasonCouldntGetTask.String(), prName),
FailedWithMessage(expectedErr, prName),
), "PipelineRunFailed", v1Version); err != nil {
t.Fatalf("Error waiting for PipelineRun to finish with expected error: %s", err)
Expand Down
4 changes: 2 additions & 2 deletions test/tektonbundles_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ import (
"github.com/google/go-containerregistry/pkg/v1/layout"
"github.com/google/go-containerregistry/pkg/v1/mutate"
"github.com/google/go-containerregistry/pkg/v1/tarball"
pipelinev1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1"
"github.com/tektoncd/pipeline/pkg/pod"
"github.com/tektoncd/pipeline/pkg/reconciler/pipelinerun"
"github.com/tektoncd/pipeline/test/parse"
corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -300,7 +300,7 @@ spec:
t.Logf("Waiting for PipelineRun in namespace %s to finish", namespace)
if err := WaitForPipelineRunState(ctx, c, pipelineRunName, timeout,
Chain(
FailedWithReason(pod.ReasonCouldntGetTask, pipelineRunName),
FailedWithReason(pipelinev1.PipelineRunReasonCouldntGetTask.String(), pipelineRunName),
FailedWithMessage("does not contain a dev.tekton.image.apiVersion annotation", pipelineRunName),
), "PipelineRunFailed", v1beta1Version); err != nil {
t.Fatalf("Error waiting for PipelineRun to finish with expected error: %s", err)
Expand Down

0 comments on commit ff59bae

Please sign in to comment.