Gitlab Hook names changed
Balint134 opened this issue ยท 22 comments
Issue
Previously working Gitlab configuration stopped working at all, hooks are sent by gitlab but they're not triggering the actual job. After investigation I've found out that gitlab changed Hook headers (without documenting it) thus breaking the plugin's ability to trigger jobs using hooks.
Context
- Gitlab plugin version: 1.4.7
- Gitlab version: 9.5.0.RC8
- Jenkins version: 2.60.2
- Job type: Pipeline
"API V3 will be unsupported from GitLab 9.5, to be released on August 22, 2017. It will be removed in GitLab 9.5 or later."
https://docs.gitlab.com/ce/api/v3_to_v4.html
My main problem is that they're not mentioning this header change anywhere - at least I'm not able to find it.
Feel free to discard the issue and PR if it makes no sense.
in gitlab-ce:9.5.1-ce.0
/project/xxx
404
@SwankyPantie Could you please link the changes you found? Would be helpful if some other plugin devs stumble upon this problem.
FYI, according to their press release for the GitLab 9.5, API v3 will deprecate with GitLab 10.0.
The API version is unrelated to the data that webhooks send, as far as I can guess. We only use the GitLab API to send data TO GitLab about build results and so forth. If there has been a breaking change to the hook data that GitLab sends... that's annoying.
@dblessing can you comment on this?
@eljenso I'd be glad to do so, but as I wrote earlier there seems to be no documentations related to these changes. All I can see is that the "Test webhook" fails because of the Header changes.
@SwankyPantie I assume you upgraded GitLab and then this broke. What version did you upgrade from? We can probably find the commit where this was changed, and maybe some more information on it.
The same situation on my side. I've upgdaded from 9.4.5 to 9.5.2. After this I was not able to trigger build on push event. I realized that X-Gitlab-Event header chanded from "Push Hook" to "Push Event".
When you go to web-hook edit on Gitlab, there is a call history with request details.
Same situation here, after the update, not having a single build on push event.
Same problem here.
Jenkins 2.76, Gitlab 9.5.1.
I can test e.g. Push Hook from GitLab (by simple git push && git commit
, and job on jenkins is triggered) but I'm not able to test Push Event directly from GitLab settings page.
Same issue for me too.
When use the "Test->Push Event" button from gitlab on jenkins side I get:
**
com.dabsquared.gitlabjenkins.webhook.ActionResolver onPost
FINE: Unsupported X-Gitlab-Event header: Push Event
**
I'm using "GitLab Community Edition 9.5.2" and gitlab-plugin version 1.4.7
As far as I know, hooks have always used 'Event' in the name - 'Push Event', etc. I've never seen 'Push Hook'. That doesn't explain why the integration broke, though. ๐ค
I found the problem. It only affects testing of web hooks, not actual pushes, etc. See https://gitlab.com/gitlab-org/gitlab-ce/issues/37288
@dblessing thanks so much for figuring this out! I'll have to think whether we should release this fix, or just put a note about the bug and wait for it to be fixed on the GitLab side. I'm leaning towards the latter, since this only impacts the 'Test' functionality, and I would prefer not to have dead code in the plugin just to fix that case in a couple of versions of GitLab.
FYI this will probably be fixed in the next 9.5 release (9.5.5): https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14108
@rymai thanks very much! Once this is released I'll add a note to our documentation about it.
Any updates on this issue. Gitlab 10 is out and I am still having this issue
@RaymondArias That's strange, this has been solved in 9.5.5 and 10.0.0.
@omehegan @SwankyPantie Do you still experience this issue?
I added a note about this to the Known Issues section of the doc.
I am sorry. It is resolved. I did not update my Jenkins Project
This was fixed on the GitLab side, and we have a note in our README about it.