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

Incorrect wording in help text for Orphaned Item Strategy

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: branch-api-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.263.4
      branch-api-plugin 2.6.2
    • Similar Issues:

      Description

      The help text for Orphaned Item Strategy states:

      Jobs for removed SCM heads (i.e. deleted branches) can be removed immediately or kept based on a desired retention strategy. By default, jobs will be removed as soon as Jenkins determines their associated SCM head no longer exists.

      I've tested with bitbucket-branch-source-plugin and github-branch-source-plugin and this is not true. The strategy doesn't check if the SCM head exists or not, but removes any branch marked as orphaned regardless of if the associated SCM head exists or not.
      Preferably, it should keep the job for any branch that still exists. The current behavior cause behavior described in JENKINS-52406.
      If this is not possible, the text should be changed to reflect the actual behavior. Not sure what that text would be though as the current behavior is not obvious.

        Attachments

          Issue Links

            Activity

            Hide
            ahammar Anders Hammar added a comment -

            I wonder if the problem isn't that MultiBranchProject.orphanedItems() doesn't check if the SCM head of the branch still exists or not? As it is now it just marks all orphaned projects' Branch as Dead and lets the strategy remove it.
            https://github.com/jenkinsci/branch-api-plugin/blob/branch-api-2.6.3/src/main/java/jenkins/branch/MultiBranchProject.java#L707

            Show
            ahammar Anders Hammar added a comment - I wonder if the problem isn't that MultiBranchProject.orphanedItems() doesn't check if the SCM head of the branch still exists or not? As it is now it just marks all orphaned projects' Branch as Dead and lets the strategy remove it. https://github.com/jenkinsci/branch-api-plugin/blob/branch-api-2.6.3/src/main/java/jenkins/branch/MultiBranchProject.java#L707

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              ahammar Anders Hammar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: