Pipeline projects are sometimes not triggered when using Build after other projects are built -> Projects to watch under a restart.
To re-produce the issue, you need to create three projects:
- test-a: simple freestyle project without anything
- test-b: pipeline-project with Build after other projects are built -> Projects to watch: test-a
- test-c: simple freestyle project with Build after other projects are built -> Projects to watch: test-a
Then, without the build-failure-analyzer plugin installed build several times test-a and you see that test-b and test-c are correctly triggered. Restart the instance several times and re-test - everything works.
Now, install build-failure-analyzer plugin - latest release or previous ones as I can re-produce with several ones - restart the instance and build test-a, now test-b might not be triggered. If it is triggered, restart the instance and build test-a until test-b doesn't get triggered.
I did the effort of change on the code all AbstractBuild per Run and AbstractProject per Job on the buildAnalizer plugin, but the problem is still reproducible.
Do not know yet what the contribution of build-failure-analyzer might be—perhaps merely timing—but a debugger confirms that AbstractFolder.getItem(String), from ReverseBuildTrigger.start, is returning null for a valid item name (the upstream test-a) because at this point during startup, items is still null.
Freestyle projects do not show the bug simply because they are not using upstream2Trigger.