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

Blue Ocean pipeline view shows stages and steps from previous build, until given step starts

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • blueocean-plugin
    • Jenkins 2.89.1
      Blue Ocean 1.3.5

      (first observed in:

      Jenkins 2.60.2
      Blue Ocean 1.2.2)

      We are using Jenkinsfile.groovy to generate stages and steps for each build dynamically, based on parameters for given build.

      (Actually, if it matters, in our case, from the UI point of view, stages are the same and the steps differ with names.)

       

      The problem is that then a new build starts Blue Ocean pipeline view shows it with stages and steps from the previous run!

       

      Only after given step start, its names is updated.

       

      I attach a screenshot showing that behaviour.

       

      Please always show the stages and steps from the current build, never use any cached values from the previous run as this is misleading.

          [JENKINS-47897] Blue Ocean pipeline view shows stages and steps from previous build, until given step starts

          Greg Dubicki added a comment -

          I have upgraded Jenkins and Blue Ocean to latest versions (see Environment field) and still observe this issue.

          Greg Dubicki added a comment - I have upgraded Jenkins and Blue Ocean to latest versions (see Environment field) and still observe this issue.

          James Dumay added a comment -

          grzegorz_dubicki yes, what you are seeing is desired behaviour for most users as many have reasonably static Pipeline elements (e.g. stages stay the same name, are not dynamically created). As we used a scripted language, we can't "read ahead" of the Pipeline without first executing the Pipeline, so we make assumptions that the Pipeline hasn't really changed since the previous run. In your case, we can't make that assumption due to the very dynamic nature of your Pipeline.

          Ill be marking this ticket as "wont' do" because I am hesitant of changing this behaviour today as this has an unknown impact on other users. However, I would like to look at this again if we receive a few more reports of this issue. We can reopen this ticket when the time comes.

          Thanks for reporting and sorry I was unable to help this time.

          James Dumay added a comment - grzegorz_dubicki yes, what you are seeing is desired behaviour for most users as many have reasonably static Pipeline elements (e.g. stages stay the same name, are not dynamically created). As we used a scripted language, we can't "read ahead" of the Pipeline without first executing the Pipeline, so we make assumptions that the Pipeline hasn't really changed since the previous run. In your case, we can't make that assumption due to the very dynamic nature of your Pipeline. Ill be marking this ticket as "wont' do" because I am hesitant of changing this behaviour today as this has an unknown impact on other users. However, I would like to look at this again if we receive a few more reports of this issue. We can reopen this ticket when the time comes. Thanks for reporting and sorry I was unable to help this time.

          John Hus added a comment - - edited

          jamesdumay Is there a way to clean the predefined steps? like a parameter / function in the script to clean the view of the previous run?

          John Hus added a comment - - edited jamesdumay Is there a way to clean the predefined steps? like a parameter / function in the script to clean the view of the previous run?

          James Dumay added a comment -

          johnhus theres nothing like that right now. We'd be happy to accept a PR for that if you or someone else had the time.

          James Dumay added a comment - johnhus theres nothing like that right now. We'd be happy to accept a PR for that if you or someone else had the time.

          Bob added a comment -

          We really need this also!

          Bob added a comment - We really need this also!

            Unassigned Unassigned
            grzegorz_dubicki Greg Dubicki
            Votes:
            3 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: