-
Bug
-
Resolution: Fixed
-
Major
AbstractBuildExecution#reportError should work will any kind of Build Step.
Right now, reportError supposes that all the build steps are Publishers, but according with the code it should work with any kind of BuildStep.
private void reportError(BuildStep bs, Throwable e, BuildListener listener, boolean phase) { final String publisher = ((Publisher) bs).getDescriptor().getDisplayName(); if (e instanceof AbortException) { LOGGER.log(Level.FINE, "{0} : {1} failed", new Object[] {AbstractBuild.this, publisher}); listener.error("Publisher '" + publisher + "' failed: "); listener.error(e.getMessage()); } else { String msg = "Publisher '" + publisher + "' aborted due to exception: "; e.printStackTrace(listener.error(msg)); LOGGER.log(WARNING, msg, e); } if (phase) { setResult(Result.FAILURE); } }
- is blocking
-
JENKINS-26964 post-build action statuses handling
-
- Resolved
-
- links to
[JENKINS-30730] AbstractBuildExecution#reportError should work will any kind of Build Step
Description |
Original:
AbstractBuildExecution#reportError should work will any kind of Build Step. Right now, reportError suppose that all the build steps are Publishers, but according with the code it should work with any kind of BuildStep. {code:java} private void reportError(BuildStep bs, Throwable e, BuildListener listener, boolean phase) { final String publisher = ((Publisher) bs).getDescriptor().getDisplayName(); if (e instanceof AbortException) { LOGGER.log(Level.FINE, "{0} : {1} failed", new Object[] {AbstractBuild.this, publisher}); listener.error("Publisher '" + publisher + "' failed: "); listener.error(e.getMessage()); } else { String msg = "Publisher '" + publisher + "' aborted due to exception: "; e.printStackTrace(listener.error(msg)); LOGGER.log(WARNING, msg, e); } if (phase) { setResult(Result.FAILURE); } } {code} |
New:
AbstractBuildExecution#reportError should work will any kind of Build Step. Right now, reportError supposes that all the build steps are Publishers, but according with the code it should work with any kind of BuildStep. {code:java} private void reportError(BuildStep bs, Throwable e, BuildListener listener, boolean phase) { final String publisher = ((Publisher) bs).getDescriptor().getDisplayName(); if (e instanceof AbortException) { LOGGER.log(Level.FINE, "{0} : {1} failed", new Object[] {AbstractBuild.this, publisher}); listener.error("Publisher '" + publisher + "' failed: "); listener.error(e.getMessage()); } else { String msg = "Publisher '" + publisher + "' aborted due to exception: "; e.printStackTrace(listener.error(msg)); LOGGER.log(WARNING, msg, e); } if (phase) { setResult(Result.FAILURE); } } {code} |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
URL | Original: https://github.com/jenkinsci/jenkins/pull/1846 |
Remote Link | New: This issue links to "PR 1851 (Web Link)" [ 13175 ] |
Link |
New:
This issue is blocking |
Labels | New: diagnostics lts-candidate regression | |
Priority | Original: Minor [ 4 ] | New: Major [ 3 ] |
This seems to be a regression in the LTS, preventing proper error diagnosis (even AbortException for user mistakes—not necessarily just plugin bugs), so I am proposing it for backport.