After upgrading from Bitbucket Server Integration Plugin: 3.5.0 to 4.0.0. What we see is this error randomly occurring for multi-branch pipeline job scans and the looking in the "Scan Multibranch Pipeline Log" it says this :
"ERROR: The BitbucketSCMSource has been incorrectly configured, and cannot perform a retrieve. Check the configuration before running this job again."
After researching the Jenkins Controller Server such jobs's "config.xml" and "state.xml" files shows this : plugin="atlassian-bitbucket-server-integration@3.5.0"
Instead of this : plugin="atlassian-bitbucket-server-integration@4.0.0"
So why does this occur to some jobs only and why does the jobs's config not get updated automatically with the 4.0.0 plugin configurations ?.
When this occurs all the job's history is lost as well , since it thinks its connecting for the first time to the BB SCM the build numbers also starts from 1 for all branches under that job !. This really affects our process drastically.
When we rollback to the Bitbucket Server Integration Plugin: 3.5.0 this random issue does not occur and they work as expected.
This issue appears similar to the issue reported here
Bitbucket-questions/Jenkins-SCM-Configuration-Multi-SCM-Issue/qaq-p/2576511
Bitbucket Version: 7.21.21
Jenkins Version: 2.452.2