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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Do
    • Component/s: blueocean-plugin
    • Labels:
    • Environment:
      Jenkins 2.89.1
      Blue Ocean 1.3.5

      (first observed in:

      Jenkins 2.60.2
      Blue Ocean 1.2.2)
    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            Hide
            grzegorz_dubicki Greg Dubicki added a comment -

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

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

            Greg 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.

            Show
            jamesdumay James Dumay added a comment - Greg 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.
            Hide
            johnhus John Hus added a comment - - edited

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

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

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

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

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              grzegorz_dubicki Greg Dubicki
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: