Skip to content

Misconfigured TaskRun pods cause PipelineRuns to silently timeout #9144

@aThorp96

Description

@aThorp96

Expected Behavior

A TaskRun with a TaskRun Pod that cannot start would either fail early, or when it times out the TaskRun's "Succeeded" failed condition should give some helpful message indicating that the TaskRun Pod could not start. Something like `TaskRun "configmap-4qrgb" failed to finish within "1m0s: pod status "PodReadyToStartContainers":"False";"

Actual Behavior

The Succeeded failed condition does not indicate that the Pod could not start: TaskRun "my-taskrun" failed to finish within "$timeout".

Steps to Reproduce the Problem

  1. Create the following TaskRun:
---
apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
  generateName: missing-configmap-
spec:
  timeout: 1m
  taskSpec:
    steps:
    - name: secret
      image: mirror.gcr.io/ubuntu
      script: |
        #!/usr/bin/env bash
        [[ $(cat /config/test.data) == $TEST_DATA ]]
      env:
      - name: TEST_DATA
        valueFrom:
          configMapKeyRef:
            name: config-for-testing-configmaps
            key: test.data
      volumeMounts:
      - name: config-volume
        mountPath: /config
    volumes:
    - name: config-volume
      configMap:
        name: config-for-testing-configmaps
  1. Observe that the TaskRun Pod never starts, the TaskRun remains in a "Pending" instead of "Running", and that the timeout of the TaskRun doesn't indicate there was any issue starting the TaskRun pod

Additional Info

  • Kubernetes version:

    Output of kubectl version:

~/c/tektoncd-pipeline (main|✚1) $ kubectl version
Client Version: v1.32.0
Kustomize Version: v5.5.0
Server Version: v1.32.0
  • Tekton Pipeline version:

    Output of tkn version or kubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'

$ tkn version
Client version: 0.41.0
Pipeline version: v1.4.0
Dashboard version: v0.61.0

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

Status

Todo

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions