On several occasions recently, while editing my matrix jobs, I've noticed that Jenkins has lost the SCM configuration for git polling and replaced it with an invalid entry in the job xml:
that causes the job to fail to load when Jenkins is restarted, with:
I haven't yet nailed down a way to reproduce this, but it seems to occur most often around when I've also been having issues with configuration elements throwing exceptions on save.
The job appears to just "vanish" from the job list, as Jenkins doesn't show broken jobs in the UI at all. To find out what happened I had to go digging in the config XML.
I version my configuration XML, so I was able to see the following in the most recent diff for jobs/bdr_linux/config.xml:
To repair the job, I can revert that hunk, or just delete the invalid null element then re-create the trigger in the UI.
So there are a couple of problems here:
- A null element like that is invalid and should never be written out, as it cannot be consumed; and
- the trigger configuration is being lost.