-
Type:
Bug
-
Resolution: Duplicate
-
Priority:
Critical
-
Component/s: bitbucket-branch-source-plugin
-
None
-
Environment:Jenkins: 2.568.1
OS: Linux - 6.6.87.2-microsoft-standard-WSL2
Java: 21.0.11 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)
---
Office-365-Connector:5.3.0
active-directory:2.967.vf4e254546a_b_3
antisamy-markup-formatter:173.v680e3a_b_69ff3
apache-httpcomponents-client-4-api:4.5.14-269.vfa_2321039a_83
apache-httpcomponents-client-5-api:5.6.2-199.vc3c04d033fcc
asm-api:9.10.1-216.va_9256d3b_844b_
authentication-tokens:1.144.v5ff4a_5ec5c33
aws-credentials:265.v8422a_f384cd9
aws-java-sdk-ec2:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-minimal:1.12.780-480.v4a_0819121a_9e
aws-java-sdk2-core:2.42.33-70.vd69c0763fa_60
aws-java-sdk2-ec2:2.42.33-70.vd69c0763fa_60
azure-artifact-manager:216.ve6d6d465e371
azure-credentials:426.v5627e6a_4c7a_7
azure-sdk:284.vb_4128d6c7561
azure-vm-agents:1105.vb_8a_2393410b_7
bitbucket-build-status-notifier:1.4.3-SNAPSHOT-TLV
bootstrap5-api:5.3.8-1048.va_c299057e35c
bouncycastle-api:2.30.1.84-291.v9f17b_21896e2
branch-api:2.1280.v0d4e5b_b_460ef
caffeine-api:3.2.4-208.v7e2da_a_7db_82b_
checks-api:415.vf022234a_931d
cloud-stats:423.v63f017a_f582c
cloudbees-bitbucket-branch-source:937.3.6
cloudbees-disk-usage-simple:275.v56e74c9dd0d3
cloudbees-folder:6.1100.ve9eed61d16c4
command-launcher:134.v025a_5fcf9dea_
commons-collections4-api:4.5.0-8.va_d5448ef9011
commons-compress-api:1.28.0-86.v905b_77d84797
commons-lang3-api:3.20.0-109.ve43756e2d2b_4
commons-text-api:1.15.0-218.va_61573470393
config-file-provider:1013.v73c323e52b_1f
configuration-as-code:2108.v02b_430db_0cf5
copyartifact:795.ve8e151429b_27
credentials:1506.v948b_b_b_7dec44
credentials-binding:728.v902a_273b_8947
display-url-api:2.217.va_6b_de84cc74b_
docker-commons:477.v289085a_b_6896
docker-workflow:647.vf474049b_b_303
dtkit-api:3.0.3
durable-task:686.v80ff80875b_82
ec2:2059.v05f9d511d7e5
echarts-api:6.1.0-1306.vcee1648c16a_4
eddsa-api:0.3.0.1-29.v67e9a_1c969b_b_
email-ext:2038.v7b_8817a_499d9
extended-read-permission:68.vd270568a_7520
extra-columns:1.28
font-awesome-api:7.3.1-1013.v0835a_879ec6d
git:5.10.1
git-client:6.6.1
gson-api:2.14.0-201.v8eefe5515533
handy-uri-templates-2-api:2.1.8-38.vcea_5d521d5f3
htmlpublisher:427.1
instance-identity:203.v15e81a_1b_7a_38
ionicons-api:94.vcc3065403257
jackson-annotations2-api:2.22-19.v10a_a_582ea_26e
jackson2-api:2.22.0-439.vb_b_43658d6176
jackson3-api:3.2.1-92.vd25c2e23c180
jakarta-activation-api:2.1.4-1
jakarta-mail-api:2.1.5-1
jakarta-xml-bind-api:4.0.9-19.v2b_a_5b_44d9a_1c
javax-activation-api:1.2.0-8
javax-mail-api:1.6.2-11
jaxb:2.3.9-143.v5979df3304e6
job-dsl:3654.vdf58f53e2d15
joda-time-api:2.14.3-200.v65623733c99f
jquery3-api:3.7.1-687.v68d468e40b_30
jsch:0.2.16-95.v3eecb_55fa_b_78
json-api:20260719-223.va_81f828cdb_58
json-path-api:3.0.0-218.vcd4dd1355de2
jsoup:1.23.1-103.v4fde9422cc6f
junit:1416.vd753e036de5e
kubernetes:4540.v612369217f87
kubernetes-client-api:7.3.1-256.v788a_0b_787114
kubernetes-credentials:207.v492f58828b_ed
mailer:534.v1b_36f5864073
matrix-auth:3.3
matrix-project:870.v9db_fcfc2f45b_
mercurial:1323.ve69d2a_db_8a_b_d
metrics:4.2.37-494.v06f9a_939d33a_
mina-sshd-api-common:2.17.1-187.v0341274c2905
mina-sshd-api-core:2.17.1-187.v0341274c2905
mina-sshd-api-scp:2.17.1-187.v0341274c2905
netty-api:4.2.15.Final-27.va_a_7872799c63
node-iterator-api:72.vc90e81737df1
okhttp-api:5.3.2-200.vedb_720a_cf1f8
parameterized-scheduler:379.v95c73f233a_df
pipeline-build-step:599.v4b_67ea_11b_152
pipeline-graph-analysis:254.v0f63a_a_447dca_
pipeline-graph-view:980.vb_db_0b_e5f683c
pipeline-groovy-lib:798.v5cc688825312
pipeline-input-step:560.v56198a_642157
pipeline-milestone-step:152.v6e22b_8cfc66c
pipeline-model-api:2.2291.v2934911987b_6
pipeline-model-definition:2.2291.v2934911987b_6
pipeline-model-extensions:2.2291.v2934911987b_6
pipeline-multibranch-defaults:2.1
pipeline-rest-api:2.41
pipeline-stage-step:345.va_96187909426
pipeline-stage-tags-metadata:2.2291.v2934911987b_6
pipeline-stage-view:2.41
pipeline-utility-steps:3.810.va_7672d206740
plain-credentials:199.v9f8e1f741799
plugin-util-api:7.1341.v039f146993d9
prism-api:1.30.0-741.v034eb_0b_0a_a_fa_
prometheus:856.vc9e3d6e4b_b_9e
purge-build-queue-plugin:125.v09ee2147746f
saferestart:102.v4dc1b_9636a_ee
scm-api:728.vc30dcf7a_0df5
script-security:1402.1405.vc96e74964250
skip-notifications-trait:625.vb_f5e11e9b_158
snakeyaml-api:2.5-149.v72471e9c6371
snakeyaml-engine-api:3.0.1-5.vd98ea_ff3b_92e
ssh-credentials:372.va_250881b_08cd
ssh-slaves:3.1097.v868116049892
sshd:3.384.vc89b_5e138cf9
structs:362.va_b_695ef4fdf9
timestamper:1.30
token-macro:477.vd4f0dc3cb_cf1
trilead-api:2.284.v1974ea_324382
uno-choice:2.8.9
variant:70.va_d9f17f859e0
view-job-filters:406.va_0ec67147ee2
windows-azure-storage:535.v20d12167fa_70
woodstox-core-api:7.2.1-6.v3718a_a_11f5c4
workflow-aggregator:608.v67378e9d3db_1
workflow-api:1413.v2ff1a_5e720fa_
workflow-basic-steps:1098.v808b_fd7f8cf4
workflow-cps:4360.v2020e8819a_d6
workflow-durable-task-step:1479.v56e587f413a_7
workflow-job:1590.v49101d088542
workflow-multibranch:841.vec5b_9e1806ec
workflow-scm-step:466.va_d69e602552b_
workflow-step-api:724.v538c2362b_dfb_
workflow-support:1015.v785e5a_b_b_8b_22
xunit:3.1.7Jenkins: 2.568.1 OS: Linux - 6.6.87.2-microsoft-standard-WSL2 Java: 21.0.11 - Eclipse Adoptium (OpenJDK 64-Bit Server VM) --- Office-365-Connector:5.3.0 active-directory:2.967.vf4e254546a_b_3 antisamy-markup-formatter:173.v680e3a_b_69ff3 apache-httpcomponents-client-4-api:4.5.14-269.vfa_2321039a_83 apache-httpcomponents-client-5-api:5.6.2-199.vc3c04d033fcc asm-api:9.10.1-216.va_9256d3b_844b_ authentication-tokens:1.144.v5ff4a_5ec5c33 aws-credentials:265.v8422a_f384cd9 aws-java-sdk-ec2:1.12.780-480.v4a_0819121a_9e aws-java-sdk-minimal:1.12.780-480.v4a_0819121a_9e aws-java-sdk2-core:2.42.33-70.vd69c0763fa_60 aws-java-sdk2-ec2:2.42.33-70.vd69c0763fa_60 azure-artifact-manager:216.ve6d6d465e371 azure-credentials:426.v5627e6a_4c7a_7 azure-sdk:284.vb_4128d6c7561 azure-vm-agents:1105.vb_8a_2393410b_7 bitbucket-build-status-notifier:1.4.3-SNAPSHOT-TLV bootstrap5-api:5.3.8-1048.va_c299057e35c bouncycastle-api:2.30.1.84-291.v9f17b_21896e2 branch-api:2.1280.v0d4e5b_b_460ef caffeine-api:3.2.4-208.v7e2da_a_7db_82b_ checks-api:415.vf022234a_931d cloud-stats:423.v63f017a_f582c cloudbees-bitbucket-branch-source:937.3.6 cloudbees-disk-usage-simple:275.v56e74c9dd0d3 cloudbees-folder:6.1100.ve9eed61d16c4 command-launcher:134.v025a_5fcf9dea_ commons-collections4-api:4.5.0-8.va_d5448ef9011 commons-compress-api:1.28.0-86.v905b_77d84797 commons-lang3-api:3.20.0-109.ve43756e2d2b_4 commons-text-api:1.15.0-218.va_61573470393 config-file-provider:1013.v73c323e52b_1f configuration-as-code:2108.v02b_430db_0cf5 copyartifact:795.ve8e151429b_27 credentials:1506.v948b_b_b_7dec44 credentials-binding:728.v902a_273b_8947 display-url-api:2.217.va_6b_de84cc74b_ docker-commons:477.v289085a_b_6896 docker-workflow:647.vf474049b_b_303 dtkit-api:3.0.3 durable-task:686.v80ff80875b_82 ec2:2059.v05f9d511d7e5 echarts-api:6.1.0-1306.vcee1648c16a_4 eddsa-api:0.3.0.1-29.v67e9a_1c969b_b_ email-ext:2038.v7b_8817a_499d9 extended-read-permission:68.vd270568a_7520 extra-columns:1.28 font-awesome-api:7.3.1-1013.v0835a_879ec6d git:5.10.1 git-client:6.6.1 gson-api:2.14.0-201.v8eefe5515533 handy-uri-templates-2-api:2.1.8-38.vcea_5d521d5f3 htmlpublisher:427.1 instance-identity:203.v15e81a_1b_7a_38 ionicons-api:94.vcc3065403257 jackson-annotations2-api:2.22-19.v10a_a_582ea_26e jackson2-api:2.22.0-439.vb_b_43658d6176 jackson3-api:3.2.1-92.vd25c2e23c180 jakarta-activation-api:2.1.4-1 jakarta-mail-api:2.1.5-1 jakarta-xml-bind-api:4.0.9-19.v2b_a_5b_44d9a_1c javax-activation-api:1.2.0-8 javax-mail-api:1.6.2-11 jaxb:2.3.9-143.v5979df3304e6 job-dsl:3654.vdf58f53e2d15 joda-time-api:2.14.3-200.v65623733c99f jquery3-api:3.7.1-687.v68d468e40b_30 jsch:0.2.16-95.v3eecb_55fa_b_78 json-api:20260719-223.va_81f828cdb_58 json-path-api:3.0.0-218.vcd4dd1355de2 jsoup:1.23.1-103.v4fde9422cc6f junit:1416.vd753e036de5e kubernetes:4540.v612369217f87 kubernetes-client-api:7.3.1-256.v788a_0b_787114 kubernetes-credentials:207.v492f58828b_ed mailer:534.v1b_36f5864073 matrix-auth:3.3 matrix-project:870.v9db_fcfc2f45b_ mercurial:1323.ve69d2a_db_8a_b_d metrics:4.2.37-494.v06f9a_939d33a_ mina-sshd-api-common:2.17.1-187.v0341274c2905 mina-sshd-api-core:2.17.1-187.v0341274c2905 mina-sshd-api-scp:2.17.1-187.v0341274c2905 netty-api:4.2.15.Final-27.va_a_7872799c63 node-iterator-api:72.vc90e81737df1 okhttp-api:5.3.2-200.vedb_720a_cf1f8 parameterized-scheduler:379.v95c73f233a_df pipeline-build-step:599.v4b_67ea_11b_152 pipeline-graph-analysis:254.v0f63a_a_447dca_ pipeline-graph-view:980.vb_db_0b_e5f683c pipeline-groovy-lib:798.v5cc688825312 pipeline-input-step:560.v56198a_642157 pipeline-milestone-step:152.v6e22b_8cfc66c pipeline-model-api:2.2291.v2934911987b_6 pipeline-model-definition:2.2291.v2934911987b_6 pipeline-model-extensions:2.2291.v2934911987b_6 pipeline-multibranch-defaults:2.1 pipeline-rest-api:2.41 pipeline-stage-step:345.va_96187909426 pipeline-stage-tags-metadata:2.2291.v2934911987b_6 pipeline-stage-view:2.41 pipeline-utility-steps:3.810.va_7672d206740 plain-credentials:199.v9f8e1f741799 plugin-util-api:7.1341.v039f146993d9 prism-api:1.30.0-741.v034eb_0b_0a_a_fa_ prometheus:856.vc9e3d6e4b_b_9e purge-build-queue-plugin:125.v09ee2147746f saferestart:102.v4dc1b_9636a_ee scm-api:728.vc30dcf7a_0df5 script-security:1402.1405.vc96e74964250 skip-notifications-trait:625.vb_f5e11e9b_158 snakeyaml-api:2.5-149.v72471e9c6371 snakeyaml-engine-api:3.0.1-5.vd98ea_ff3b_92e ssh-credentials:372.va_250881b_08cd ssh-slaves:3.1097.v868116049892 sshd:3.384.vc89b_5e138cf9 structs:362.va_b_695ef4fdf9 timestamper:1.30 token-macro:477.vd4f0dc3cb_cf1 trilead-api:2.284.v1974ea_324382 uno-choice:2.8.9 variant:70.va_d9f17f859e0 view-job-filters:406.va_0ec67147ee2 windows-azure-storage:535.v20d12167fa_70 woodstox-core-api:7.2.1-6.v3718a_a_11f5c4 workflow-aggregator:608.v67378e9d3db_1 workflow-api:1413.v2ff1a_5e720fa_ workflow-basic-steps:1098.v808b_fd7f8cf4 workflow-cps:4360.v2020e8819a_d6 workflow-durable-task-step:1479.v56e587f413a_7 workflow-job:1590.v49101d088542 workflow-multibranch:841.vec5b_9e1806ec workflow-scm-step:466.va_d69e602552b_ workflow-step-api:724.v538c2362b_dfb_ workflow-support:1015.v785e5a_b_b_8b_22 xunit:3.1.7
Short summary
Job DSL seed jobs are triggering continuous, unnecessary rescans of all Bitbucket multibranch jobs even when there are no DSL repository changes. Impact in our setup: seed runtime increases from seconds to 30+ minutes and the scan queue becomes severely congested.
Crucial Context: While initially suspected to be a regression in the cloudbees-bitbucket-branch-source plugin (from 937.3.1 to 937.3.6), testing confirms the symptom is tied to a *Jenkins core version upgrade*.
- *First Known Bad:* Jenkins 2.568.1
- *Last Known Good:* Jenkins 2.555.2-lts-jdk21
When running on Jenkins 2.568.1, the config.xml is rewritten (notably from XML 1.0 to XML 1.1) which seems to cause Job DSL to evaluate existing jobs as "changed" on every single run, triggering the infinite rescan loop.
Environment
- *Jenkins:* 2.568.1 (Failing) vs 2.555.2-lts (Working)
- *Java:* JDK 21 (Docker image: jenkins/jenkins:2.555.2-lts-jdk21)
- *Plugin:* cloudbees-bitbucket-branch-source 937.3.6
Reproduction steps
- Run Jenkins 2.568.1 with cloudbees-bitbucket-branch-source 937.3.6.
- Create Bitbucket multibranch jobs using Job DSL.
- Run the seed job again without any repo or config changes.
- Observed: All multibranch jobs are rescanned on the 2nd run, 3rd run, etc. Every seed run triggers a full rescan => NOK.
(Note: If jobs are created on plugin 937.3.1, everything is OK. Upgrading the plugin to 937.3.6 and running the seed job introduces the symptom. Applying a DSL config change to an existing job also introduces the symptom.)
Expected result
Seed job should report unchanged jobs as identical and should not trigger rescans when there are no relevant DSL changes.
config.xml evolution (The likely culprit)
Monitoring the config.xml reveals a structural rewrite on the newer Jenkins/plugin combo, which likely breaks Job DSL's diffing logic:
Step 1 (created on 937.3.1, OK):
<?xml version="1.0" encoding="UTF-8"?> <org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject> ... <source plugin="cloudbees-bitbucket-branch-source@937.3.1" ...>
Step 2 (after upgrade to 937.3.6 + seed run, NOK):
<?xml version='1.1' encoding='UTF-8'?> <org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject plugin="workflow-multibranch@..."> ... <source ... plugin="cloudbees-bitbucket-branch-source@937.3.6">
Step 3 (manual job delete + job recreate by DSL in 937.3.6, temporarily cured):
<?xml version="1.0" encoding="UTF-8"?> <org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject> ... <source plugin="cloudbees-bitbucket-branch-source@937.3.6" ...>
Step 4 (apply DSL config change on recreated job, e.g., shallowClone(false) -> shallowClone(true), then seed run, NOK again):
<?xml version='1.1' encoding='UTF-8'?> <org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject plugin="workflow-multibranch@..."> ... <source ... plugin="cloudbees-bitbucket-branch-source@937.3.6">
Result: Symptoms reappear and rescans are triggered on every subsequent seed run.
Current Workarounds
- *Preferred:* Roll back Jenkins core image to jenkins/jenkins:2.555.2-lts-jdk21. Symptoms completely disappear.
- *Alternative:* Revert cloudbees-bitbucket-branch-source to 937.3.1, then delete and recreate the affected multibranch jobs via Job DSL.
Request
Please investigate the Job DSL / Bitbucket plugin compatibility with the serialization changes introduced in Jenkins 2.568.1.
- duplicates
-
JENKINS-76505 Repeated multibranch rescans after version 937.3.2
-
- Open
-
- relates to
-
JENKINS-76505 Repeated multibranch rescans after version 937.3.2
-
- Open
-