Jenkins version 2.346.1
I’ve been experiencing quite often an issue where Jenkins jobs’ polling behavior doesn’t get updated after configuration changes. That has diverse consequences, as builds getting triggered in loop and some not triggered at all.
Job using ‘Pipeline from SCM’ from a Git repository, Global Shared Library from another Git repository, and project source from IBM RTC.
At first, the Global Shared Lib is configured for a specific tag, and has the option ‘Include @Library changes in job recent changes’ enabled. This option supposedly causes builds to start when Lib changes are detected. But that didn’t happen until earlier, because, I thought, I’ve configured it for a ‘tag’. All good!
One day, out of blue, the job started getting triggered in loop because it says there are changes in the library.
So, I disabled the option ‘Include @Library changes in job recent changes’, expecting that the Job’s polling would no longer look for library changes.
However, it still does… See below:
Started on Aug 5, 2022 12:37:00 PM Using strategy: SpecificRevisionBuildChooser [poll] Last Built Revision: Revision 569f04be88ce924557168c9b3ffb27a596198887 (release) The recommended git tool is: git using credential bitbucket-pat > git --version # timeout=10 > git --version # 'git version 2.30.2' using GIT_ASKPASS to set credentials Personal Access Token for BitBucket (Created on 12.04.22, expires in 180 days) > git ls-remote -h -- https://host/hidden.git # timeout=10 Found 6 remote heads on https://host/hidden.git [poll] Latest remote head revision on refs/heads/feature/Implement-experimental-Actions is: d2e450960605ebedde3092e7fe9b09c2415580d3 RTC : checking for changes... Determining if there are incoming changes using the build toolkit Checking incoming changes for "Job_Dev_SeamlessSDT" Reusing facade for /var/jenkins_home/tools/com.ibm.team.build.internal.hjplugin.RTCBuildToolInstallation/RTC_Build_Toolkit_7.0.2-20220301/RCM-EWM-BuildSystem-Toolkit-Win64-7.0.2-202203010930-FINALGA/buildsystem/buildtoolkit RTC : Changes detected Done. Took 10 sec Changes found
In my experience, I learned that each Job’s polling config takes one extra build to refresh. That means, the next polling will behave as per the old config, and only after the next build happens, it will be updated.
In this case, however, builds are happening over and over again due to lib polling even after I removed the option ‘Include @Library changes in job recent changes’.
I also tried cleaning up the Job’s Workspace in the master node (to remove traces of Library), to no avail.
Last time I had a similar issue, I could only get around it by deleting the job and recreating it. But that’s not sustainable…
Any idea how to fix this?