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

            han_geerligs Han Geerligs created issue -
            han_geerligs Han Geerligs made changes -
            Field Original Value New Value
            Link This issue relates to JENKINS-67877 [ JENKINS-67877 ]
            han_geerligs Han Geerligs made changes -
            Link This issue is duplicated by JENKINS-67869 [ JENKINS-67869 ]
            han_geerligs Han Geerligs made changes -
            Remote Link This issue links to "https://github.com/jenkinsci/jenkins/pull/6286 (Web Link)" [ 27561 ]
            han_geerligs Han Geerligs made changes -
            Summary CLONE - GitHub organization folders not rendered correctly (regression in Jenkins 2.335) GitHub organization folders not rendered correctly (regression in Jenkins 2.342)
            han_geerligs Han Geerligs made changes -
            Summary GitHub organization folders not rendered correctly (regression in Jenkins 2.342) GitLab organization folders not rendered correctly (regression in Jenkins 2.342)
            han_geerligs Han Geerligs made changes -
            Attachment BrokenFoldersGiteaAndGitLab.png [ 57685 ]
            han_geerligs Han Geerligs made changes -
            Attachment image-2022-03-31-08-24-36-959.png [ 57691 ]
            han_geerligs Han Geerligs made changes -
            Attachment Screenshot 2022-02-16 151144.png [ 57686 ]
            han_geerligs Han Geerligs made changes -
            Attachment Screenshot 2022-04-08 at 10.13.12.png [ 57688 ]
            han_geerligs Han Geerligs made changes -
            Attachment SlashRemoved.png [ 57689 ]
            han_geerligs Han Geerligs made changes -
            Attachment Screenshot 2022-02-17 083544.png [ 57687 ]
            han_geerligs Han Geerligs made changes -
            Attachment screencapture-rhel-8-a-markwaite-net-8080-2022-02-16-15_01_42-edit.png [ 57692 ]
            han_geerligs Han Geerligs made changes -
            Description The GitHub organization folders on my Jenkins instance do not render correctly with Jenkins 2.335. I assume an icon is missing somewhere.

            !screencapture-rhel-8-a-markwaite-net-8080-2022-02-16-15_01_42-edit.png|thumbnail!
            h2. Similar issues seen elsewhere on the same instance:

            !Screenshot 2022-02-16 151144.png!
            h2. Similar issue is also visible in GitLab and Gitea organization folders.

            !BrokenFoldersGiteaAndGitLab.png!

            h2. Removing the leading slash fixes it

              !SlashRemoved.png|!

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

             
            han_geerligs Han Geerligs added a comment - - edited

            JENKINS-67823 was the original issue for this problem

            han_geerligs Han Geerligs added a comment - - edited JENKINS-67823 was the original issue for this problem
            han_geerligs Han Geerligs made changes -
            Link This issue is related to JENKINS-67823 [ JENKINS-67823 ]
            han_geerligs Han Geerligs made changes -
            Assignee Alexander Brandes [ JIRAUSER132935 ]
            han_geerligs Han Geerligs added a comment - - edited

            I observe that this issue occurs again for GitLab Branch Source with the latest release (Jenkins 2.342).

            URL for missing icon is http://han_mob:8080/gitlab-logo

            When going to the folder page the GitLab logo is displayed correctly:

            URL for correct folder icon is http://han_mob:8080/static/829452d6/plugin/gitlab-branch-source/images/48x48/gitlab-logo.png 

            Please note I don't use a prefix

            han_geerligs Han Geerligs added a comment - - edited I observe that this issue occurs again for GitLab Branch Source with the latest release ( Jenkins 2.342 ). URL for missing icon is http://han_mob:8080/gitlab-logo When going to the folder page the GitLab logo is displayed correctly: URL for correct folder icon is http://han_mob:8080/static/829452d6/plugin/gitlab-branch-source/images/48x48/gitlab-logo.png   Please note I don't use a prefix
            han_geerligs Han Geerligs made changes -
            Released As 2.336 (Feb 22, 2022)
            han_geerligs Han Geerligs added a comment - - edited

            markewaite, notmyfault: I created this issue as follow-up to JENKINS-67823

            han_geerligs Han Geerligs added a comment - - edited markewaite , notmyfault : I created this issue as follow-up to JENKINS-67823
            han_geerligs Han Geerligs made changes -
            Remote Link This issue links to "https://github.com/jenkinsci/jenkins/pull/6286 (Web Link)" [ 27561 ]
            notmyfault Alexander Brandes made changes -
            Summary GitLab organization folders not rendered correctly (regression in Jenkins 2.342) GitLab multibranch pipeline not rendered correctly (regression in Jenkins 2.342)
            notmyfault Alexander Brandes made changes -
            Description The GitLab organization folders on my Jenkins instance do not render correctly with Jenkins 2.342 (see attachment)

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

             

            I've reworded your issue a bit to differentiate it easier from the other issue. You are using a multibranch pipeline (as indicated by the tooltip on your screenshot) instead of an organization folder. 

            I can replicate that issue, yet it appears that the gitlab branch source plugin references the wrong path of the icon. We had several cases of these kinds of issues as well, e.g. with the bitbucket plugins, which were not a core issue or regression.

             

            notmyfault Alexander Brandes added a comment - I've reworded your issue a bit to differentiate it easier from the other issue. You are using a multibranch pipeline (as indicated by the tooltip on your screenshot) instead of an organization folder.  I can replicate that issue, yet it appears that the gitlab branch source plugin references the wrong path of the icon. We had several cases of these kinds of issues as well, e.g. with the bitbucket plugins, which were not a core issue or regression.  
            han_geerligs Han Geerligs added a comment -

            thanks for the prompt response!

            I checked that Gitlab Branch source plugin has not been updated since 8 months. And this issue occurred after upgrading to 2.342.

            han_geerligs Han Geerligs added a comment - thanks for the prompt response! I checked that Gitlab Branch source plugin has not been updated since 8 months. And this issue occurred after upgrading to 2.342.
            notmyfault Alexander Brandes made changes -
            Summary GitLab multibranch pipeline not rendered correctly (regression in Jenkins 2.342) GitLab multibranch pipeline not rendered correctly (regression in Jenkins 2.340)
            notmyfault Alexander Brandes made changes -
            Summary GitLab multibranch pipeline not rendered correctly (regression in Jenkins 2.340) GitLab multibranch pipeline not rendered correctly (regression since Jenkins 2.340)
            notmyfault Alexander Brandes made changes -
            Summary GitLab multibranch pipeline not rendered correctly (regression since Jenkins 2.340) GitLab multibranch pipeline not rendered correctly (regression since Jenkins 2.341)
            notmyfault Alexander Brandes added a comment - - edited

            Yeah, I can confirm that 2.341 is the last working Jenkins version where the icon was rendered properly.
            Thanks for raising a new issue, because that in fact is a different issue (even if the root cause is similar) that should be tracked separately.

            cc basil janfaracik for reference.

            notmyfault Alexander Brandes added a comment - - edited Yeah, I can confirm that 2.341 is the last working Jenkins version where the icon was rendered properly. Thanks for raising a new issue, because that in fact is a different issue (even if the root cause is similar) that should be tracked separately. cc basil janfaracik for reference.
            notmyfault Alexander Brandes made changes -
            Comment [ cc [~janfaracik] ]
            basil Basil Crow made changes -
            Link This issue is related to JENKINS-67823 [ JENKINS-67823 ]
            basil Basil Crow made changes -
            Link This issue relates to JENKINS-67823 [ JENKINS-67823 ]
            basil Basil Crow made changes -
            Link This issue is duplicated by JENKINS-67869 [ JENKINS-67869 ]
            basil Basil Crow made changes -
            Link This issue relates to JENKINS-67869 [ JENKINS-67869 ]
            basil Basil Crow added a comment -

            Can you please provide steps to reproduce the problem from scratch?

            basil Basil Crow added a comment - Can you please provide steps to reproduce the problem from scratch?
            basil Basil Crow made changes -
            Summary GitLab multibranch pipeline not rendered correctly (regression since Jenkins 2.341) GitLab multibranch pipeline not rendered correctly (regression in 2.341)
            notmyfault Alexander Brandes added a comment - - edited
            1. Create a new multibranch pipeline (workflow-multibranch-plugin)
            2. Branch Sources -> Add Source -> GitLab Project (make sure you have the gitlab branch source plugin installed)
            3.  In the "Owner" field add your GitLab username and the project you want to add in the "Projects" dropdown. Preferably you have a repository with a dummy Jenkinsfile, e.g. https://gitlab.com/NotMyFault/jenkinsfile to utilize the option "Jenkinsfile" on Build Configuration -> Script Path
            4. Save the configuration, wait until the scanning is done and you can see the broken image on the table view.
            notmyfault Alexander Brandes added a comment - - edited Create a new multibranch pipeline (workflow-multibranch-plugin) Branch Sources -> Add Source -> GitLab Project (make sure you have the gitlab branch source plugin installed)  In the "Owner" field add your GitLab username and the project you want to add in the "Projects" dropdown. Preferably you have a repository with a dummy Jenkinsfile, e.g. https://gitlab.com/NotMyFault/jenkinsfile  to utilize the option "Jenkinsfile" on Build Configuration -> Script Path Save the configuration, wait until the scanning is done and you can see the broken image on the table view.
            basil Basil Crow added a comment - Thanks Alex, bisected to https://github.com/jenkinsci/jenkins/pull/6395
            basil Basil Crow made changes -
            Link This issue is caused by JENKINS-68137 [ JENKINS-68137 ]
            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.
            notmyfault Alexander Brandes made changes -
            Remote Link This issue links to "https://github.com/jenkinsci/jenkins/pull/6482 (Web Link)" [ 27566 ]
            basil Basil Crow made changes -
            Assignee Alexander Brandes [ JIRAUSER132935 ]
            basil Basil Crow made changes -
            Remote Link This issue links to "jenkinsci/jenkins#6482 (Web Link)" [ 27569 ]
            basil Basil Crow made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            basil Basil Crow made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            basil Basil Crow made changes -
            Released As 2.344
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Fixed but Unreleased [ 10203 ]
            basil Basil Crow made changes -
            Status Fixed but Unreleased [ 10203 ] Resolved [ 5 ]
            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 made changes -
            Attachment image-2022-04-19-16-24-03-893.png [ 57720 ]
            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
            basil Basil Crow made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

                Created:
                Updated:
                Resolved: