jenkinsci / gitlab-plugin

A Jenkins plugin for interfacing with GitLab
https://plugins.jenkins.io/gitlab-plugin/
GNU General Public License v2.0
1.44k stars 619 forks source link

Incomplete List of Merge Request Labels #737

Open Zava2012 opened 6 years ago

Zava2012 commented 6 years ago

Issue

Context

Problem description

Plugin sees only the first page of labels on GitLab. The second and subsequent pages of labels are not visible to the plugin. But Jenkins starts a build even with a missing label. So, it's only a problem of visibility. And it pleases.

For example: This is the first page of GitLab labels: 2018-04-04 11-28-28 And GitLab Plugin sees this labels: 2018-04-04 11-26-29 But GitLab Plugin can't sees the second and subsequent pages of GitLab lables. This is the second page of GitLab labels: 2018-04-04 11-30-19 And GitLab Plugin can't sees this labels: 2018-04-04 11-28-06

omehegan commented 6 years ago

@Zava2012 thanks for explaining, I understand. I can imagine this might be a problem with our API calls to GitLab. We probably need to check if there is >1 page of labels, and query accordingly to get all of them. @Argelbargel you touched this code last, though I realize you did not author the bulk of it. Is there any chance you could look at this? If my guess about the problem is right, I would hope it's easy enough to fix.

Argelbargel commented 6 years ago

I'll try to look into it. I think you're correct @omehegan, we simply ignore results which are split on multiple pages