Skip to content
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

Merged
merged 18 commits into from
Jan 17, 2018

Conversation

rsandell
Copy link
Member

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

@@ -659,7 +659,7 @@ public void setLastFailedBuildUrl() {

@Override
public String getDisplayName() {
return null;
return "";
Copy link
Member

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.

@ghost
Copy link

ghost commented Jan 17, 2018

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.

Copy link
Member

@oleg-nenashev oleg-nenashev left a 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 "";
Copy link
Member

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?

Copy link
Member Author

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();
Copy link
Member

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

Copy link
Member Author

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) {
Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member

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;
Copy link
Member

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

@rsandell rsandell merged commit 986fd05 into master Jan 17, 2018
@rsandell rsandell deleted the oleg-nenashev-JENKINS-48932/jep-200 branch January 17, 2018 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants