Bad news, I'm afraid. As far as I can tell, the update introduced some problematic behaviour. I'll try to explain with a example.
In a project that polls once per minute and a build taking ~2-3 minutes, submits happen with the following timings:
Changelist @1 is submitted, which triggers a build, #1, within a minute. All good.
During building of #1 with changelist @1, changelists @2 and @3 are submitted.
The multibranch polling log has this:
Changes detected: master (1 → 3)
Scheduled build for branch: master
When #1 is done, build #2 starts. Only changelist @2 is included in the build, as it should with incremental builds.
The console output of the actual build job has this:
00:00:00.849 ... p4 change -o 3
+
00:00:00.860 ... p4 describe -s 3
+
00:00:00.872 ... found change: 3
00:00:00.872 ... p4 change -o 2
+
00:00:00.882 ... p4 describe -s 2
+
00:00:00.893 ... found change: 2
However, after automatically triggering #2 with @2, the multibranch polling log has this:
... p4 files -e //redacted/master/Jenkinsfile_Android +
‘Jenkinsfile_Android’ found
... p4 changes -m1 //redacted/master/... +
No changes detected: master (still at 3)
And no further builds are automatically triggered. That's a problem.
If at this point I manually trigger another build, #3, it has @3 only, so the incremental build-functionality "works".
However, we keep lagging behind, with the rate of one submit per submit more than the first 1 during building.
The polling log seems to note the highest number it has seen when polling, not the highest the job has built.
So, in reality, if we have more changelists than we can build over a given time, we're still not getting incremental builds. We're getting incremental builds that as time goes on lags more and more behind, unless somebody manually triggers builds, one for each submit not included in the polling. That's not very useful.
Thoughts? ping p4karl
Code changed in jenkins
User: Paul Allen
Path:
src/main/java/org/jenkinsci/plugins/p4/PerforceScm.java
src/main/java/org/jenkinsci/plugins/p4/tasks/PollTask.java
src/test/java/org/jenkinsci/plugins/p4/DefaultEnvironment.java
src/test/java/org/jenkinsci/plugins/p4/client/GraphTest.java
src/test/java/org/jenkinsci/plugins/p4/client/PollingTest.java
http://jenkins-ci.org/commit/p4-plugin/931f05a111a66c2002deb8dc80f321bcb3abee72
Log:
Poll per change for Pipeline.
JENKINS-47427