Status: Resolved (View Workflow)
Jenkins version: 2.249.3
GerritTrigger Plugin version: 2.34.0
We have a large jenkins instance which hosts nearly up to 1000 Pipeline Jobs, and we mainly use gerrit trigger plugin to interact with gerrit server. But somehow we met some unexpected behavior on gerrit-trigger plugin. The one listed below is a critical one that may affect our codebase quality.
Sometimes, part of job can not be triggered by gerrit changes event, we checked the dynamic config url setting and its content, Comparing to the other job, the setting and content is totaly the same. It seems some job just stop working.
Manually re-save the job, "Configure -> "Save", would fix the problem. The "broken" job can finally behavior as normal.
But this problem happens from time to time, so we debugged into it and found some useful logging information for your information, as attached:
1. Timer task which updating the same one dynamic config url file, going bad from some point.
2. In some other case, a exception was thrown saying this is not a SafeTimerTask.
3. Study & Investigate
By looking into source code, we found the timertask use "TimerTask", which generally also bring problem and confusion to other people.
May be we could use SafeTimerTask instead.
Merged PR: https://github.com/jenkinsci/gerrit-trigger-plugin/pull/463