Gitlab-plugin: Cannot update commit-status of project in subgroup

Created on 18 Apr 2017  路  13Comments  路  Source: jenkinsci/gitlab-plugin

Issue: commit-status update fails if project is located in subgroup

Context

  • Gitlab plugin version: 1.4.5
  • Gitlab version: 9.0.5-ee
  • Jenkins version: 2.7.2
  • Job type: multibranch pipeline

Logs & Traces

Added Jenkins logger for com.dabsquared.gitlabjenkins, level ALL. Replaced host and group names with on.premises, groupname, subgroupname, projectname:

Apr 18, 2017 8:17:02 AM INFO com.dabsquared.gitlabjenkins.util.CommitStatusUpdater retrieveGitlabProjectIds
Retrieving gitlab project ids
Apr 18, 2017 8:17:02 AM INFO com.dabsquared.gitlabjenkins.util.CommitStatusUpdater retrieveGitlabProjectIds
Retrieving the gitlab project id from remote url [email protected]:groupname/subgroupname/projectname.git
Apr 18, 2017 8:17:02 AM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder
Call GitLab:
HTTP method: GET
URL: https://on.premises/api/v3/projects/subgroupname%2Fprojectname/repository/commits/904cdaa399aeae7ef8e96b94e884658d11879962
Request headers: [
Accept = [application/json],
PRIVATE-TOKEN = [****FILTERED****]
]
Apr 18, 2017 8:17:08 AM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder
Got response from GitLab:
URL: https://on.premises/api/v3/projects/subgroupname%2Fprojectname/repository/commits/904cdaa399aeae7ef8e96b94e884658d11879962
Status: 404 Not Found
Response headers: [
Cache-Control = [no-cache],
Connection = [keep-alive],
Content-Length = [35],
Content-Type = [application/json],
Date = [Tue, 18 Apr 2017 06:16:44 GMT],
Server = [nginx],
Vary = [Origin],
X-Request-Id = [fbb2d8c9-1bf4-42cf-a5f6-ca5e70e96256],
X-Runtime = [0.034847]
]
Response body: {
  "message" : "404 Project Not Found"
}
Apr 18, 2017 8:17:08 AM FINE com.dabsquared.gitlabjenkins.util.CommitStatusUpdater
Project (subgroupname/projectname) and commit (904cdaa399aeae7ef8e96b94e884658d11879962) combination not found

Problem description

The plugin does not use the group's name, only the subgroup's name to try and update the commit-status at Gitlab: .../projects/subgroupname%2Fprojectname/repository/...
This should be: .../projects/groupname%2Fsubgroupname%2Fprojectname/repository/...

bug fix-pending

Most helpful comment

I'll look at this soon.

All 13 comments

Likely a plugin bug, subgroups were only introduced in GitLab 9.0, which is recent.

the same issue.

Can the proposed PR be merged? This bug is affecting me too.

I'll look at this soon.

Thanks

Issue still alive and kicking. Any idea when can we expect PR to be merged?
Thanks!

@ospector I will do a release next week which will include this.

Is there an updated ETA on releasing this?

Hello,
I've reviewed https://github.com/jenkinsci/gitlab-plugin/blob/master/CHANGELOG.md and haven't seen this fix released (yet). Pretty please? :-)

My apologies for the delay on releases, life has gotten in the way. I am at Jenkins World this week and will be dedicating some time to merging PRs and getting a release or to done.

This was released today in version 1.4.8 of the plugin.

Thanks for fixing this :)

@omehegan I'm experiencing the same issue, on plugin version 1.5.20. Any idea why?
I tried to move the project to the root group instead of the sub group, and it doesn't work either.
Full plugin log can be found here: https://gist.github.com/hila3000/7b341c4463f363c8a9925e14da2723fa

Was this page helpful?
0 / 5 - 0 ratings