New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug 1915898: Drop "undefined" and keep empty lines in Pipeline log output #7828
Conversation
@jerolimov: This pull request references Bugzilla bug 1915898, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@jerolimov: This pull request references Bugzilla bug 1915898, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/kind bug |
/cc @karthikjeeyar |
/bugzilla refresh |
@jerolimov: This pull request references Bugzilla bug 1915898, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Thanks @jerolimov for matching the log output with tkn cli log output and am not able to see the undefined issue anymore. |
const appendMessage = React.useRef<(blockContent) => void>(); | ||
const prevFetchNewline = React.useRef(true); | ||
|
||
appendMessage.current = React.useCallback( | ||
(blockContent: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logically, this method should be cleaned up more. Your two if-statements share the same logical check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, much cleaner logic. Only one nit, approving.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrewballantyne, jerolimov, karthikjeeyar The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@jerolimov: All pull requests linked via external trackers have merged: Bugzilla bug 1915898 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Fixes:
https://issues.redhat.com/browse/ODC-5224
https://bugzilla.redhat.com/show_bug.cgi?id=1915898
Analysis / Root cause:
There are some edge cases where the old case appends "undefined" to the log output. The old solution also drops empty lines.
Solution Description:
Drop the string operations which split strings and append them to different div elements. Don't add new div elements per line. (Pod logs also doesn't do this.) Just use one single "content" div where new content was appended to the innerText, incl. \n.
Added a second empty div as scroll references for autoscrolling.
Screen shots / Gifs for design review:
to this:
The tkn cli outputs a similar look and contains the new lines:
Unit test coverage report:
Not touched
Test setup:
To tests if the undefined doesn't appear anymore you need to run a pipeline with many output and delays multiple times. I could find this undefined in many cases when runing the
undefined-test.yaml
pipeline below.To test the new lines you need a pipeline which creates one. One way is to disable the bash command output and run commands separated by an echo. See
empty-lines.yaml
pipeline below.undefined-test.yaml
empty-lines.yaml
Browser conformance:
The smooth scrolling doesn't work on Safari with and without this PR.