-
Notifications
You must be signed in to change notification settings - Fork 361
[JENKINS-61290] hard to see why a branch was not inspected - log them #318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
BranchDiscoveryTrait.java : report into scan log if a branch is ignored (because it is or is-not a source of PR, based on user choice of settings) similarly as proposed and refined for github-branch-source-plugin in jenkinsci/github-branch-source-plugin#284
Trying to trigger the rebuild, hoping jenkins-infra is fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Could you rebase this pr? |
request.listener().getLogger().format( | ||
"Ignoring %s because current strategy excludes branches " | ||
+ "that ARE also filed as a pull request%n" | ||
, head.toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you report in #284 the output log seems to be
Checking branch featureimage/new-nut-configurator
Ignoring SCMHead{'featureimage/new-nut-configurator'} because current strategy excludes branches that ARE also filed as a pull request
Instead of head.toString() could you use a method to produce a readable the branch name as in the above log branch featureimage/new-nut-configurator
?
@@ -272,6 +278,10 @@ public boolean isExcluded(@NonNull SCMSourceRequest request, @NonNull SCMHead he | |||
return false; | |||
} | |||
} | |||
request.listener().getLogger().format( | |||
"Ignoring %s because current strategy excludes branches " | |||
+ "that ARE NOT also filed as a pull request%n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please write all words in lower case
// result blocked together with a later indexed branch | ||
request.listener().getLogger().format( | ||
"Ignoring %s because current strategy excludes branches " | ||
+ "that ARE also filed as a pull request%n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please write all words in lower case
The issues JENKINS-61290 is referred to github-source-plugin, we can not handle same issue cross multiple plugin to track the version |
https://issues.jenkins.io/browse/JENKINS-74784 clones original issue |
Manually merged in master with requested changes. |
Your checklist for this pull request
isExcluded()
hits into global jenkins log. Alas, I did not find a way to log it into the indexing run's log itself where it would be more appropriate.Solution:
Currently there is no test-case proposed for this change, as this is a small change for trace-logging and no new/changed feature. (And trying to make a test case in the github version of the plugin stalled the PR so I'm a bit fearful of this)