-
Improvement
-
Resolution: Fixed
-
Minor
-
None
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
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
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?
- is caused by
-
JENKINS-61290 Hard to see if branch was skipped because of discovery strategy
-
- Open
-
- links to
[JENKINS-74784] Hard to see if branch was skipped because of discovery strategy
Assignee | New: Nikolas Falco [ nfalco ] |
Link | New: This issue is caused by JENKINS-61290 [ JENKINS-61290 ] |
Component/s | New: bitbucket-branch-source-plugin [ 21428 ] | |
Component/s | Original: github-branch-source-plugin [ 20858 ] |
Description |
Original:
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? |
New:
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
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 :) 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? |
Remote Link | New: This issue links to "PR (Web Link)" [ 30115 ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Attachment | New: image-2024-10-29-17-59-43-498.png [ 63479 ] |
This clone issue JENKINS-61290 for active github PR #318