Status: Resolved (View Workflow)
Environment:Jenkins ver. 1.651.1
Pipeline plug-ins: ver. 1.15
Pipeline: SCM Step plug-in: ver. 1.15
SCM API Plugin: ver 1.1
Subversion Plug-in: ver. 2.5.6
Released As:workflow-scm-step 2.8
In out pipeline we at first build multiple upstream Maven projects and then build the main project. Upstream projects are build in parallel:
projects.buildDependency() just checks-out each project from SVN and starts Maven build. The problem is that we often (in about 20% of builds) have errors caused by concurrent / parallel SVN check-outs. Sometimes it is ConcurrentModificationException and sometimes "SAXParseException: changelog11.xml; lineNumber: 1; columnNumber: 1; Premature end of file". See stacktraces below.
As a temporary workaround we added
just before the checkout step to introduce time shifts between check-outs. We used random numbers because we were not sure if some local or env counter variable would be thread-safe in case of parallel steps.
Now error happens only if time difference between check-outs is narrow, e.g. 5 milliseconds if 2 generated random numbers are close.
Would it be possible to make Pipeline plug-in more resilient in case of parallel check-outs?