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

editor failing on round trip with script block sometimes: hangs when saving due to quoted groovy script

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • Blue Ocean 1.1-beta4, Blue Ocean 1.1, Blue Ocean 1.1, Blue Ocean 1.2-beta1, Blue Ocean 1.2-beta2, Blue Ocean 1.2-beta3, Blue Ocean 1.2-beta4, Blue Ocean 1.2, Blue Ocean 1.3

      When saving a script block with certain content (below) it will fail to save and "hang". There is actually an error response which is being not handled correctly. Furthermore, it should save in this case as it is a valid block of script (there is a problem it seems with single quoted strings, perhaps). 

       

      To reproduce: 

      • Open a pipeline in the editor
      • Add the a script block below
      • Save it to a branch
      • Note that it never appears to save, check the log in the browser for errors

      What should happen: 

       

      User should be given error feedback that there is a problem (IF it is invalid groovy), or it should cope with correct groovy script. 

       

      The script block which is valid groovy to try: 

      def initialize = load('jenkins/pipeline/initialize.groovy')
      initialize()
      
      echo 'done initializing'

       

       

      — original ticket —

      The behavior is: I open the editor and then either make a change or don't, and then go to Save, enter a description and click Save & Run.  the dialog greys out but no saving happens.  when the background of the browser window is clicked, the dialog disappears and I am back where I started.

      There is another pipeline that saves correctly.

      I've been editing the Jenkinsfile with the blueocean editor and also with IDEA. I've seen the editor refuse to load stuff I've created with the IDEA ide, which I then correct back in IDEA and then load into the BO editor. So since the Jenkinsfile loaded I'm assuming it was OK.

            abayer Andrew Bayer
            cantorman Dave Hildebrandt
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: