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

Disabling multibranch project does not prevent polling inside of branch projects if defined.

      Reproduction Steps

      1. Create a multibranch pipeline job, add 5-minute SCM polling as trigger to the pipeline configuration. Set source as a dummy SCM repository with multiple branches
      2. Build multi-branch jobs, observe successful polling history and builds
      3. Disable the multibranch job itself in the configuration
      4. Observe polling history for branches continue even after job being disabled
      5. Go into a branch build configuration page and observe that the pollscm option is greyed out cannot be disabled

      Expected behaviour

      The polling should not happen.

          [JENKINS-69284] Disabling multibranch project does not prevent polling inside of branch projects if defined.

          Vincent Latombe added a comment - - edited

          Looking over the existing code

          The existing design around the method isBuildable is inconsistent.
          It is defined in several places:

          There is an existing interface named BuildableItem where this method would fit naturally. If it did, then https://github.com/jenkinsci/workflow-job-plugin/blob/5a4c994312f1ee232c4c1d6349c39afae14bd337/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java#L205-L215 could look up its parent, check if it is a BuildableItem, then call isBuildable if so.

          Vincent Latombe added a comment - - edited Looking over the existing code https://github.com/jenkinsci/jenkins/blob/jenkins-2.361/core/src/main/java/hudson/triggers/Trigger.java#L281-L315 https://github.com/jenkinsci/cloudbees-folder-plugin/blob/6.740.ve4f4ffa_dea_54/src/main/java/com/cloudbees/hudson/plugins/folder/FolderJobQueueDecisionHandler.java https://github.com/jenkinsci/jenkins/blob/237b9ca457c032885ed98e29620f0ed8c0e55ca0/core/src/main/java/hudson/model/AbstractProject.java#L1291-L1294 https://github.com/jenkinsci/workflow-job-plugin/blob/5a4c994312f1ee232c4c1d6349c39afae14bd337/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java#L205-L215 https://github.com/jenkinsci/workflow-multibranch-plugin/blob/49f2746d5ca4681653f4d9a8b1be38c01577a398/src/main/java/org/jenkinsci/plugins/workflow/multibranch/BranchJobProperty.java#L84-L89 The existing design around the method isBuildable is inconsistent. It is defined in several places: https://github.com/jenkinsci/jenkins/blob/a0faeaee3cbcd2709b6ffb4491e31928b1d234d5/core/src/main/java/hudson/model/Job.java#L722-L726 https://github.com/jenkinsci/cloudbees-folder-plugin/blob/828f1877f821f9d0b0f1ac2685046c0ae4678f1f/src/main/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolder.java#L549-L566 There is an existing interface named BuildableItem where this method would fit naturally. If it did, then https://github.com/jenkinsci/workflow-job-plugin/blob/5a4c994312f1ee232c4c1d6349c39afae14bd337/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java#L205-L215 could look up its parent, check if it is a BuildableItem , then call isBuildable if so.

            Unassigned Unassigned
            vlatombe Vincent Latombe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: