[JIRA] (JENKINS-58102) GlobalAnnotator does not annotate lines that are part of a multi-line color sequence

13 views
Skip to first unread message

me@basilcrow.com (JIRA)

unread,
Jun 19, 2019, 12:14:04 PM6/19/19
to jenkinsc...@googlegroups.com
Basil Crow created an issue
 
Jenkins / Bug JENKINS-58102
GlobalAnnotator does not annotate lines that are part of a multi-line color sequence
Issue Type: Bug Bug
Assignee: Steven G Brown
Components: timestamper-plugin
Created: 2019-06-19 16:13
Environment: timestamper 1.9
ansicolor 0.6.2
pipeline-build-step 2.9
pipeline-github-lib 1.0
pipeline-githubnotify-step 1.0.4
pipeline-graph-analysis 1.10
pipeline-input-step 2.10
pipeline-milestone-step 1.3.1
pipeline-model-api 1.3.9
pipeline-model-declarative-agent 1.1.1
pipeline-model-definition 1.3.9
pipeline-model-extensions 1.3.9
pipeline-rest-api 2.11
pipeline-stage-step 2.3
pipeline-stage-tags-metadata 1.3.9
pipeline-stage-view 2.11
pipeline-utility-steps 2.3.0
workflow-aggregator 2.6
workflow-api 2.35
workflow-basic-steps 2.18
workflow-cps 2.70
workflow-cps-global-lib 2.13
workflow-durable-task-step 2.31
workflow-job 2.32
workflow-multibranch 2.21
workflow-scm-step 2.9
workflow-step-api 2.20
workflow-support 3.3
Priority: Minor Minor
Reporter: Basil Crow

Steps to reproduce

1. Install timestamper 1.9 and ansicolor 0.6.2.
2. Set the global option to enable timestamps for all Pipeline builds.
3. Create a job with a console log as follows, and view the console in the classic UI.

[2019-06-18T19:59:27.250Z] ^[[32mDone resetting Postgres targets^[[39m
[2019-06-18T19:59:27.250Z] ^[[34m# vm.example.com:
[2019-06-18T19:59:27.250Z] Could not fetch logs: Error while executing command: "awk 'BEGIN { CAPTURE="Could not fetch logs: Error while executing command: "grep -c "Starting initial_setup_tests.test_developer_reset_system" /var/log/error.log" Exit status: 1" }; CAPTURE==0 { if (lines > 0){print; lines-- }}; /"Starting initial_setup_tests.test_developer_reset_system"/ { CAPTURE--; lines=200}' /var/log/error.log" Exit status: 1# dlpx-trunk-84487-target.dlpxdc.co:
[2019-06-18T19:59:27.250Z] Could not fetch logs: Error while executing command: "awk 'BEGIN { CAPTURE="Could not fetch logs: Error while executing command: "grep -c "Starting initial_setup_tests.test_developer_reset_system" /var/log/error.log" Exit status: 1" }; CAPTURE==0 { if (lines > 0){print; lines-- }}; /"Starting initial_setup_tests.test_developer_reset_system"/ { CAPTURE--; lines=200}' /var/log/error.log" Exit status: 1
[2019-06-18T19:59:27.250Z] ^[[39m
[2019-06-18T19:59:27.931Z] ^[[32mHTTP CONNECTION: vm.example.com/resources/json/session^[[39m

Expected results

GlobalAnnotator should mark up the timestamps for all lines as follows:

12:59:27  Done resetting Postgres targets
12:59:27  # vm.example.com:
12:59:27 Could not fetch logs: Error while executing command: "awk 'BEGIN { CAPTURE="Could not fetch logs: Error while executing command: "grep -c "Starting initial_setup_tests.test_developer_reset_system" /var/log/error.log" Exit status: 1" }; CAPTURE==0 { if (lines > 0){print; lines-- }}; /"Starting initial_setup_tests.test_developer_reset_system"/ { CAPTURE--; lines=200}' /var/log/error.log" Exit status: 1# dlpx-trunk-84487-target.dlpxdc.co:
12:59:27 Could not fetch logs: Error while executing command: "awk 'BEGIN { CAPTURE="Could not fetch logs: Error while executing command: "grep -c "Starting initial_setup_tests.test_developer_reset_system" /var/log/error.log" Exit status: 1" }; CAPTURE==0 { if (lines > 0){print; lines-- }}; /"Starting initial_setup_tests.test_developer_reset_system"/ { CAPTURE--; lines=200}' /var/log/error.log" Exit status: 1
12:59:27 
12:59:27  HTTP CONNECTION: vm.example.com/resources/json/session

Actual results

GlobalAnnotator marks up the first two lines and the and last line, but the three lines in the middle are not annotated:

12:59:27  Done resetting Postgres targets
12:59:27  # vm.example.com:
[2019-06-18T19:59:27.250Z] Could not fetch logs: Error while executing command: "awk 'BEGIN { CAPTURE="Could not fetch logs: Error while executing command: "grep -c "Starting initial_setup_tests.test_developer_reset_system" /var/log/error.log" Exit status: 1" }; CAPTURE==0 { if (lines > 0){print; lines-- }}; /"Starting initial_setup_tests.test_developer_reset_system"/ { CAPTURE--; lines=200}' /var/log/error.log" Exit status: 1# dlpx-trunk-84487-target.dlpxdc.co:
[2019-06-18T19:59:27.250Z] Could not fetch logs: Error while executing command: "awk 'BEGIN { CAPTURE="Could not fetch logs: Error while executing command: "grep -c "Starting initial_setup_tests.test_developer_reset_system" /var/log/error.log" Exit status: 1" }; CAPTURE==0 { if (lines > 0){print; lines-- }}; /"Starting initial_setup_tests.test_developer_reset_system"/ { CAPTURE--; lines=200}' /var/log/error.log" Exit status: 1
[2019-06-18T19:59:27.250Z] 
12:59:27  HTTP CONNECTION: vm.example.com/resources/json/session

Note that the three lines in the middle are part of a multi-line color sequence.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

me@basilcrow.com (JIRA)

unread,
Jun 19, 2019, 12:19:01 PM6/19/19
to jenkinsc...@googlegroups.com
Basil Crow commented on Bug JENKINS-58102
 
Re: GlobalAnnotator does not annotate lines that are part of a multi-line color sequence

Jesse Glick This is possibly related to the html.startsWith logic in GlobalAnnotator.

me@basilcrow.com (JIRA)

unread,
Jun 23, 2019, 7:00:02 PM6/23/19
to jenkinsc...@googlegroups.com

me@basilcrow.com (JIRA)

unread,
Jul 8, 2019, 8:13:02 PM7/8/19
to jenkinsc...@googlegroups.com

me@basilcrow.com (JIRA)

unread,
Jul 8, 2019, 8:14:02 PM7/8/19
to jenkinsc...@googlegroups.com
Basil Crow updated Bug JENKINS-58102
 

Released in Timestamper 1.10.

Change By: Basil Crow
Status: Open Fixed but Unreleased
Resolution: Fixed
Released As: 1.10

me@basilcrow.com (JIRA)

unread,
Jul 8, 2019, 8:14:04 PM7/8/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages