-
Notifications
You must be signed in to change notification settings - Fork 613
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
Can't trigger builds on Accepted, Approved & Closed Merge Requests #734
Comments
the same problem |
same problem. |
I have the same problem |
Same problem. My possibly-completely wrong 2 cents: I believe it's related to the changes brought in on 554bb61 - that seems to change how the logic around Action is handled, but the Action enum is incomplete and is missing (at least) a "merge" option |
If @davidh87 is right (thanks for digging into it!), plugin version 1.5.3 might work. You can download that from the archive at https://updates.jenkins.io/download/plugins/gitlab-plugin/ and install it manually using the Advanced tab of the Jenkins plugin manager. Can some of you test that and see if it fixes the issue? #726 introduced this change, if anyone wants to look at the discussion. @pdudits can you comment on this? |
1.5.3 does work, I confirmed reverting to that works today.
…On Thu, Apr 5, 2018 at 12:17 AM Owen Mehegan ***@***.***> wrote:
If @davidh87 <https://github.com/davidh87> is right (thanks for digging
into it!), plugin version 1.5.3 might work. You can download that from the
archive at https://updates.jenkins.io/download/plugins/gitlab-plugin/ and
install it manually using the Advanced tab of the Jenkins plugin manager.
Can some of you test that and see if it fixes the issue? #726
<#726> introduced this
change, if anyone wants to look at the discussion.
@pdudits <https://github.com/pdudits> can you comment on this?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#734 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACLU5zve0GkjxUVHRQVtnoZ2Nh_r1_QYks5tlZrtgaJpZM4S-9Rt>
.
|
@mtmargala thanks for testing. @pdudits it sounds like your PR may have introduced a bug. Can you investigate? |
I would rather say, that it disclosed different issue -- namely, that there's no reference specification of Webhook payloads :) @davidh87 is completely right about missing Action value. It should be possible to make a test case from the provided hook payloads, and see if adding the new value fixes that. Generally, Gitlab API documentation doesn't enumerate all possible actions, so using the enum is not entirely ok and may bring more surprises in the future. |
1.5.3 worked for me but stopped after a couple of hours. Back to the original problem, none of the 'close' requests trigger the job. The jenkins log shows that gitlab sent the right infos to jenkins. |
@mojocorp would you share the hook payload? Or at least action and State attributes of it? |
While looking more carefully at the log, it always ends with: Last commit in Merge Request has already been built in build #31 So, as soon as the pipeline succeed, it does not trigger the job anymore. |
The check for last commit is done after checking for status and action, so it's not caused by changes in 1.5.4 |
@omehega This would explain why nothing happen on re-'open' state but this feature prevent 'close' to trigger the job since it's already built, and I guess 'merge' too. |
Other than polling are there any workarounds people are using? Also, thanks for taking the time to sort this out. 🥇 |
Same issue as reported in #770 |
I have the same problem,but gitlab plugin 1.5.3 does work, I confirmed reverting to that works today. |
Can confirm that on version 1.5.6 merge request webhooks are not working for me. Reverting back to 1.5.3 seems to do the trick. |
The issue with Accepted merge requests should be fixed by #762 which was just released in version 1.5.7. It's not clear to me if that is also going to fix triggering on Approved and Closed states. @keijohyttinen can you explain about this? |
@omehegan I tested only accepted state but based on root cause it prevented also closed state to be triggered. Actually also took a look into tests and verified also closed state is working fine. |
@keijohyttinen thanks very much for clarifying, and for fixing the unit tests! Unfortunately version 1.5.7 of the plugin is broken for Pipeline jobs, hopefully that will get fixed soon or I will have to revert the PR that broke it and deploy again. |
Disregard, I misunderstood the issue that was being reported. |
If this issue was fixed recently it may be responsible for #796 |
This was released today in 1.5.10. |
Slight thread resurrection here - but there still seems to be the issue that the trigger will not allow the same commit to be built twice by the same job. ie. If the job builds an opened merge request and then the merge request is approved, the job will not trigger again. Similarly, it is not possible to get gitlab to resend a hook to re-trigger a build. There should, at the very least, be an option to disable this behaviour, even if it is enabled by default. |
This parameter allows overriding the check isLastCommitNotYetBuild in MergeRequestHookTriggerHandlerImpl. This commit fixes issue jenkinsci#636 and jenkinsci#734, probably also jenkinsci#958.
Issue
Hi, I am finding it impossible to trigger up jobs upon Accepted, Approved & Closed MRs however the Opened MR triggers work great.
Context
Problem description
So I have 2 hooks configured in GitLab both configured to trigger upon MRs but different jobs:
some-project-BUILD is triggered fine but some-project-TESTS is not, see the log below:
So I did a little experiment and used Postman to trigger the TESTS job with having the OMR json as the model which is actually POSTed via the hook targeting the BUILD job upon an OMR. So if I change the "state" from below from "opened" to "merged" and target the TESTS job it works:
The text was updated successfully, but these errors were encountered: