jenkinsci / generic-webhook-trigger-plugin

Can receive any HTTP request, extract any values from JSON or XML and trigger a job with those values available as variables. Works with GitHub, GitLab, Bitbucket, Jira and many more.
https://plugins.jenkins.io/generic-webhook-trigger
404 stars 159 forks source link

Problems when jenkins parses trigger (Too FAST!!!!) #171

Closed ofirgut007 closed 3 years ago

ofirgut007 commented 3 years ago

I am using the recent version of the plugin, 1.67, And i am getting a curious error:

I have a jenkins job called "TEST-TRIGGER" and a repository called "TEST-REPOSITORY". "TEST-REPOSITORY" have a webhook configured with token "MY_TOKEN". "TEST-TRIGGER" is a pipeline which uses triggers of "MY_TOKEN".

each time a PR:MERGE event is done in "TEST-REPOSITORY", I am getting the payload in jenkins , and "TEST-TRIGGER" starts to run.

when I have 100 different developers, each working on a specific branch on "TEST-REPOSITORY", It is reasonable that they are making many Pull Requests.

The Problem: When simultaneously "7" PR:MERGE events (for real, in the same time) happen, I expect it to send the payload to jenkins, start the first, and queue the other 6 "TEST-TRIGGER" jobs. But Actually, I get only 1 single "TEST-TRIGGER" job, and the first 7 lines of it are "generic cause". And the job chooses randomaly 1 of the payloads to use as Input-Data.

this is a bug.

Another example: I have a jenkins job called "SONARQUBE_BRANCH" and a repository called "TEST-REPOSITORY". When simultaneously "3" pushes : REPO:REFCHANGES events (for real, in the same time) happen, I expect it to send the payload to jenkins, start the first, and queue the other 2 "SONARQUBE_BRANCH" jobs. But Actually, I get only 1 single "SONARQUBE_BRANCH" job, and the first 3 lines of it are "generic cause". its like, it identifies the 3 events happened and tries to do them in the same build number.

tomasbjerre commented 3 years ago

Probably same as https://github.com/jenkinsci/generic-webhook-trigger-plugin/issues/162 #116 #64 #126 I updated the readme: https://github.com/jenkinsci/generic-webhook-trigger-plugin#trigger-exactly-one-build

radubuciuceanu commented 2 years ago

Probably same as #162 #116 #64 #126 I updated the readme: https://github.com/jenkinsci/generic-webhook-trigger-plugin#trigger-exactly-one-build

Perfectly worked for me. All we have to do is to configure a parameter for our pipeline (with the same name as the one from Post content parameters).

image

image