PR https://github.com/jenkinsci/branch-api-plugin/pull/158 was merged to fix this issue but has caused a worse issue in my opinion. My seed job runs every 4 hours, it scans repositories in Bitbucket and create and/or update hundreds of jobs as a result. After updating the Branch API plugin to 2.5.5 with this PR included, now every 4 hours, ALL my ~ 250 jobs are triggering a branch scanning at the same time after seed job completes. This causes several API calls to Bitbucket all at the same time and then they hang, as Bitbucket has a limit on number of API calls. That means I have to revert the plugin to 2.5.4 as its impossible to continue with this behaviour. I understand what you are trying to fix here - to run it initially when the job gets created for the first time. But it should not happen when the job gets updated. Also, using a scan trigger fixes your problem and it is recommend to use one anyway (as sometimes Webhooks will be missed). It has never being a problem for us. Anyway, I think this has made things worse at the point of being a blocker. Thanks. |