Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-54518

Multibranch pipeline: Incorrect branch sort order for plain Git sources

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • blueocean-plugin
    • None
    • 1.11.0

      The sort order of branches in the "Branches" view depends on the SCM source that is configured for a project.  "git-source.png" and "github-source.png" (see attached screenshots) show the same multibranch project. The only difference is the branch source, which is configured as a Git source and GitHub source respectively.

      This is likely due to the fact that in case of a Git source, the branch comparator in BranchContainerImpl breaks, because pipeline.getBranch() always returns null, due to the fact that a Git scm source usually doesn't have an associated ObjectMetadataAction (and no PrimaryInstanceMetadataAction for most branches) while a GitHub source does (see BranchImpl.Branch.getBranch() and Caches.BranchCacheLoader.load(String))

            halkeye Gavin Mogan
            afrischke Andreas Frischknecht
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: