-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins 2.303.2
Branch API 2.7.0
In MultiBranchProject.java there are methods to handle SCM events (e.g. processHeadCreate, processHeadUpdate etc.). The code in these methods is a bit hard to follow, but it seems they loop over all multibranch projects and process the event for each matching one. However, if the processing of the event for any project fails, then processing just stops, i.e. any projects that haven't processed the event yet don't get to see it at all.
In our case we have many multibranch pipelines that use the same repository and therefore react to the same SCM events. One of your projects became corrupted during a plugin update, so that the git credentials were missing. This lead to event processing for this project to fail and like described above other projects didn't process the event. This made analyzing the issue a bit tricky because it was not clear which project was at fault.
Unfortunately I did not capture a stack trace, but I hope that for somebody familiar with the code it is obvious where the issue lies. Personally I would suggest to collect exceptions while processing events for projects and then throwing them as an aggregated exception at the end. That way all projects that can successfully process the event will be fine and only the truly broken ones will be affected.