Text of github.com › jenkinsci › scm-api-plugin › issues › 381 as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

[JENKINS-41121] GitHub Branch Source upgrade can cause a lot of rebuilds · Issue #381 · jenkinsci/scm-api-plugin · GitHub

Skip to content You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert [JENKINS-41121] GitHub Branch Source upgrade can cause a lot of rebuilds #381 New issue Copy link New issue Copy link Closed Bug Closed [JENKINS-41121] GitHub Branch Source upgrade can cause a lot of rebuilds #381 Bug Copy link Labels component:scm-api-plugin imported-jira-issue priority:critical resolution:fixed Description jenkins-infra-bot opened on Jan 17, 2017 Issue body actions The gist of this is that due to some encoding change made in the SCM API 2.0 release, conventional URIs This was originally noticed by the Blue Ocean team in this pull request discussing integrating SCM API 2.0 changes.

See also JENKINS-40299 "> JENKINS-40299 . The blog post discusses some of the data migrations which are supposed to take place, however the URI changing issue results in two bad behaviors: * URIs change for Multibranch-based Pipelines which use "special characters" in their names, such as improvement/ JENKINS-41047 "> JENKINS-41047 would previously be located at: https://ci.blueocean.io/job/blueocean/job/improvement%2FJENKINS-41047/ .

After these changes it would be found at JENKINS-41047 .d61e72/" class="external-link" target="_blank" rel="nofollow noopener">https://ci.blueocean.io/job/blueocean/job/improvement- JENKINS-41047 .d61e72/ * Post-upgrade, rebooting the Jenkins installation results in * every * Multibranch Pipeline being retriggered. Such as JENKINS-39625 -part1/" class="external-link" target="_blank" rel="nofollow noopener">this Pipeline despite no new changes being made.

Because the upgrade to SCM API 2.0 is a one-direction-only change, I propose we blacklist the updated versions of the plugins referenced in this post before too many people upgrade a non-reversible upgrade. Incorrect analysis with lots of FUD. The renaming of jobs has nothing to do here. The issue here is that GitHub Branch Source 1.x passes a null id to the constructor of it's SCMSource: https://github.com/jenkinsci/github-branch-source-plugin/blob/1.10-stable/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java#L312 This means that every time you perform a scan of the organization folder, all the SCMSource instances get a new ID.

When the branch changes SCMSource instance (i.e. the ID is different) then the Branch API is supposed to trigger a rebuild (because the branch is from a different source, never mind that it may be the same revision, we have no way of knowing) In 2.x we have a consistent ID: https://github.com/jenkinsci/github-branch-source-plugin/blob/master/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java#L446 The issue here is that GitHub Branch Source did not correctly ensure that the SCMSource from a Organization Folder had a consistent ID.

Thus, every time you do a scan of an organization folder, with the old logic it should have been re-triggering a build... It wasn't because of other bugs... this leads to things like "I cannot re-trigger PRs", etc In fixing the problems in GitHub Branch Source, we get to a point where everything is behaving correctly, but the data for the previous branch origins is not current and thus the PRs have not been built from their current source.

Originally reported by rtyler , imported from: GitHub Branch Source upgrade can cause a lot of rebuilds assignee : stephenconnolly status : Closed priority : Critical component(s) : scm-api-plugin resolution : Fixed resolved : 2017-01-23T21:09:51+00:00 votes : 4 watchers : 31 imported : 20251223-222157 Raw content of original issue The gist of this is that due to some encoding change made in the SCM API 2.0 release, conventional URIs This was originally noticed by the Blue Ocean team in this pull request discussing integrating SCM API 2.0 changes.

See also JENKINS-40299 . The blog post discusses some of the data migrations which are supposed to take place, however the URI changing issue results in two bad behaviors: * URIs change for Multibranch-based Pipelines which use "special characters" in their names, such as improvement/ JENKINS-41047 would previously be located at: https://ci.blueocean.io/job/blueocean/job/improvement%2FJENKINS-41047/ . After these changes it would be found at https://ci.blueocean.io/job/blueocean/job/improvement-JENKINS-41047.d61e72/ * Post-upgrade, rebooting the Jenkins installation results in * every * Multibranch Pipeline being retriggered.

Such as this Pipeline despite no new changes being made. Because the upgrade to SCM API 2.0 is a one-direction-only change, I propose we blacklist the updated versions of the plugins referenced in this post before too many people upgrade a non-reversible upgrade. Incorrect analysis with lots of FUD. The renaming of jobs has nothing to do here. The issue here is that GitHub Branch Source 1.x passes a null id to the constructor of it's SCMSource: https://github.com/jenkinsci/github-branch-source-plugin/blob/1.10-stable/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java#L312 This means that every time you perform a scan of the organization folder, all the SCMSource instances get a new ID.

When the branch changes SCMSource instance (i.e. the ID is different) then the Branch API is supposed to trigger a rebuild (because the branch is from a different source, never mind that it may be the same revision, we have no way of knowing) In 2.x we have a consistent ID: https://github.com/jenkinsci/github-branch-source-plugin/blob/master/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java#L446 The issue here is that GitHub Branch Source did not correctly ensure that the SCMSource from a Organization Folder had a consistent ID.

Thus, every time you do a scan of an organization folder, with the old logic it should have been re-triggering a build... It wasn't because of other bugs... this leads to things like "I cannot re-trigger PRs", etc In fixing the problems in GitHub Branch Source, we get to a point where everything is behaving correctly, but the data for the previous branch origins is not current and thus the PRs have not been built from their current source.

Activity Next jenkins-infra-bot commented on Jan 17, 2017 jenkins-infra-bot on Jan 17, 2017 Author More actions Remote links associated with this issue: scm-api-plugin#​24 branch-api-plugin#​75 github-branch-source-plugin#​107 CloudBees Internal OSS-1877 jenkins-infra-bot commented on Jan 17, 2017 jenkins-infra-bot on Jan 17, 2017 Author More actions scm_issue_link: Original comment link Raw content of original comment: Code changed in jenkins User: R.

Tyler Croy Path: src/main/resources/artifact-ignores.properties http://jenkins-ci.org/commit/backend-update-center2/b52d4f68547e2d09d50cc4127d37a153622b6c85 Log: Ignore SCM API 2.0 related changes until the cause of JENKINS-41121 The basic idea of this is that the upgrades are sufficiently dangerous and *one direction* (i.e. no rollback except for restoring from a pre-upgrade backup of JENKINS_HOME) that it's best for Jenkins users to hide these versions until this is figured out and made more safe.

See https://jenkins.io/blog/2017/01/17/scm-api-2/ for the list of affected plugins. Code changed in jenkins User: R. Tyler Croy Path: src/main/resources/artifact-ignores.properties http://jenkins-ci.org/commit/backend-update-center2/b52d4f68547e2d09d50cc4127d37a153622b6c85 Log: Ignore SCM API 2.0 related changes until the cause of JENKINS-41121 "> JENKINS-41121 The basic idea of this is that the upgrades are sufficiently dangerous and *one direction* (i.e. no rollback except for restoring from a pre-upgrade backup of JENKINS_HOME) that it's best for Jenkins users to hide these versions until this is figured out and made more safe.

See https://jenkins.io/blog/20

The rest of this page is on the live site.