Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-60299

Make build description in build history widget configurable or possible to hide

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None
    • Jenkins ver. 2.205, reproduced in browsers Chrome stable, Firefox and Edge Beta (insider preview)
    • Jenkins 2.223

      This relates to JENKINS-19760 and JENKINS-31209 resolved by https://github.com/jenkinsci/jenkins/pull/4209 where build description in build history widget is no longer truncated. A regression of this is that for elaborate build descriptions the build history widget becomes unusable.

      The change did not sit well with our organization as our build descriptions are quite extensive. We use groovy code to parse log output which results in a big html blob containing details about versions, servers, errors, warns git commit and details, related jira issues etc. This html is then used as build description which results in nice reports when the user views the job details:

      The issue after the change related to JENKINS-19760 and JENKINS-31209 is that this full html report is also displayed in the build history widget which practically makes the widget unusable:

      Possible solutions:

      • Have truncation length (maxDescrLength) configurable.
      • Possibility to hide build description in build history widget.

          [JENKINS-60299] Make build description in build history widget configurable or possible to hide

          Daniel Beck added a comment -

          Perhaps auto-hide a description if its rendered size would be too big? I.e. do not introduce a new option, but do the right thing based on content?

          Is this feasible?

          Daniel Beck added a comment - Perhaps auto-hide a description if its rendered size would be too big? I.e. do not introduce a new option, but do the right thing based on content? Is this feasible?

          Sounds good to me. I have no idea what the general use case is but for our use case auto hide would suffice

          Peder Schmedling added a comment - Sounds good to me. I have no idea what the general use case is but for our use case auto hide would suffice

          A possible workaround for those interested:

          1. Install Simple theme plugin
          2. Go to "Manage Jenkins" > "Configure System" > "Theme"
          3. Add "Extra CSS" with the following content:
            .cards_container.zws-inserted {
                display:none;
            }
            

          Peder Schmedling added a comment - A possible workaround for those interested: Install Simple theme plugin Go to "Manage Jenkins" > "Configure System" > "Theme" Add "Extra CSS" with the following content: .cards_container.zws-inserted { display :none; }

          Josh Soref added a comment -

          You could use this:

          td.build-row-cell > div > .build-link {
           background-color: pink;
           max-height: 3em;
           overflow-y: hidden;
          }
          td.build-row-cell > div.desc {
           background-color: yellow;
           max-height: 5em;
           overflow-y: hidden;
          }
          

          The coloring is included just to make it easy to identify the pieces.

          Personally, I think having some default css with some em based limits for both fields would be nice.

          I like including stack traces or similar in the second field, and the behavior we got wasn't particularly ideal.

          Josh Soref added a comment - You could use this: td.build-row-cell > div > .build-link { background-color: pink; max-height: 3em; overflow-y: hidden; } td.build-row-cell > div.desc { background-color: yellow; max-height: 5em; overflow-y: hidden; } The coloring is included just to make it easy to identify the pieces. Personally, I think having some default css with some em based limits for both fields would be nice. I like including stack traces or similar in the second field, and the behavior we got wasn't particularly ideal.

          Harry G. added a comment - - edited

          Thanks a lot! For me at first this didn't work, as our description contains html tables and still breaks out in width.
          So I added max-with which then works for me for desktop (probably not perfect for mobile)

          td.build-row-cell > div > .build-link {
           max-height: 3em;
           max-width: 320px;
            overflow-y: hidden;
          }
          td.build-row-cell > div.desc {
           max-height: 5em;
           max-width: 320px;
           overflow-y: hidden;
          }

          What remains is the high loading time, in my example few minutes on FF and more on Chrome, forever on IE.

           

          Harry G. added a comment - - edited Thanks a lot! For me at first this didn't work, as our description contains html tables and still breaks out in width. So I added max-with which then works for me for desktop (probably not perfect for mobile) td.build-row-cell > div > .build-link {  max-height: 3em;  max-width: 320px;   overflow-y: hidden; } td.build-row-cell > div.desc {  max-height: 5em;  max-width: 320px;  overflow-y: hidden; } What remains is the high loading time, in my example few minutes on FF and more on Chrome, forever on IE.  

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment -   https://github.com/jenkinsci/jenkins/pull/4529  should address it

          Daniel Beck added a comment -

          oleg_nenashev So is this done for now? If so, this should be resolved and marked as addressed in 2.223, otherwise I expect it won't make it into 2.222.1.

          Daniel Beck added a comment - oleg_nenashev So is this done for now? If so, this should be resolved and marked as addressed in 2.223, otherwise I expect it won't make it into 2.222.1.

          Harry G. added a comment -

          Confirmed in 2.225 by setting up a test job with 10 runs and huuuge html descriptions:

          • load time is fast again
          • descriptions are truncated
          • build parameters are not overlayed

          So this is resolved and can be closed!
          We are eagerly waiting for the LTS that brings it to our productive Jenkins.
          Thanks a lot oleg_nenashev for driving it forward!

          Harry G. added a comment - Confirmed in 2.225 by setting up a test job with 10 runs and huuuge html descriptions: load time is fast again descriptions are truncated build parameters are not overlayed So this is resolved and can be closed! We are eagerly waiting for the LTS that brings it to our productive Jenkins. Thanks a lot oleg_nenashev for driving it forward!

          I can also confirm that the issue is resolved for our use-case in v 2.225.

          Thanks

          Peder Schmedling added a comment - I can also confirm that the issue is resolved for our use-case in v 2.225. Thanks

          Should the new system property "historyWidget.descriptionLimit" also be documented on the page "Features controlled by system properties"?

          Also when setting it through script console using the following, I can not currently disable the limit. Is this expected?

          System.setProperty("historyWidget.descriptionLimit", "-1") // also tried 0
          println SystemProperties.getInteger("historyWidget.descriptionLimit") // value does change to -

           

          Markus Schenkel added a comment - Should the new system property " historyWidget.descriptionLimit " also be documented on the page "Features controlled by system properties" ? Also when setting it through script console using the following, I can not currently disable the limit. Is this expected? System .setProperty( "historyWidget.descriptionLimit" , "-1" ) // also tried 0 println SystemProperties.getInteger( "historyWidget.descriptionLimit" ) // value does change to -  

          Daniel Beck added a comment -

          Should the new system property "historyWidget.descriptionLimit" also be documented on the page "Features controlled by system properties"?

          See the giant banner on the top of the page.

          Daniel Beck added a comment - Should the new system property " historyWidget.descriptionLimit " also be documented on the page "Features controlled by system properties" ? See the giant banner on the top of the page.

          Oleg Nenashev added a comment -

          > Should the new system property "historyWidget.descriptionLimit" also be documented on the page "Features controlled by system properties"?

          Jenkins Wiki is deprecated. I am exploring options to replace the manually generated doc by an automated way to list system properties. See https://jenkins.io/doc/developer/extensions/ for example (autogenerated)

          Oleg Nenashev added a comment - > Should the new system property " historyWidget.descriptionLimit " also be documented on  the page "Features controlled by system properties" ? Jenkins Wiki is deprecated. I am exploring options to replace the manually generated doc by an automated way to list system properties. See  https://jenkins.io/doc/developer/extensions/  for example (autogenerated)

          Markus Schenkel added a comment - - edited

          Sorry, but I did not read "maintenance issues" as "deprecated". also the mobile version does not show the banner at all.

          Any idea why it can not be changed through the script console using

          System.setProperty("historyWidget.descriptionLimit", "-1") // also tried 0
          println SystemProperties.getInteger("historyWidget.descriptionLimit") // value does change to -

          Markus Schenkel added a comment - - edited Sorry, but I did not read "maintenance issues" as "deprecated". also the mobile version does not show the banner at all. Any idea why it can not be changed through the script console using System .setProperty( "historyWidget.descriptionLimit" , "-1" ) // also tried 0 println SystemProperties.getInteger( "historyWidget.descriptionLimit" ) // value does change to -

          Daniel Beck added a comment -

          Startup-only system property.

          Daniel Beck added a comment - Startup-only system property.

          Oleg Nenashev added a comment -

          FTR I created https://github.com/jenkins-infra/jenkins.io/pull/2992 to migrate system properties there. Once approved, I will add the newly introduced property there

          Oleg Nenashev added a comment - FTR I created  https://github.com/jenkins-infra/jenkins.io/pull/2992  to migrate system properties there. Once approved, I will add the newly introduced property there

          Jesse Glick added a comment -

          Rather than messing around with workarounds, you should stop abusing the build description for this purpose. It is designed for a small one-line description, like a short phrase. If you want to display some big blob of text on the build main page, find or write a plugin with a publisher which lets you create an action with a main view.

          Jesse Glick added a comment - Rather than messing around with workarounds, you should stop abusing the build description for this purpose. It is designed for a small one-line description, like a short phrase. If you want to display some big blob of text on the build main page, find or write a plugin with a publisher which lets you create an action with a main view.

          Daniel Beck added a comment - - edited

          jglick

          small one-line description

          It's a 1) multiline text box that takes 2) unlimited length text 3) that has been  truncated for display in the sidepanel forever and 4) supports markup formatting. NONE of that indicates that its use should be as you describe.

          Daniel Beck added a comment - - edited jglick small one-line description It's a 1) multiline text box that takes 2) unlimited length text 3) that has been  truncated for display in the sidepanel forever and 4) supports markup formatting. NONE of that indicates that its use should be as you describe.

          Harry G. added a comment -

          jglick and no matter if it is seen as reasonable use - it's just a pure regression if jobs working ever since suddenly need minutes or hours of loading time and screens are broken...

          Harry G. added a comment - jglick and no matter if it is seen as reasonable use - it's just a pure regression if jobs working ever since suddenly need minutes or hours of loading time and screens are broken...

          Harry G. added a comment -

          oleg_nenashev any plans for getting this into LTS? We are still suffering and it's been a while since 2.223... Thanks a lot!

          Harry G. added a comment - oleg_nenashev any plans for getting this into LTS? We are still suffering and it's been a while since 2.223... Thanks a lot!

          Harry G. added a comment -

          oleg_nenashev, danielbeck I'm clueless: why didn't his serious regression get into LTS since afaik 4 LTS releases?

          Harry G. added a comment - oleg_nenashev , danielbeck I'm clueless: why didn't his serious regression get into LTS since afaik 4 LTS releases?

          Daniel Beck added a comment -

          As I wrote above:

          So is this done for now? If so, this should be resolved and marked as addressed in 2.223, otherwise I expect it won't make it into 2.222.1.

          Good news, the RC for 2.135.1 is out, so now is a great time to test that release and report issues: https://groups.google.com/d/msg/jenkinsci-dev/qxH30i-3-bQ/cq6-9lQOAgAJ

          Daniel Beck added a comment - As I wrote above: So is this done for now? If so, this should be resolved and marked as addressed in 2.223, otherwise I expect it won't make it into 2.222.1. Good news, the RC for 2.135.1 is out, so now is a great time to test that release and report issues: https://groups.google.com/d/msg/jenkinsci-dev/qxH30i-3-bQ/cq6-9lQOAgAJ

          Harry G. added a comment -

          danielbeck Maybe I don't understand you workflow, but according to Changelog, it's also not in 2.235.1 ?!?
          How do such things get into LTS?!?

          You said:
          > As I wrote above:
          >> So is this done for now? If so, this should be resolved and marked as addressed in 2.223, otherwise I expect it won't make it into 2.222.1.

          But on the very same day (2020-03-11), me and peder_dsb immediately tested and confirmed that it is resolved and can be closed! After 222.1, we had additional 4 LTS releases without this fix!
          Additionally also I confirmed this in the PR https://github.com/jenkinsci/jenkins/pull/4529

          What else could we do? Should I as a user close this issue and "mark it as addressed in 2.223" however that is done???

          Harry G. added a comment - danielbeck Maybe I don't understand you workflow, but according to Changelog, it's also not in 2.235.1 ?!? How do such things get into LTS?!? You said: > As I wrote above: >> So is this done for now? If so, this should be resolved and marked as addressed in 2.223, otherwise I expect it won't make it into 2.222.1. But on the very same day (2020-03-11), me and peder_dsb immediately tested and confirmed that it is resolved and can be closed! After 222.1, we had additional 4 LTS releases without this fix! Additionally also I confirmed this in the PR https://github.com/jenkinsci/jenkins/pull/4529 What else could we do? Should I as a user close this issue and "mark it as addressed in 2.223" however that is done???

          Daniel Beck added a comment -

          according to Changelog

          The LTS changelog doesn't list every change between LTS baselines. Nobody would read that. That's why the title is "Notable changes". If it's in 2.223, and hasn't been backed out by 2.235, and isn't listed in the specific backports of 2.235.1 (which is a complete list), it's in.

          Daniel Beck added a comment - according to Changelog The LTS changelog doesn't list every change between LTS baselines. Nobody would read that. That's why the title is "Notable changes". If it's in 2.223, and hasn't been backed out by 2.235, and isn't listed in the specific backports of 2.235.1 (which is a complete list), it's in.

          Harry G. added a comment -

          danielbeck, OK, thanks for the clarification!

          Works fine in 2.235.1
          You can close this one...

          Harry G. added a comment - danielbeck , OK, thanks for the clarification! Works fine in 2.235.1 You can close this one...

          Oleg Nenashev added a comment -

          It was released in Jenkins 2.223 in March.  https://www.jenkins.io/changelog/#v2.223

          Oleg Nenashev added a comment - It was released in Jenkins 2.223 in March.   https://www.jenkins.io/changelog/#v2.223

            oleg_nenashev Oleg Nenashev
            peder_dsb Peder Schmedling
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: