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

Fix matrix-project hard dependency #558

Merged
merged 5 commits into from
Apr 15, 2019

Conversation

timja
Copy link
Member

@timja timja commented Apr 15, 2019

Missed a call to matrix-project compile time dependency before

Closes #557

Missed a call to matrix-project compile time dependency before
@@ -154,7 +153,7 @@ public void completed(AbstractBuild r) {
}

private boolean skipOnMatrixChildren(AbstractBuild build) {
return build instanceof MatrixRun && !notifier.getMatrixTriggerMode().forChild;
return notifier.isMatrixProject(build) && !notifier.getMatrixTriggerMode().forChild;
Copy link
Member

@jetersen jetersen Apr 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're missing the other problem, getMatrixTriggerMode can return null 😆

private MatrixTriggerMode matrixTriggerMode = MatrixTriggerMode.ONLY_CONFIGURATIONS;
Does nothing when reading from XML.
There is no need for having it set on non-Matrix jobs either.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Give me commit access than I have a fix for that 😅

Copy link
Member Author

@timja timja Apr 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have commit powers

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should do it 😓

Copy link
Member

@jetersen jetersen Apr 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I swear the tests worked before I merged it with yours 🤣

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[2019-04-15T13:22:06.034Z] [ERROR] Possible null pointer dereference in jenkins.plugins.slack.ActiveNotifier.skipOnMatrixChildren(AbstractBuild) due to return value of called method [jenkins.plugins.slack.ActiveNotifier, jenkins.plugins.slack.ActiveNotifier] Dereferenced at ActiveNotifier.java:[line 157]Known null at ActiveNotifier.java:[line 157] NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hate mocking! The isMatrixRun is being mocked out...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SpotBugs on my end does not complain 😕

Copy link
Member Author

@timja timja Apr 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fails for me with

mvn spotbugs:check

@jetersen
Copy link
Member

jetersen commented Apr 15, 2019

@timja GitHub being odd: timja@cdfc98e yet PR is not updated 😭

As soon as I commented! GitHub figured it out 🤔

@jetersen
Copy link
Member

jetersen commented Apr 15, 2019

Jenkins CI being slow 😢
The event might not have gone through as evident by last comment snafu.

@jetersen jetersen closed this Apr 15, 2019
@jetersen jetersen reopened this Apr 15, 2019
Copy link
Member Author

@timja timja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@jetersen jetersen merged commit c54db4d into jenkinsci:master Apr 15, 2019
@timja timja deleted the feature/fix-matrix-project-dep branch April 15, 2019 15:18
@jetersen jetersen added the fix label Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

java.lang.NullPointerException
2 participants