Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-39203

All stages show up as UNSTABLE when only one stage should

    Details

    • Similar Issues:
    • Sprint:
      Blue Ocean 1.2-beta2, Blue Ocean 1.2-beta3, Blue Ocean 1.2-beta4, Blue Ocean 1.2, Blue Ocean 1.3, Blue Ocean 1.4 - beta 1
    • Released As:
      Blue Ocean 1.17.0, Pipeline: API 2.34, Pipeline: Basic Steps 2.18, Pipeline: Graph Analysis 1.10, Pipeline: Groovy 2.70, Pipeline: Declarative 1.3.9, JUnit: 1.28, Warnings Next Generation 5.2.0

      Description

      Problem
      When there is a build which has a stage that marks the build as unstable, all the stages, parallels and steps are marked incorrectly as unstable than just the unstable stage, parallel and step that caused the Pipeline to be unstable.

      To reproduce

      1. Build the multibranch pipeline "kzantow/failure-project" from github
      2. Look at the "michaelneale" branch
      3. Note that all stages are unstable (check the api json, all stages are UNSTABLE but should not be, only the final stage should be).

        Attachments

        1. allYellow.jpg
          107 kB
          boris ivan
        2. example-on-how-to-mark-unstable-stages-as-visually-failed-in-stage-overview.png
          306 kB
          Georg Henzler
        3. image-2019-02-28-17-32-28-257.png
          8 kB
          Alexandr Shchepkin
        4. image-2019-05-17-16-18-02-806.png
          25 kB
          vaishal shah
        5. overall-success-but-some-stages-marked-as-red.png
          74 kB
          Georg Henzler
        6. screenshot-not-showing-unstable-stage.png
          21 kB
          Reinhold Füreder

          Issue Links

            Activity

            Hide
            brianjmurrell Brian J Murrell added a comment -

            Was this more than just a visualisation problem or was this actually making stage B run it's post->unstable steps if stage A was UNSTABLE and set the overall build status to UNSTABLE?  Because that would be very bad/wrong.

            Show
            brianjmurrell Brian J Murrell added a comment - Was this more than just a visualisation problem or was this actually making stage B run it's post -> unstable steps if stage A was UNSTABLE and set the overall build status to UNSTABLE ?  Because that would be very bad/wrong.
            Hide
            peteboyrocket Pete W added a comment -

            Devin's blog post explains this issue and the fix well Brian J Murrell

            The fix doesn't make B Stage run, or not run - it still leaves it down to the implementor to choose if they want B to run or not

            Show
            peteboyrocket Pete W added a comment - Devin's blog post explains this issue and the fix well Brian J Murrell The fix doesn't make B Stage run, or not run - it still leaves it down to the implementor to choose if they want B to run or not
            Hide
            brianjmurrell Brian J Murrell added a comment -

            I have read Devin's blog post.  It does not answer my question AFAIU.  But you might think it could because you misunderstood my question.

            My question was not about whole stages running or not running.  Both stages A and B are running.  B was SUCCESSFUL and A was UNSTABLE.  What I am seeing however is that B's post->unstable is being run even though B was successful.

            I am trying to determine if that mis-behaviour is a component of this bug or if this is something different/new.

            Show
            brianjmurrell Brian J Murrell added a comment - I have read Devin's blog post.  It does not answer my question AFAIU.  But you might think it could because you misunderstood my question. My question was not about whole stages running or not running.  Both stages A  and B  are running.  B  was SUCCESSFUL  and A  was UNSTABLE .  What I am seeing however is that B 's post -> unstable is being run even though B was successful. I am trying to determine if that mis-behaviour is a component of this bug or if this is something different/new.
            Hide
            dnusbaum Devin Nusbaum added a comment -

            Brian J Murrell Declarative post conditions look at the overall build result, so if a step like unstable or junit marks the build as unstable in stage A and the Pipeline continues executing, unstable post conditions in later stages such as B will execute (unless the build result becomes worse than unstable, e.g. failure). As far as I know Declarative has always worked this way. Before the fix for this issue, both stage A and stage B would have been shown as being unstable in Blue Ocean, but after the fix for this issue, only stage A is shown as unstable (the overall build result was shown as unstable both before and after the fix).

            Show
            dnusbaum Devin Nusbaum added a comment - Brian J Murrell Declarative post conditions look at the overall build result, so if a step like unstable or junit marks the build as unstable in stage A and the Pipeline continues executing, unstable post conditions in later stages such as B will execute (unless the build result becomes worse than unstable, e.g. failure). As far as I know Declarative has always worked this way. Before the fix for this issue, both stage A and stage B would have been shown as being unstable in Blue Ocean, but after the fix for this issue, only stage A is shown as unstable (the overall build result was shown as unstable both before and after the fix).
            Hide
            brianjmurrell Brian J Murrell added a comment -

            Devin Nusbaum Whoa!  Are you serious (and sure of what you are saying)?  It seems very un-intuitive, at best, that the status of any individual given stage should be able to alter the status of any other stage.  I would absolutely agree that the outer pipeline {} block's post should be executed per the overall build result, but most certainly not any individual stage.

            I suppose there must be some, can't imagine a use-case where that is useful.  On the contrary, if one has a parallel block of test stages, why would I want the unstable post block of test stage A to run when test stage A passed, but test stage B failed?

            Ultimately, I suppose this should move to a new ticket.  I will open one.  But I probably need to mock up a minimal reproducer before I do.

            Show
            brianjmurrell Brian J Murrell added a comment - Devin Nusbaum Whoa!  Are you serious (and sure of what you are saying)?  It seems very un-intuitive,  at best , that the status of any individual given stage should be able to alter the status of any other stage.  I would absolutely agree that the outer pipeline { } block's post should be executed per the overall build result, but most certainly not any individual stage. I suppose there must be some, can't imagine a use-case where that is useful.  On the contrary, if one has a parallel block of test stages, why would I want the unstable post block of test stage A to run when test stage A passed, but test stage B failed? Ultimately, I suppose this should move to a new ticket.  I will open one.  But I probably need to mock up a minimal reproducer before I do.

              People

              • Assignee:
                dnusbaum Devin Nusbaum
                Reporter:
                michaelneale Michael Neale
              • Votes:
                233 Vote for this issue
                Watchers:
                236 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: