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

GitLab multibranch pipeline not rendered correctly (regression in 2.341)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • core
    • 2.344

    Description

      The GitLab multibranch pipeline on my Jenkins instance do not render correctly with Jenkins 2.342 (see attachment)

       

      Attachments

        Issue Links

          Activity

            basil Basil Crow added a comment -

            Reverting this hunk of #6395 fixes the problem for me:

            diff --git a/core/src/main/resources/lib/hudson/ballColorTd.jelly b/core/src/main/resources/lib/hudson/ballColorTd.jelly
            index 5c53f790fb..74beb1e506 100644
            --- a/core/src/main/resources/lib/hudson/ballColorTd.jelly
            +++ b/core/src/main/resources/lib/hudson/ballColorTd.jelly
            @@ -58,7 +58,7 @@ THE SOFTWARE.
             
                     <j:choose>
                       <j:when test="${iconClassName != null}">
            -            <l:icon src="${iconClassName}" class="${iconClassName}" alt="${it.description}" tooltip="${it.description}" />
            +            <l:icon class="${iconClassName} icon-lg" alt="${it.description}" tooltip="${it.description}" />
                       </j:when>
                       <j:otherwise>
                         <!-- "it" is not a hudson.model.BallColor.  Let's try figure out the icon from its URL.  -->
            
            basil Basil Crow added a comment - Reverting this hunk of #6395 fixes the problem for me: diff --git a/core/src/main/resources/lib/hudson/ballColorTd.jelly b/core/src/main/resources/lib/hudson/ballColorTd.jelly index 5c53f790fb..74beb1e506 100644 --- a/core/src/main/resources/lib/hudson/ballColorTd.jelly +++ b/core/src/main/resources/lib/hudson/ballColorTd.jelly @@ -58,7 +58,7 @@ THE SOFTWARE. <j:choose> <j:when test="${iconClassName != null}"> - <l:icon src="${iconClassName}" class="${iconClassName}" alt="${it.description}" tooltip="${it.description}" /> + <l:icon class="${iconClassName} icon-lg" alt="${it.description}" tooltip="${it.description}" /> </j:when> <j:otherwise> <!-- "it" is not a hudson.model.BallColor. Let's try figure out the icon from its URL. -->
            basil Basil Crow added a comment -

            I can confirm that the old icon class spec of "gitlab-logo icon-lg" works, while the new icon class spec of "gitlab-logo" (as of the above change) cannot be found in "iconsByCSSSelector".

            basil Basil Crow added a comment - I can confirm that the old icon class spec of "gitlab-logo icon-lg" works, while the new icon class spec of "gitlab-logo" (as of the above change) cannot be found in "iconsByCSSSelector".
            basil Basil Crow added a comment -

            This also "works"

            diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java
            index 5bc8a57f71..e65e7f1a2c 100644
            --- a/core/src/main/java/hudson/Functions.java
            +++ b/core/src/main/java/hudson/Functions.java
            @@ -2293,6 +2293,11 @@ public class Functions {
                     currentRequest.getWebApp().getDispatchValidator().allowDispatch(currentRequest, Stapler.getCurrentResponse());
                     Icon iconMetadata = IconSet.icons.getIconByClassSpec(iconGuess);
             
            +        if (iconMetadata == null) {
            +            // Basil asks: why is this necessary?
            +            iconMetadata = IconSet.icons.getIconByClassSpec(iconGuess + " icon-lg");
            +        }
            +
                     if (iconMetadata == null) {
                         // Icon could be provided as a simple iconFileName e.g. "settings.png"
                         iconMetadata = IconSet.icons.getIconByClassSpec(IconSet.toNormalizedIconNameClass(iconGuess) + " icon-md");
            

            I honestly don't know what I am doing so I am going to stop here. Hopefully janfaracik or notmyfault can understand what is going on here.

            basil Basil Crow added a comment - This also "works" diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java index 5bc8a57f71..e65e7f1a2c 100644 --- a/core/src/main/java/hudson/Functions.java +++ b/core/src/main/java/hudson/Functions.java @@ -2293,6 +2293,11 @@ public class Functions { currentRequest.getWebApp().getDispatchValidator().allowDispatch(currentRequest, Stapler.getCurrentResponse()); Icon iconMetadata = IconSet.icons.getIconByClassSpec(iconGuess); + if (iconMetadata == null ) { + // Basil asks: why is this necessary? + iconMetadata = IconSet.icons.getIconByClassSpec(iconGuess + " icon-lg" ); + } + if (iconMetadata == null ) { // Icon could be provided as a simple iconFileName e.g. "settings.png" iconMetadata = IconSet.icons.getIconByClassSpec(IconSet.toNormalizedIconNameClass(iconGuess) + " icon-md" ); I honestly don't know what I am doing so I am going to stop here. Hopefully janfaracik or notmyfault can understand what is going on here.
            basil Basil Crow added a comment -

            Released in 2.344. han_geerligs Could you please verify that the issue is resolved? Thanks!

            basil Basil Crow added a comment - Released in 2.344. han_geerligs Could you please verify that the issue is resolved? Thanks!
            han_geerligs Han Geerligs added a comment -

            Hello Basil,

             

            I can confirm that the issue is resolved! Thanks for fixing.

            Han

            han_geerligs Han Geerligs added a comment - Hello Basil,   I can confirm that the issue is resolved! Thanks for fixing. Han

            People

              notmyfault Alexander Brandes
              han_geerligs Han Geerligs
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: