[JIRA] (JENKINS-59184) Do not serve project icons directly from gitlab server

13 views
Skip to first unread message

christian.ciach@gmail.com (JIRA)

unread,
Sep 2, 2019, 8:02:03 AM9/2/19
to jenkinsc...@googlegroups.com
Christian Ciach created an issue
 
Jenkins / Task JENKINS-59184
Do not serve project icons directly from gitlab server
Issue Type: Task Task
Assignee: Parichay Barpanda
Components: gitlab-branch-source-plugin
Created: 2019-09-02 12:01
Environment: Plugin version 1.2.0
Priority: Minor Minor
Reporter: Christian Ciach

I think it's great that this plugin uses the same project icons as configured in Gitlab, but I think you shouldn't directly link to the image hosted by Gitlab.

Not every Jenkins user has access to our Gitlab server. And even if they have, they may not be logged in into Gitlab. Because of this, Jenkins just shows a broken image instead the project icon.

If possible, I think these project icons should be copied into Jenkins and be served by Jenkens to the users.

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

parichay.barpanda@gmail.com (JIRA)

unread,
Sep 4, 2019, 1:44:02 AM9/4/19
to jenkinsc...@googlegroups.com
Parichay Barpanda commented on Task JENKINS-59184
 
Re: Do not serve project icons directly from gitlab server

Thanks Christian Ciach for reporting this bug. We have a condition in place which checks if avatar url is blank or not. This means the gitlab api fetches the avatar url but perhaps the url is invalid or inaccessible. So a check to ping the url will work? Otherwise I think we can add it as a trait where you can disable displaying avatar all together. 

parichay.barpanda@gmail.com (JIRA)

unread,
Sep 4, 2019, 3:14:03 PM9/4/19
to jenkinsc...@googlegroups.com

Christian Ciach Kindly tell me how to proceed, we will be making a release this Friday and trying to add this fix to the release.

christian.ciach@gmail.com (JIRA)

unread,
Sep 4, 2019, 3:31:02 PM9/4/19
to jenkinsc...@googlegroups.com

If anyhow possible I think the Avatar should be copied to and served by jenkins. This assumes that you can access the actual image file through the gitlab api to copy the file over.

If this is not possible, then I don't have a strong opinion about how to solve this. I just think jenkins should never ever show a broken image (to be exact, the browser shows no image at all when the user isn't currently logged into gitlab).

Making this configurable as a trait would be just a workaround. I still wish to see the actual avatars of the gitlab projects, but I think there should be a way to archive that even if the user is currently logged out from gitlab.

If course, this is only a minor issue and not a deal breaker at all. You shouldn't make it a priority to fix this for the next release

(I think it is a much bigger deal that all branches and tags are automatically built when first importing a project into jenkins, even when using "skip initial build" of the "Build strategy plugin". I will try to validate this bug tomorrow before issuing a bug report.)

parichay.barpanda@gmail.com (JIRA)

unread,
Sep 4, 2019, 4:03:01 PM9/4/19
to jenkinsc...@googlegroups.com

Thanks Christian Ciach for explaining. I will commit some changes and tag you in the pr for review. Currently I am switching between places so haven't been able to be active the past week and maybe 1 week more. The skip initial build is also an important issue for us. Once I am settled (in a week) will start working on fixing it. Please feel free to report bugs, for us it is always high on priority to fix user reported bugs.

parichay.barpanda@gmail.com (JIRA)

unread,
Sep 5, 2019, 3:03:03 AM9/5/19
to jenkinsc...@googlegroups.com

parichay.barpanda@gmail.com (JIRA)

unread,
Sep 8, 2019, 12:51:03 AM9/8/19
to jenkinsc...@googlegroups.com
Parichay Barpanda resolved as Fixed
 

Released a temporary fix to skip gitlab project avatars altogether https://github.com/jenkinsci/gitlab-branch-source-plugin/pull/48. Next plan is to contribute to GitLab to fix this.

Change By: Parichay Barpanda
Status: Open Resolved
Resolution: Fixed
Reply all
Reply to author
Forward
0 new messages