-
Notifications
You must be signed in to change notification settings - Fork 148
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
[JENKINS-48932] - Update plugin to make it runable with PCT #83
Conversation
…ent Jenkins core versions
…v/build-failure-analyzer-plugin into oleg-nenashev-JENKINS-48932/jep-200
@@ -659,7 +659,7 @@ public void setLastFailedBuildUrl() { | |||
|
|||
@Override | |||
public String getDisplayName() { | |||
return null; | |||
return ""; |
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.
Just delete this override altogether.
This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation. |
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.
🐝 , just minor comments. I would recommend fixing getResult() sttatus string though
@@ -659,7 +659,7 @@ public void setLastFailedBuildUrl() { | |||
|
|||
@Override | |||
public String getDisplayName() { | |||
return null; | |||
return ""; |
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.
IIRC it can be already removed in this version... or not?
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.
Even on 1.625 it was @Nonnull
@@ -128,12 +129,19 @@ public void run() { | |||
if (build instanceof AbstractBuild) { | |||
AbstractBuild abstractBuild = (AbstractBuild)build; | |||
Node node = abstractBuild.getBuiltOn(); | |||
nodeName = node.getNodeName(); | |||
if (node != null) { | |||
nodeName = node.getNodeName(); |
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.
Probably you just want to fail the run, but 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 is set to unknown above.
|
||
String result = "Unknown"; | ||
final Result buildResult = build.getResult(); | ||
if (buildResult != 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.
Maybe result should be "Running" according to the getResult() docs
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.
This code shouldn't execute until after the run is done (for now) so a null
here would mean unknown and something is wrong, but I don't want to skip logging the statistics just for that.
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.
Any Build Step may actually change this expectation. Better safe than sorry
} | ||
return plugin; |
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.
hmm... FindBugs should be fine with that
Replaces #81 with test, findbugs and checkstyle fixes.
Bumped all the way up to Jenkins Core 2.7 since even that is fairly old by now and has more findbugs annotations to adhere to.
@reviewbybees