-
Bug
-
Resolution: Done
-
Critical
-
Pipelines 1.9.2
-
None
-
False
-
None
-
False
-
users can still view the output through the Pod log API if stdoutConfig.path or stderrConfig.path is specified
-
-
Description of problem:
There are no logs in neither tkn nor OpenShift console when step contains stdoutConfig (https://tekton.dev/docs/pipelines/tasks/#redirecting-step-output-streams-with-stdoutconfig-and-stderrconfig)
Prerequisites (if any, like setup, operators/versions):
OpenShift 4.12.8
Pipelines 1.9.2, 1.10.0
Steps to Reproduce
- install Pipelines 1.9.2 or 1.10.0
- update TektonConfig with enable-api-fields=alpha
- create a task and taskrun
apiVersion: tekton.dev/v1beta1 kind: Task metadata: name: stdout-config spec: params: - name: my-param default: '' steps: - image: registry.redhat.io/ubi7/ubi-minimal script: | echo "-----------------------" echo $(inputs.params.my-param) echo "-----------------------" [ -f $(workspaces.output.path)/output.log ] && cat $(workspaces.output.path)/output.log echo "-----------------------" stdoutConfig: path: $(workspaces.output.path)/output.log workspaces: - name: output --- apiVersion: tekton.dev/v1beta1 kind: TaskRun metadata: generateName: stdout-config- spec: params: - name: my-param value: "foo bar" taskRef: name: stdout-config workspaces: - name: output volumeClaimTemplate: spec: accessModes: - ReadWriteOnce resources: requests: storage: 200Mi
Actual results:
No logs
$ oc create -f stdout-config-taskrun.yaml && tkn tr logs -f --last taskrun.tekton.dev/stdout-config-4tmg6 created $ tkn tr ls NAME STARTED DURATION STATUS stdout-config-4tmg6 42 seconds ago 30s Succeeded
Expected results:
I can see logs when running "tkn tr logs", in OpenShift console and they are also in file
Reproducibility (Always/Intermittent/Only Once):
Always
Build Details:
Additional info (Such as Logs, Screenshots, etc):
Upstream fix https://github.com/tektoncd/pipeline/pull/6162