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

Pencil icon removed from Blue Ocean top bar

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: blueocean-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.176.1
      Blue Ocean plugins 1.10.2 thru 1.17.0
    • Similar Issues:

      Description

      Blue Ocean plugin versions some time prior to 1.10.2 provided a "pencil" icon in the top bar that allowed the user to invoke the Blue Ocean editor to edit the Pipeline. Instructions to see the Pipeline are included in the "Pipeline Basics" section of the "Jenkins Fundamentals" class and in the "Pipeline Fundamentals" class.

      Note that the hyperlinks in the steps will be broken the next time I clean the storage, since it is intentionally an outdated copy of the instructions (in order to show the bug).

      The steps are:

      1. Click on "Open Blue Ocean" from the left frame of the Jenkins dashboard
      2. Copy the URL of a git repository into the cut buffer
      3. Choose "Git" as the repository to answer "Where do you store your code?"
      4. Paste the URL of a git repository without a Jenkinsfile into the "Repository URL" field
      5. Press the "Create Pipeline" button
      6. Wait for the "Create Pipeline" button to complete, then press the "New Pipeline" button to enter the Pipeline editor
      7. When the Pipeline editor prompts that there are no branches containing a Jenkinsfile, press the "Create Pipeline" button
      8. Add a stage with the Blue Ocean Editor (name it as you wish, the example calls it "Buzz Build")
      9. Add a step to the stage
      10. Save the Pipeline to a new branch (example uses branch 'buzz-trivial')
      11. Confirm the Pipeline runs
      12. View the Pipeline run details by clicking the row that represents that run

      After that series of steps, the screen will include a pencil icon as shown in

      That is a nice result, but that only works with some version of Blue Ocean older than 1.10.2. It does not work with Blue Ocean versions 1.10.2 through 1.17.0.

      Workaround

      The workaround is to use the "Branches" view of the Pipeline and hover over the right end of the row which represents the branch containing the Pipeline to be edited.

      The workaround looks like this:

      • Click the branches link
      • Hover over the right side of the specific branch row
      • Click the pencil icon

        Attachments

          Activity

          Hide
          romenrg Romen Rodriguez-Gil added a comment - - edited

          Yesterday and today I have been running some diagnostics on this and following traces, with the following findings:

          • The pencil in the top navbar is rendered as part of the "RunDetails.jsx" component (in "blueocean-dashboard" plugin)
            • The array "iconsButtons" renders a few components (e.g. Replay Button, RunButton, LoginButton,...)
            • The Pencil button is a special case, rendered as an extension from the "blueocean-pipeline-editor" module ("PipelineEditorLink.jsx" class)
              • However, after assuming that the issue was related to the extenison load, I have come to the conclusion that the extension load is working fine. Not only there have not been changes there, but also I have proved the "PipelineEditorLink" is executed sometimes
          • After running various experiments, both with the training VM and by running blueocean locally through the sources ("mvn -f blueocean/pom.xml hpi:run") it seems sometimes it runs fine:
            • However, there are other times in which the pencil is not displayed
              • In some of those cases in which the pencil is not displayed, I have been able to see that the "render" or "_canSavePipeline" methods in the "PipelineEditorLink" class were not being called
              • In those cases, I am also seeing an error seeming to come from an API call:
                • Maybe that error is causing the execution to interrupt, not loading the buttons

          Will try to see if I can keep tracing the issue to the API, but it seems a bit challenging.

          Show
          romenrg Romen Rodriguez-Gil added a comment - - edited Yesterday and today I have been running some diagnostics on this and following traces, with the following findings: The pencil in the top navbar is rendered as part of the "RunDetails.jsx" component (in "blueocean-dashboard" plugin) The array "iconsButtons" renders a few components (e.g. Replay Button, RunButton, LoginButton,...) The Pencil button is a special case, rendered as an extension from the "blueocean-pipeline-editor" module ("PipelineEditorLink.jsx" class) However, after assuming that the issue was related to the extenison load, I have come to the conclusion that the extension load is working fine. Not only there have not been changes there, but also I have proved the "PipelineEditorLink" is executed sometimes After running various experiments, both with the training VM and by running blueocean locally through the sources ("mvn -f blueocean/pom.xml hpi:run") it seems sometimes it runs fine: However, there are other times in which the pencil is not displayed In some of those cases in which the pencil is not displayed, I have been able to see that the "render" or "_canSavePipeline" methods in the "PipelineEditorLink" class were not being called In those cases, I am also seeing an error seeming to come from an API call: Maybe that error is causing the execution to interrupt, not loading the buttons Will try to see if I can keep tracing the issue to the API, but it seems a bit challenging.
          Hide
          markewaite Mark Waite added a comment -

          Oddly enough, I've recently been using Blue Ocean 1.17.0 and have seen cases where the pencil icon seems to reappear. That seems to support your observation that the display of the pencil icon is inconsistent. Thanks for your ongoing research!

          Show
          markewaite Mark Waite added a comment - Oddly enough, I've recently been using Blue Ocean 1.17.0 and have seen cases where the pencil icon seems to reappear. That seems to support your observation that the display of the pencil icon is inconsistent. Thanks for your ongoing research!

            People

            • Assignee:
              romenrg Romen Rodriguez-Gil
              Reporter:
              markewaite Mark Waite
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: