[JIRA] (JENKINS-60862) Truncated build logs do not show parallel branch names that began before the truncation point

14 views
Skip to first unread message

dnusbaum@cloudbees.com (JIRA)

unread,
Jan 24, 2020, 4:43:03 PM1/24/20
to jenkinsc...@googlegroups.com
Devin Nusbaum created an issue
 
Jenkins / Bug JENKINS-60862
Truncated build logs do not show parallel branch names that began before the truncation point
Issue Type: Bug Bug
Assignee: Devin Nusbaum
Components: workflow-job-plugin
Created: 2020-01-24 21:42
Labels: pipeline logging
Priority: Major Major
Reporter: Devin Nusbaum

JENKINS-54304 added a CSS prefix for parallel branch names to Pipeline logs, but that fix relies on the start node for the branch being present in the HTML displayed on the console output page, which is not always the case for truncated logs. This results in parallel branch names not being displayed for branches that began before the truncation point.

I am not sure about the best way to fix this. We could create some synthetic hidden nodes that hold the necessary information when the log is truncated and write them directly into the log when we are producing an HTML log, and then tweak the Javascript in workflow-job that adds the CSS rules to display the branch names, but that seems very awkward, and I think would need to be done in each individual implementation of LogStorage (or maybe we could make some API change to LogStorage.overallLog or AnnotatedLargeText to make it possible to add that logic in just once place). I prototyped this approach, and will submit draft PRs for it shortly.

Maybe it would be better to just insert the branch names directly into the logs when generating HTML logs in the LogStorage implementations. That would also take care of JENKINS-56910, and would get rid of the lag between when the log shows up and the branch names are displayed because they are generated via Javascript.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

dnusbaum@cloudbees.com (JIRA)

unread,
Jan 24, 2020, 5:02:02 PM1/24/20
to jenkinsc...@googlegroups.com
Devin Nusbaum started work on Bug JENKINS-60862
 
Change By: Devin Nusbaum
Status: Open In Progress

dnusbaum@cloudbees.com (JIRA)

unread,
Jan 24, 2020, 6:02:03 PM1/24/20
to jenkinsc...@googlegroups.com
Devin Nusbaum updated an issue
Change By: Devin Nusbaum
JENKINS-54304 added a CSS prefix for parallel branch names to Pipeline logs, but that fix relies on the start node for the branch being present in the HTML displayed on the console output page, which is not always the case for truncated logs. This results in parallel branch names not being displayed for branches that began before the truncation point.

I am not sure about the best way to fix this. We could create some synthetic hidden nodes that hold the necessary information when the log is truncated and write them directly into the log when we are producing an HTML log, and then tweak the Javascript in workflow-job that adds the CSS rules to display the branch names, but that seems very awkward, and I think would need to be done in each individual implementation of {{LogStorage}} (or maybe we could make some API change to {{LogStorage.overallLog}} or {{AnnotatedLargeText}} to make it possible to add that logic in just once place). I prototyped this approach, and will submit draft PRs for it shortly.

Maybe it would be better to just insert the branch names directly into the logs when generating HTML logs in the {{LogStorage}} implementations. That would also take care of JENKINS-56910, and would get rid of the lag between when the log shows up and the branch names are displayed because they are generated via Javascript.

One other option would be to revert to the old approach of inserting a console note for each branch transition with all of the necessary data for display, but that adds a lot of overhead to to the size of the log.

dnusbaum@cloudbees.com (JIRA)

unread,
Jan 27, 2020, 2:12:02 PM1/27/20
to jenkinsc...@googlegroups.com
Devin Nusbaum updated an issue
JENKINS-54304 added a CSS prefix for parallel branch names to Pipeline logs, but that fix relies on the start node for the branch being present in the HTML displayed on the console output page, which is not always the case for truncated logs. This results in parallel branch names not being displayed for branches that began before the truncation point.

I am not sure about the best way to fix this. We could create some synthetic hidden nodes that hold the necessary information when the log is truncated and write them directly into the log when we are producing an HTML log, or add them directly in a copy of console.jelly, and then tweak the Javascript in workflow-job that adds the CSS rules to display the branch names, but that seems very awkward, and I think would need to be done in each individual implementation of {{LogStorage}} (or maybe we could make some API change to {{LogStorage.overallLog}} or {{AnnotatedLargeText}} to make it possible to add that logic in just once place). I prototyped this approach, and will submit draft PRs for it shortly.


Maybe it would be better to just insert the branch names directly into the logs when generating HTML logs in the {{LogStorage}} implementations. That would also take care of JENKINS-56910, and would get rid of the lag between when the log shows up and the branch names are displayed because they are generated via Javascript.

One other option would be to revert to the old approach of inserting a console note for each branch transition with all of the necessary data for display, but that adds a lot of overhead to to the size of the log.

dnusbaum@cloudbees.com (JIRA)

unread,
Jan 27, 2020, 2:38:21 PM1/27/20
to jenkinsc...@googlegroups.com
Devin Nusbaum updated an issue
JENKINS-54304 added a CSS prefix for parallel branch names to Pipeline logs, but that fix relies on the start node for the branch being present in the HTML displayed on the console output page, which is not always the case for truncated logs. This results in parallel branch names not being displayed for branches that began before the truncation point.

I am not sure about the best way to fix this. We could create some synthetic hidden nodes that hold the necessary information when the log is truncated and write them directly into the log when we are producing an HTML log, or add them directly in a copy of console.jelly, and then tweak the Javascript in workflow-job that adds the CSS rules to display the branch names, but that seems very awkward, and I think would need to be done in each individual implementation of {{LogStorage}} (or maybe we could make some API change to {{LogStorage.overallLog}} or {{AnnotatedLargeText}} to make it possible to add that logic in just once place). I prototyped this approach, and will submit draft PRs for it shortly.

Maybe it would be better to just insert revert to inserting the branch names directly into the logs when generating HTML logs in the {{LogStorage}} implementations , similarly to how things worked before JENKINS-38381 . That would also take care of JENKINS-56910, and would get rid of the lag between when the log shows up and the branch names are displayed because they are generated via Javascript.

One other option
That would be to revert to make the old approach logs larger because of inserting a console note for each branch transition with all of the necessary redundant data for display , but that adds given the comments on JENKINS-60862, it seems like a lot of overhead to to people considered the size of old behavior a feature, so I think the log tradeoff is worth considering .

dnusbaum@cloudbees.com (JIRA)

unread,
Jan 27, 2020, 2:50:03 PM1/27/20
to jenkinsc...@googlegroups.com
Devin Nusbaum updated an issue
JENKINS-54304 added a CSS prefix for parallel branch names to Pipeline logs, but that fix relies on the start node for the branch being present in the HTML displayed on the console output page, which is not always the case for truncated logs. This results in parallel branch names not being displayed for branches that began before the truncation point.

I am not sure about the best way to fix this. We could create some synthetic hidden nodes that hold the necessary information when the log is truncated and write them directly into the log when we are producing an HTML log, or add them directly in a copy of console.jelly, and then tweak the Javascript in workflow-job that adds the CSS rules to display the branch names, but that seems very awkward, and I think would need to be done in each individual implementation of {{LogStorage}} (or maybe we could make some API change to {{LogStorage.overallLog}} or {{AnnotatedLargeText}} to make it possible to add that logic in just once place). I prototyped A prototype of this kind of approach , and will submit draft PRs for it shortly can be seen [here|https://github . com/jenkinsci/workflow-job-plugin/pull/150].

Maybe it would be better to revert to inserting the branch names directly into the logs when generating HTML logs in the {{LogStorage}} implementations, similarly to how things worked before JENKINS-38381. That would also take care of JENKINS-56910, and would get rid of the lag between when the log shows up and the branch names are displayed because they are generated via Javascript. That would make the logs larger because of all of the redundant data, but given the comments on JENKINS-60862, it seems like a lot of people considered the old behavior a feature, so I think the tradeoff is worth considering.

dnusbaum@cloudbees.com (JIRA)

unread,
Mar 10, 2020, 5:27:04 PM3/10/20
to jenkinsc...@googlegroups.com
Devin Nusbaum resolved as Fixed
 

A fix for this issue was released in Pipeline: Job Plugin version 2.37. See the changelog for details.

Change By: Devin Nusbaum
Status: In Progress Resolved
Resolution: Fixed
Released As: workflow-job 2.37
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages