Bug 1915898 - TaskRun log output shows "undefined" in streaming
Summary: TaskRun log output shows "undefined" in streaming
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Dev Console
Version: 4.7
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 4.7.0
Assignee: Christoph Jerolimov
QA Contact: Mohammed Saud
Harsh Mishra
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-13 16:55 UTC by Christoph Jerolimov
Modified: 2021-02-24 15:53 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
While running a Pipeline, the log tab of the `TaskRun` resource displayed the string as `undefined` after the command in the output. This was caused due to some edge cases where some internal string operations printed `undefined` to the log output. This issue has been fixed now, and the pipeline log output does not drop empty lines from the log stream and does not print the string `undefined` any longer.
Clone Of:
Environment:
Last Closed: 2021-02-24 15:52:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
empty-line-in-pipeline-script.yaml (321 bytes, text/plain)
2021-01-13 16:59 UTC, Christoph Jerolimov
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 7828 0 None closed Bug 1915898: Drop "undefined" and keep empty lines in Pipeline log output 2021-02-04 11:57:46 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:53:00 UTC

Description Christoph Jerolimov 2021-01-13 16:55:48 UTC
Description of problem:
When running a Pipeline, the log tab of the TaskRun shows sometimes the string "undefined" after the command in the output.

This happen only sometimes and only while streaming the log. In my tests this only happen on the TaskRun detail page, not on the PipelineRun detail page.

When (re) loading a finished log the "undefined" string disappears and is shown as expected.

Version-Release number of selected component (if applicable):
OpenShift Pipelines Operator is installed (tested with 1.1.1)
OpenShift Console 4.7 master (commit 512bb95a3fbff309582496a4cbe608ffa3fe10de)

How reproducible:
Intermittent ~50 %

Steps to Reproduce:
1. Create a Pipeline with a task and a script, see attached yaml file.
2. Start the Pipeline and quickly open the TaskRun tab, select the TaskRun and open the logs tab.

Actual results:
Logs shows undefined after the command (not always)

+ node --versionundefined
v15.3.0
+ node --versionundefined
v15.3.0


Expected results:
No "undefined" string:

+ node --version
v15.3.0
+ node --version
v15.3.0


Additional info:
None

Comment 1 Christoph Jerolimov 2021-01-13 16:59:09 UTC
Created attachment 1747114 [details]
empty-line-in-pipeline-script.yaml

Comment 3 Mohammed Saud 2021-01-27 15:10:46 UTC
Verified on:
Version: 4.7.0-0.nightly-2021-01-27-072811
Browser: Firefox 84

TaskRun log shows properly without any unwanted text

Comment 6 errata-xmlrpc 2021-02-24 15:52:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:5633


Note You need to log in before you can comment on or make changes to this bug.