-
Notifications
You must be signed in to change notification settings - Fork 98
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
Handle case where last completed build does not have RebuildAction #158
Conversation
I would not expect this to happen with |
@daniel-beck it's a
|
My guess is you have a plugin installed that provides an implementation of |
@daniel-beck: I don't see much risk for this PR. But before I merge & close, do you see a risk? |
@GLundh Untested but seems fine if it works. Feedback was exclusively about understanding how this situation occurs. |
Confirming I do have another implementation of Thanks for the review! |
FYI, this can also occur with inheritance builds (Project Inheritance Plugin) after recent updates. I manually patched a version of rebuild and this PR fixes it. |
Hello! Any chance to get this PR merged? |
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
@hagzag can we make use of this fix in a released version? We're currently blocked from rolling out the latest update because of this issue. |
This fixes a NPE introduced in #155. We've run into this issue while attempting to view job config history with the latest version, and have pinned to the previous version to avoid it.
Testing done
I attempted to create a tests with mockito that covered the logic of
RebuildLastCompletedBuildAction#getUrlName()
, but ran into issues withJenkins.instance
missing. Since the change here is straightforward, I wasn't sure it warranted creatingJenkinsRule
tests.RebuildLastCompletedBuildActionTest.java
Submitter checklist