[JIRA] (JENKINS-44993) Post-Step should have "try-finally" semantics

1 view
Skip to first unread message

andrew.bayer@gmail.com (JIRA)

unread,
Apr 3, 2018, 4:26:02 PM4/3/18
to jenkinsc...@googlegroups.com
Andrew Bayer started work on Improvement JENKINS-44993
 
Change By: Andrew Bayer
Status: Open In Progress
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

andrew.bayer@gmail.com (JIRA)

unread,
Apr 3, 2018, 4:26:02 PM4/3/18
to jenkinsc...@googlegroups.com

andrew.bayer@gmail.com (JIRA)

unread,
Apr 3, 2018, 4:29:04 PM4/3/18
to jenkinsc...@googlegroups.com
Andrew Bayer commented on Improvement JENKINS-44993
 
Re: Post-Step should have "try-finally" semantics

Got it! The problem here is that we only end up throwing one exception per stage - because once we throw an exception, we're out of the stage. So if your stage has already failed before you get to post, any exception thrown by a post block never gets thrown further, because we propagate the initial exception instead. This means that the post block exception never gets logged, etc.

I don't love this fix, but https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/259 - with this, we'll always log when we get an exception from a post block, with full stacktrace. I'm open to changing the exact details of what we log there, but we do still want to make sure that we're throwing the first exception encountered, so that visualization can tell where the build "failed" per se. This can lead to duplicate logging if the first error of the stage is from a post block, though, which I'm not happy about.

andrew.bayer@gmail.com (JIRA)

unread,
Jun 14, 2018, 9:58:02 AM6/14/18
to jenkinsc...@googlegroups.com
 

Merged, releasing in 1.3 today.

Change By: Andrew Bayer
Status: In Review Resolved
Resolution: Fixed

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:24:07 PM10/22/19
to jenkinsc...@googlegroups.com
Liam Newman closed an issue as Fixed
 

Bulk closing resolved issues.

Change By: Liam Newman
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages