-
Bug
-
Resolution: Fixed
-
Major
perform method that return boolean for publisher is deprecated now and AbortException with reason message is a new style.
In current situation when you have two publishers:
1) If build SUCCESS (build.getResult()) then do action and FAIL the publisher.
2) if build SUCCESS - do action
Because of 1) returned boolean build summary result is set to failed.
So what status will see 2) publisher?
If 1) publisher fail the build with 'return false', then second publisher will still see SUCCESS state and do unexpected action
If 1) throw AbortException, then build result will be set to FAILURE and 2) publisher will see correct fail status.
The error in this place https://github.com/jenkinsci/jenkins/blob/555e2d593fbb419d2fad7e9cfae5911daf3d30e3/core/src/main/java/hudson/model/AbstractBuild.java#L719-L729
if branch sets build Result immediately for throwen error and later for boolean.
Also AbortException shouldn't print stacktraces, issue in ancient code here:
https://github.com/jenkinsci/jenkins/blob/555e2d593fbb419d2fad7e9cfae5911daf3d30e3/core/src/main/java/hudson/model/AbstractBuild.java#L716-L741
- depends on
-
JENKINS-30730 AbstractBuildExecution#reportError should work will any kind of Build Step
-
- Resolved
-
- is related to
-
JENKINS-26936 support thrown from publisher job statuses
-
- Closed
-
-
JENKINS-27066 Matrix project doesn't run all aggregators if one of them throws exception.
-
- Closed
-
- links to
[JENKINS-26964] post-build action statuses handling
Description |
Original:
Nobody will fix it in core, but i will describe a root case. for perform step returning boolean is deprecated now and AbortException with reason message is a new style. In current situation when you have two publishers: 1) If build SUCCESS (build.getResult()) then do action and FAIL the publisher. 2) if build SUCCESS - do action Because of 1) returned boolean build summary result is set to failed. So what status will see 2) publisher? If 1) publisher fail the build with 'return false', then second publisher will still see SUCCESS state and do unexpected action If 1) throw AbortException, then build result will be set to FAILURE and 2) publisher will see correct fail status. The error in this place https://github.com/jenkinsci/jenkins/blob/555e2d593fbb419d2fad7e9cfae5911daf3d30e3/core/src/main/java/hudson/model/AbstractBuild.java#L719-L729 if set build Result immediately for throwen error and later for boolean. |
New:
Nobody will fix it in core, but i will describe a root case. perform method that return boolean for publisher is deprecated now and AbortException with reason message is a new style. In current situation when you have two publishers: 1) If build SUCCESS (build.getResult()) then do action and FAIL the publisher. 2) if build SUCCESS - do action Because of 1) returned boolean build summary result is set to failed. So what status will see 2) publisher? If 1) publisher fail the build with 'return false', then second publisher will still see SUCCESS state and do unexpected action If 1) throw AbortException, then build result will be set to FAILURE and 2) publisher will see correct fail status. The error in this place https://github.com/jenkinsci/jenkins/blob/555e2d593fbb419d2fad7e9cfae5911daf3d30e3/core/src/main/java/hudson/model/AbstractBuild.java#L719-L729 if set build Result immediately for throwen error and later for boolean. |
Link |
New:
This issue is related to |
Description |
Original:
Nobody will fix it in core, but i will describe a root case. perform method that return boolean for publisher is deprecated now and AbortException with reason message is a new style. In current situation when you have two publishers: 1) If build SUCCESS (build.getResult()) then do action and FAIL the publisher. 2) if build SUCCESS - do action Because of 1) returned boolean build summary result is set to failed. So what status will see 2) publisher? If 1) publisher fail the build with 'return false', then second publisher will still see SUCCESS state and do unexpected action If 1) throw AbortException, then build result will be set to FAILURE and 2) publisher will see correct fail status. The error in this place https://github.com/jenkinsci/jenkins/blob/555e2d593fbb419d2fad7e9cfae5911daf3d30e3/core/src/main/java/hudson/model/AbstractBuild.java#L719-L729 if set build Result immediately for throwen error and later for boolean. |
New:
Nobody will fix it in core(?), but i will describe a root case. perform method that return boolean for publisher is deprecated now and AbortException with reason message is a new style. In current situation when you have two publishers: 1) If build SUCCESS (build.getResult()) then do action and FAIL the publisher. 2) if build SUCCESS - do action Because of 1) returned boolean build summary result is set to failed. So what status will see 2) publisher? If 1) publisher fail the build with 'return false', then second publisher will still see SUCCESS state and do unexpected action If 1) throw AbortException, then build result will be set to FAILURE and 2) publisher will see correct fail status. The error in this place https://github.com/jenkinsci/jenkins/blob/555e2d593fbb419d2fad7e9cfae5911daf3d30e3/core/src/main/java/hudson/model/AbstractBuild.java#L719-L729 if set build Result immediately for throwen error and later for boolean. |
Description |
Original:
Nobody will fix it in core(?), but i will describe a root case. perform method that return boolean for publisher is deprecated now and AbortException with reason message is a new style. In current situation when you have two publishers: 1) If build SUCCESS (build.getResult()) then do action and FAIL the publisher. 2) if build SUCCESS - do action Because of 1) returned boolean build summary result is set to failed. So what status will see 2) publisher? If 1) publisher fail the build with 'return false', then second publisher will still see SUCCESS state and do unexpected action If 1) throw AbortException, then build result will be set to FAILURE and 2) publisher will see correct fail status. The error in this place https://github.com/jenkinsci/jenkins/blob/555e2d593fbb419d2fad7e9cfae5911daf3d30e3/core/src/main/java/hudson/model/AbstractBuild.java#L719-L729 if set build Result immediately for throwen error and later for boolean. |
New:
Nobody will fix it in core(?), but i will describe a root case. perform method that return boolean for publisher is deprecated now and AbortException with reason message is a new style. In current situation when you have two publishers: 1) If build SUCCESS (build.getResult()) then do action and FAIL the publisher. 2) if build SUCCESS - do action Because of 1) returned boolean build summary result is set to failed. So what status will see 2) publisher? If 1) publisher fail the build with 'return false', then second publisher will still see SUCCESS state and do unexpected action If 1) throw AbortException, then build result will be set to FAILURE and 2) publisher will see correct fail status. The error in this place https://github.com/jenkinsci/jenkins/blob/555e2d593fbb419d2fad7e9cfae5911daf3d30e3/core/src/main/java/hudson/model/AbstractBuild.java#L719-L729 if branch sets build Result immediately for throwen error and later for boolean. |
Description |
Original:
Nobody will fix it in core(?), but i will describe a root case. perform method that return boolean for publisher is deprecated now and AbortException with reason message is a new style. In current situation when you have two publishers: 1) If build SUCCESS (build.getResult()) then do action and FAIL the publisher. 2) if build SUCCESS - do action Because of 1) returned boolean build summary result is set to failed. So what status will see 2) publisher? If 1) publisher fail the build with 'return false', then second publisher will still see SUCCESS state and do unexpected action If 1) throw AbortException, then build result will be set to FAILURE and 2) publisher will see correct fail status. The error in this place https://github.com/jenkinsci/jenkins/blob/555e2d593fbb419d2fad7e9cfae5911daf3d30e3/core/src/main/java/hudson/model/AbstractBuild.java#L719-L729 if branch sets build Result immediately for throwen error and later for boolean. |
New:
perform method that return boolean for publisher is deprecated now and AbortException with reason message is a new style. In current situation when you have two publishers: 1) If build SUCCESS (build.getResult()) then do action and FAIL the publisher. 2) if build SUCCESS - do action Because of 1) returned boolean build summary result is set to failed. So what status will see 2) publisher? If 1) publisher fail the build with 'return false', then second publisher will still see SUCCESS state and do unexpected action If 1) throw AbortException, then build result will be set to FAILURE and 2) publisher will see correct fail status. The error in this place https://github.com/jenkinsci/jenkins/blob/555e2d593fbb419d2fad7e9cfae5911daf3d30e3/core/src/main/java/hudson/model/AbstractBuild.java#L719-L729 if branch sets build Result immediately for throwen error and later for boolean. Also AbortException shouldn't print stacktraces, issue in ancient code here: https://github.com/jenkinsci/jenkins/blob/555e2d593fbb419d2fad7e9cfae5911daf3d30e3/core/src/main/java/hudson/model/AbstractBuild.java#L716-L741 |
Assignee | New: Kanstantsin Shautsou [ integer ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Remote Link | New: This issue links to "jenkins/pull/1577 (Web Link)" [ 12121 ] |
Link |
New:
This issue is related to |
Resolution | New: Fixed [ 1 ] | |
Status | Original: In Progress [ 3 ] | New: Resolved [ 5 ] |