[JIRA] (JENKINS-38097) postBuild and notifications shouldn't be stages

1 view
Skip to first unread message

mneale@cloudbees.com (JIRA)

unread,
Sep 9, 2016, 8:29:02 AM9/9/16
to jenkinsc...@googlegroups.com
Michael Neale created an issue
 
Jenkins / Bug JENKINS-38097
postBuild and notifications shouldn't be stages
Issue Type: Bug Bug
Assignee: Andrew Bayer
Components: pipeline-model-definition-plugin
Created: 2016/Sep/09 12:28 PM
Priority: Critical Critical
Reporter: Michael Neale

with postBuild being a stage, this results in a confusing experience.

User is used to seeing:

A->B->C->postBuild steps

Should things fail on A, they will see:

A->postBuild

This hides the fact there are other stages that would normally be executed.
For stage view, and blue ocean, this can result in a visual report of:

A->postBuild->B (skipped) -> C (skipped)

which is very confusing.

So either postBuild steps should be rolled into the final stage that was executed (acceptable) or else if there is a failure, all subsequent stages have to be reported (but with no steps in them) so that the presentation is consistent (former is easier and clearer).

I believe James Dumay will be able to explain more.

The bottom line is by making postBuild a synthetic stage, the structure of the pipeline radically changes depending on success of failure (vs just being early terminated).

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

andrew.bayer@gmail.com (JIRA)

unread,
Sep 9, 2016, 12:01:02 PM9/9/16
to jenkinsc...@googlegroups.com
Andrew Bayer commented on Bug JENKINS-38097
 
Re: postBuild and notifications shouldn't be stages

Huhhhh. Interesting. I'd actually tend towards the latter (empty stages for stages that should have run but didn't due to the failed build) and preserving postBuild and notifications as synthetic stages. It's easy enough to do. In fact, I'm gonna bang out a PR implementing that now. =)

andrew.bayer@gmail.com (JIRA)

unread,
Sep 9, 2016, 12:01:02 PM9/9/16
to jenkinsc...@googlegroups.com
Andrew Bayer started work on Bug JENKINS-38097
 
Change By: Andrew Bayer
Status: Open In Progress

andrew.bayer@gmail.com (JIRA)

unread,
Sep 9, 2016, 12:18:03 PM9/9/16
to jenkinsc...@googlegroups.com

andrew.bayer@gmail.com (JIRA)

unread,
Sep 9, 2016, 12:19:01 PM9/9/16
to jenkinsc...@googlegroups.com
 
Re: postBuild and notifications shouldn't be stages

PR up https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/11 - changes to execute empty stages for post-failure stages. Thoughts desired. =)

mneale@cloudbees.com (JIRA)

unread,
Sep 12, 2016, 5:53:01 AM9/12/16
to jenkinsc...@googlegroups.com

Andrew Bayer yes returning "empty" stages for things that should have run is preferable. Makes things clearer when looking at a single execution too (ie how much of the pipeline is to go).

andrew.bayer@gmail.com (JIRA)

unread,
Sep 13, 2016, 4:29:04 PM9/13/16
to jenkinsc...@googlegroups.com
 

Merged!

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

scm_issue_link@java.net (JIRA)

unread,
Sep 13, 2016, 4:29:04 PM9/13/16
to jenkinsc...@googlegroups.com
SCM/JIRA link daemon commented on Bug JENKINS-38097
 
Re: postBuild and notifications shouldn't be stages

Code changed in jenkins
User: Andrew Bayer
Path:
src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy
src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java
src/test/resources/allStagesExist.groovy
http://jenkins-ci.org/commit/pipeline-model-definition-plugin/bbd9bc51787f8faa2a2a953627a4d242c9af19d0
Log:
JENKINS-38097 Run empty stages for post-failure stages.

To ensure that we always have the same stage execution order
(including the synthetic postBuild/notification stages), we now switch
to still running stages after a failure, but not running anything in
them. I don't know if there's some way we can set those post-failure
stages as "skipped"?

scm_issue_link@java.net (JIRA)

unread,
Sep 13, 2016, 4:29:04 PM9/13/16
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Andrew Bayer
Path:
src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy
src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java
src/test/resources/allStagesExist.groovy

JENKINS-38097 Run empty stages for post-failure stages.

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:24:52 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