-
Bug
-
Resolution: Unresolved
-
Minor
-
None
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.
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.