-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Allow plugins to override boot failure view #8442
Allow plugins to override boot failure view #8442
Conversation
@jenkinsci/core anyone mind taking a look please? |
Might be a good addition to |
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.
Logic could probably be simplified, but looks OK as it is.
} finally { | ||
Jenkins instance = Jenkins.getInstanceOrNull(); | ||
if (!success && instance != null) | ||
instance.cleanUp(); | ||
} | ||
} | ||
|
||
private Throwable unwrapException(Exception e) { |
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.
Could be simplified to return @CheckForNull BootFailure
.
maybe but the use-case seems very limited. /label ready-for-merge This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback. Thanks! |
See JENKINS-XXXXX.
Currently it does not seem possible to provide your own
BootFailure
subclass for a startup error, Jenkins just displays a huge stacktrace with an error and you can't provide a nice error.Before
After
Testing done
Manually with jenkinsci/configuration-as-code-plugin#2352
Created a file called
jenkins.yaml
in thework
directory with these contents:I have not been able to figure out how to write a unit test for this, at least with JTH the process is destroyed forcefully if Jenkins does not start and there's no way to get the information.
Proposed changelog entries
BootFailure
subclasses can now override the Jenkins failed to startup pageProposed upgrade guidelines
N/A
Submitter checklist
Desired reviewers
@mention
Before the changes are marked as
ready-for-merge
:Maintainer checklist