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

Hard to see if branch was skipped because of discovery strategy

XMLWordPrintable

      I was recently trying to figure out why one of our branches got disabled and no longer built, not even looking at `Jenkinsfile` presence, and I followed a wrong trail for very long (assumed we have a github cache issue again, taking false-negative responses from old GH site bugs cached by our master... as it happened last year...)

      But in the end by chance found that the setup is to not process branches that also have PRs opened from them, and indeed someone made the PR

      So got two questions:

      1) I want a message telling why a branch was skipped! I sort of found where in github-branch-source-plugin code it begins "Checking branch" https://github.com/jenkinsci/github-branch-source-plugin/blob/master/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java#L987
      ... and where it decides it is no good https://github.com/jenkinsci/github-branch-source-plugin/blob/master/src/main/java/org/jenkinsci/plugins/github_branch_source/BranchDiscoveryTrait.java#L230
      ...but a lot of java voodoo happens in-between, so I have no idea where to plug in such logging that it would end up on the branch indexing console

      So if someone knowledgeable could pick it up to do properly, would be nice
      There are only a few hits of "isExcluded" and mostly in events processing (so not sure if it applies to polling/indexing discoveries) but I think they also do not have a "listener" from which I could "getLogger()". Maybe throwing an exception could do it, but would likely disrupt the existing processing loops :\

      2) is there/can someone add some complex filter to always process branches from a certain name pattern (e.g. `release/*`), even if there are PRs from them?

            Unassigned Unassigned
            jimklimov Jim Klimov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: