-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while serving <jenkins_url>/gitlab-webhook/post/ #407
Comments
Has any progress been made on this? We are seeing this issue as well |
Jenkins: Version 2.426.3, as a Docker container running in Kubernetes. We're seeing the same thing. |
Hi @benoit-rolandeau-act and @mddelfino , Can you enable log of the plugin? Line 42 in c7f1202
And can you give the payload of the MR event from Gitlab? |
If I'm not mistaken this is the expected log: juil. 22, 2024 6:46:43 PM PRÉCIS io.jenkins.plugins.gitlabbranchsource.GitLabWebHookListener
{
"object_kind" : "merge_request",
"user" : {
"avatarUrl" : "http://****:xxxx/uploads/-/system/user/avatar/2/avatar.png",
"createdAt" : null,
"email" : "[REDACTED]",
"id" : 2,
"name" : "xxxx xxxxx",
"state" : null,
"username" : "xxxxxxx",
"webUrl" : null,
"bio" : null,
"bot" : null,
"canCreateGroup" : null,
"canCreateProject" : null,
"colorSchemeId" : null,
"confirmedAt" : null,
"currentSignInAt" : null,
"customAttributes" : null,
"external" : null,
"externUid" : null,
"extraSharedRunnersMinutesLimit" : null,
"identities" : null,
"isAdmin" : null,
"lastActivityOn" : null,
"lastSignInAt" : null,
"linkedin" : null,
"location" : null,
"organization" : null,
"privateProfile" : null,
"projectsLimit" : null,
"provider" : null,
"publicEmail" : null,
"sharedRunnersMinutesLimit" : null,
"skype" : null,
"themeId" : null,
"twitter" : null,
"twoFactorEnabled" : null,
"websiteUrl" : null,
"skipConfirmation" : null
},
"project" : {
"id" : 8,
"name" : "ActQtToolbox",
"description" : "",
"webUrl" : "http://****:xxxx/internal-libraries/software/actqttoolbox",
"avatarUrl" : "http://****:xxxx/uploads/-/system/project/avatar/8/langfr-220px-Qt_logo_2016.svg.png",
"gitSshUrl" : "ssh://git@****:xxxx/internal-libraries/software/actqttoolbox.git",
"gitHttpUrl" : "http://****:xxxx/internal-libraries/software/actqttoolbox.git",
"namespace" : "Software",
"visibilityLevel" : 0,
"pathWithNamespace" : "internal-libraries/software/actqttoolbox",
"defaultBranch" : "master",
"ciConfigPath" : null,
"homepage" : "http://****:xxxx/internal-libraries/software/actqttoolbox",
"url" : "ssh://git@****:xxxx/internal-libraries/software/actqttoolbox.git",
"sshUrl" : "ssh://git@****:xxxx/internal-libraries/software/actqttoolbox.git",
"httpUrl" : "http://****:xxxx/internal-libraries/software/actqttoolbox.git"
},
"repository" : {
"name" : "ActQtToolbox",
"url" : "ssh://git@****:xxxx/internal-libraries/software/actqttoolbox.git",
"description" : "",
"homepage" : "http://****:xxxx/internal-libraries/software/actqttoolbox",
"git_http_url" : null,
"git_ssh_url" : null,
"visibility_level" : null
},
"objectAttributes" : {
"assigneeId" : 4,
"authorId" : 4,
"branchName" : null,
"createdAt" : "2024-04-22T22:07:15.345Z",
"description" : "",
"id" : 3471,
"iid" : 32,
"mergeCommitSha" : "dd939687978193c1b733542c5f0d4c93b940d5fc",
"mergeStatus" : "can_be_merged",
"detailedMergeStatus" : "not_open",
"milestoneId" : null,
"position" : null,
"lockedAt" : null,
"projectId" : null,
"sourceBranch" : "tmp/dssdsdsdsdsd",
"sourceProjectId" : 8,
"stCommits" : null,
"stDiffs" : null,
"state" : "merged",
"stateId" : 3,
"targetBranch" : "master",
"targetProjectId" : 8,
"title" : "master history split - refs #17689",
"updatedAt" : "2024-04-23T07:58:12.547Z",
"source" : {
"id" : 8,
"name" : "ActQtToolbox",
"description" : "",
"webUrl" : "http://****:xxxx/internal-libraries/software/actqttoolbox",
"avatarUrl" : "http://****:xxxx/uploads/-/system/project/avatar/8/langfr-220px-Qt_logo_2016.svg.png",
"gitSshUrl" : "ssh://****:xxxx/internal-libraries/software/actqttoolbox.git",
"gitHttpUrl" : "http://****:xxxx/internal-libraries/software/actqttoolbox.git",
"namespace" : "Software",
"visibilityLevel" : 0,
"pathWithNamespace" : "internal-libraries/software/actqttoolbox",
"defaultBranch" : "master",
"ciConfigPath" : null,
"homepage" : "http://****:xxxx/internal-libraries/software/actqttoolbox",
"url" : "ssh://git@****:xxxx/internal-libraries/software/actqttoolbox.git",
"sshUrl" : "ssh://git@****:xxxx/internal-libraries/software/actqttoolbox.git",
"httpUrl" : "http://****:xxxx/internal-libraries/software/actqttoolbox.git"
},
"target" : {
"id" : 8,
"name" : "ActQtToolbox",
"description" : "",
"webUrl" : "http://****:xxxx/internal-libraries/software/actqttoolbox",
"avatarUrl" : "http://****:xxxx/uploads/-/system/project/avatar/8/langfr-220px-Qt_logo_2016.svg.png",
"gitSshUrl" : "ssh://git@****:xxxx/internal-libraries/software/actqttoolbox.git",
"gitHttpUrl" : "http://****:xxxx/internal-libraries/software/actqttoolbox.git",
"namespace" : "Software",
"visibilityLevel" : 0,
"pathWithNamespace" : "internal-libraries/software/actqttoolbox",
"defaultBranch" : "master",
"ciConfigPath" : null,
"homepage" : "http://****:xxxx/internal-libraries/software/actqttoolbox",
"url" : "ssh://git@****:xxxx/internal-libraries/software/actqttoolbox.git",
"sshUrl" : "ssh://git@****:xxxx/internal-libraries/software/actqttoolbox.git",
"httpUrl" : "http://****:xxxx/internal-libraries/software/actqttoolbox.git"
},
"lastCommit" : {
"id" : "dd939687978193c1b733542c5f0d4c93b940d5fc",
"message" : "xqdf dffdf dfdf ",
"timestamp" : "2024-04-22T21:46:47Z",
"url" : "http://****:xxxx/internal-libraries/software/actqttoolbox/-/commit/dd939687978193c1b733542c5f0d4c93b940d5fc",
"author" : {
"avatarUrl" : null,
"createdAt" : null,
"email" : "[email protected]",
"id" : null,
"name" : "cccc cccc",
"state" : null,
"username" : null,
"webUrl" : null
},
"added" : null,
"modified" : null,
"removed" : null
},
"blockingDiscussionsResolved" : false,
"workInProgress" : false,
"firstContribution" : false,
"url" : "http://****:xxxx/internal-libraries/software/actqttoolbox/-/merge_requests/32",
"labels" : [ ],
"action" : null,
"assignee" : null,
"updatedById" : 2,
"mergeError" : null,
"mergeParams" : { },
"mergeWhenPipelineSucceeds" : false,
"mergeUserId" : null,
"deletedAt" : null,
"inProgressMergeCommitSha" : null,
"lockVersion" : null,
"lastEditedAt" : "2024-04-23T07:37:07.307Z",
"lastEditedById" : 4,
"headPipelineId" : 2003,
"refFetched" : null,
"mergeIid" : null,
"totalTimeSpent" : 0,
"humanTotalTimeSpent" : null,
"timeChange" : 0,
"timeEstimate" : 0,
"humanTimeEstimate" : null,
"humanTimeChange" : null,
"assigneeIds" : [ 4 ],
"reviewerIds" : [ 2 ],
"oldrev" : null
},
"labels" : [ ],
"changes" : {
"authorId" : null,
"createdAt" : null,
"updatedAt" : null,
"updatedById" : null,
"title" : null,
"description" : null,
"state" : null,
"milestoneId" : null,
"labels" : null,
"assignees" : null,
"totalTimeSpent" : null,
"mergeStatus" : null,
"reviewers" : null
},
"assignees" : [ {
"avatarUrl" : "http://****:xxxx/uploads/-/system/user/avatar/4/avatar.png",
"createdAt" : null,
"email" : "[REDACTED]",
"id" : 4,
"name" : "cccc ccccc",
"state" : null,
"username" : "ccccc",
"webUrl" : null
} ],
"reviewers" : [ {
"avatarUrl" : "http://****:xxxx/uploads/-/system/user/avatar/2/avatar.png",
"createdAt" : null,
"email" : "[REDACTED]",
"id" : 2,
"name" : "xxx xxxxx",
"state" : null,
"username" : "xxxxx",
"webUrl" : null
} ],
"objectKind" : "merge_request"
} |
Sorry for the delay. The error is here : Line 31 in 6f19df3
You make a "merge request event" but on "merged" state depending on your payload. @jetersen I would like your opinion on this? Depending the correct behavior. Is a "merged" MR should be triggered? Yes, I propose this code :
No, I propose this code :
Be careful, I didn't test this code |
Is this resolved? We are seeing the same error today. All the GitLab merge request hooks are broken on jenkins. |
Can this be solved with an option in the source configuration in the job settings? |
I fixed this for me for the time being by implementing the proposed changes by @Turiok like this:
I have no idea if these changes are okay or if there is something logically wrong with doing this, as I don't have experience coding here and only use the plugin.
It's working for now for me and MR webhooks don't throw an error anymore. |
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
GitLab deployed with Docker
Jenkins in a Debian VM
Reproduction steps
I configured my Jenkins like this:
In the Pipeline Multibranches config:
And in the GitLab project:
I click on the GitLab test button:
Expected Results
I expect the test to work
Actual Results
In GitLab, I receive a 500 error.
And in Jenkins, I see the following logs:
Anything else?
I don't know what cause the problem if it's caused by my config or a bug in the plugin itself.
Are you interested in contributing a fix?
No response
The text was updated successfully, but these errors were encountered: