-
Notifications
You must be signed in to change notification settings - Fork 175
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
Fix Null pointer exceptions #161
Conversation
CC: @olamy |
listener.getLogger().println("Skipping " + HyperlinkNote.encodeTo('/'+ p.getUrl(), p.getFullDisplayName()) + | ||
". The project is either disabled," | ||
+ " or the authenticated user " + ModelHyperlinkNote.encodeTo(User.current()) + " has no Item.BUILD permissions," | ||
+ " or the authenticated user " + userName + " has no Item.BUILD permissions," |
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.
"the authenticated user unknown has no ..." is a bit odd, but should be ok
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.
It should be the authenticated user unknown has no Item.BUILD
@@ -151,7 +154,10 @@ public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, | |||
BuildInfoExporterAction.addBuildInfoExporterAction(build, completedRun.getParent().getFullName(), completedRun.getNumber(), completedRun.getResult()); | |||
|
|||
if (buildStepResult && config.getBlock().mapBuildStepResult(completedRun.getResult())) { | |||
build.setResult(config.getBlock().mapBuildResult(completedRun.getResult())); | |||
Result r = config.getBlock().mapBuildResult(completedRun.getResult()); | |||
if (r != null) { |
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.
r == null
when the run is not finished.
Maybe it makes sense to add a system warning for the edge case
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.
Sure I can add it in case there is some underlying issue here
I keep having log messages such as: WARNING: [hudson.plugins.parameterizedtrigger.TriggerBuilder perform] Attempting to use the result of unfinished build <name of job> #1234 The message was introduced in jenkinsci#161 by 06d8f19 but in jenkinsci#148 / 02ee6ea, mapBuildResult() was made to return `null` by default (eg on SUCCESS). The resut is the warning is always triggered when the triggered build succeeds. Fixes https://phabricator.wikimedia.org/T336782
I keep having log messages such as: WARNING: [hudson.plugins.parameterizedtrigger.TriggerBuilder perform] Attempting to use the result of unfinished build <name of job> #1234 The message was introduced in #161 by 06d8f19 but in #148 / 02ee6ea, mapBuildResult() was made to return `null` by default (eg on SUCCESS). The resut is the warning is always triggered when the triggered build succeeds. Fixes https://phabricator.wikimedia.org/T336782 Co-authored-by: Mark Waite <[email protected]> Co-authored-by: Bruno Verachten <[email protected]>
Should also prevent https://issues.jenkins.io/browse/JENKINS-64502?focusedCommentId=402814&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-402814
Drops the number of spotbugs to 4 from 10