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

Regression: Job DSL `folder('existing-folder')` creation destroys any views in that folder

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • job-dsl-plugin
    • None

      This is a regression observed between Jenkins LTS 2.89.4 and LTS 2.107.2.

      The version of the Job DSL plugin (1.69) is unchanged.

      To reproduce:

      1. Run the following Job DSL to create a folder and some sample views within that folder.

      folder('/dir') {
        displayName('dir')
      }
      buildMonitorView('/dir/Test BMV') {
        jobs { regex('.*') }
      }
      listView('/dir/Test LV') {
        jobs { regex(".*") }
      }

      2. Run the following Job DSL script on its own.

      folder('/dir') {
        displayName('dir')
      }

       

      Before the upgrade to Jenkins 2.107.2, this worked fine.  Following the upgrade, step 2 destroys the views that were created in step 1.

          [JENKINS-51035] Regression: Job DSL `folder('existing-folder')` creation destroys any views in that folder

          Oliver Lockwood created issue -
          Oliver Lockwood made changes -
          Issue Type Original: Improvement [ 4 ] New: Bug [ 1 ]
          Oliver Lockwood made changes -
          Description Original: This is a regression observed between Jenkins LTS 2.89.4 and LTS 2.107.2.

          The version of the Job DSL plugin (1.69) is unchanged.

          To reproduce:
           # Run the following Job DSL to create a folder and some sample views within that folder.
          {{folder('/dir') \{}}
          {{  displayName('dir')}}
          {{}}}
          {{buildMonitorView('/dir/Test BMV') \{}}
          {{  jobs \{ regex('.*') }}}
          {{}}}
          {{listView('/dir/Test LV') \{}}
          {{  jobs \{ regex(".*") }}}
          {{}}}
           # Run the following Job DSL script on its own.
          {{folder('/dir') \{}}
          {{  displayName('dir')}}
          {{}}}

          Before the upgrade to Jenkins 2.107.2, this worked fine.  Following the upgrade, step 2 destroys the views that were created in step 1.
          New: This is a regression observed between Jenkins LTS 2.89.4 and LTS 2.107.2.

          The version of the Job DSL plugin (1.69) is unchanged.

          To reproduce:
           # Run the following Job DSL to create a folder and some sample views within that folder.
           {{}}
          {noformat}
          folder('/dir') {
             displayName('dir')
           }
           buildMonitorView('/dir/Test BMV') {
             jobs { regex('.*') }
           }
           listView('/dir/Test LV') {
             jobs { regex(".*") }
           }{noformat}
          {{}}
           # Run the following Job DSL script on its own.
           {{}}
          {noformat}
          folder('/dir') {
             displayName('dir')
          }{noformat}
          {{}}

          Before the upgrade to Jenkins 2.107.2, this worked fine.  Following the upgrade, step 2 destroys the views that were created in step 1.
          Oliver Lockwood made changes -
          Description Original: This is a regression observed between Jenkins LTS 2.89.4 and LTS 2.107.2.

          The version of the Job DSL plugin (1.69) is unchanged.

          To reproduce:
           # Run the following Job DSL to create a folder and some sample views within that folder.
           {{}}
          {noformat}
          folder('/dir') {
             displayName('dir')
           }
           buildMonitorView('/dir/Test BMV') {
             jobs { regex('.*') }
           }
           listView('/dir/Test LV') {
             jobs { regex(".*") }
           }{noformat}
          {{}}
           # Run the following Job DSL script on its own.
           {{}}
          {noformat}
          folder('/dir') {
             displayName('dir')
          }{noformat}
          {{}}

          Before the upgrade to Jenkins 2.107.2, this worked fine.  Following the upgrade, step 2 destroys the views that were created in step 1.
          New: This is a regression observed between Jenkins LTS 2.89.4 and LTS 2.107.2.

          The version of the Job DSL plugin (1.69) is unchanged.

          To reproduce:
           # Run the following Job DSL to create a folder and some sample views within that folder.

          {noformat}
          folder('/dir') {
             displayName('dir')
           }
           buildMonitorView('/dir/Test BMV') {
             jobs { regex('.*') }
           }
           listView('/dir/Test LV') {
             jobs { regex(".*") }
           }{noformat}
           

           # Run the following Job DSL script on its own.

          {noformat}
          folder('/dir') {
             displayName('dir')
          }{noformat}
           

          Before the upgrade to Jenkins 2.107.2, this worked fine.  Following the upgrade, step 2 destroys the views that were created in step 1.
          Oliver Lockwood made changes -
          Description Original: This is a regression observed between Jenkins LTS 2.89.4 and LTS 2.107.2.

          The version of the Job DSL plugin (1.69) is unchanged.

          To reproduce:
           # Run the following Job DSL to create a folder and some sample views within that folder.

          {noformat}
          folder('/dir') {
             displayName('dir')
           }
           buildMonitorView('/dir/Test BMV') {
             jobs { regex('.*') }
           }
           listView('/dir/Test LV') {
             jobs { regex(".*") }
           }{noformat}
           

           # Run the following Job DSL script on its own.

          {noformat}
          folder('/dir') {
             displayName('dir')
          }{noformat}
           

          Before the upgrade to Jenkins 2.107.2, this worked fine.  Following the upgrade, step 2 destroys the views that were created in step 1.
          New: This is a regression observed between Jenkins LTS 2.89.4 and LTS 2.107.2.

          The version of the Job DSL plugin (1.69) is unchanged.

          To reproduce:

          *1.* Run the following Job DSL to create a folder and some sample views within that folder.
          {noformat}
          folder('/dir') {
             displayName('dir')
           }
           buildMonitorView('/dir/Test BMV') {
             jobs { regex('.*') }
           }
           listView('/dir/Test LV') {
             jobs { regex(".*") }
           }{noformat}
          *2.* Run the following Job DSL script on its own.
          {noformat}
          folder('/dir') {
             displayName('dir')
          }{noformat}
           

          Before the upgrade to Jenkins 2.107.2, this worked fine.  Following the upgrade, step 2 destroys the views that were created in step 1.
          Oliver Lockwood made changes -
          Description Original: This is a regression observed between Jenkins LTS 2.89.4 and LTS 2.107.2.

          The version of the Job DSL plugin (1.69) is unchanged.

          To reproduce:

          *1.* Run the following Job DSL to create a folder and some sample views within that folder.
          {noformat}
          folder('/dir') {
             displayName('dir')
           }
           buildMonitorView('/dir/Test BMV') {
             jobs { regex('.*') }
           }
           listView('/dir/Test LV') {
             jobs { regex(".*") }
           }{noformat}
          *2.* Run the following Job DSL script on its own.
          {noformat}
          folder('/dir') {
             displayName('dir')
          }{noformat}
           

          Before the upgrade to Jenkins 2.107.2, this worked fine.  Following the upgrade, step 2 destroys the views that were created in step 1.
          New: This is a regression observed between Jenkins LTS 2.89.4 and LTS 2.107.2.

          The version of the Job DSL plugin (1.69) is unchanged.

          To reproduce:

          *1.* Run the following Job DSL to create a folder and some sample views within that folder.
          {noformat}
          folder('/dir') {
            displayName('dir')
          }
          buildMonitorView('/dir/Test BMV') {
            jobs { regex('.*') }
          }
          listView('/dir/Test LV') {
            jobs { regex(".*") }
          }{noformat}
          *2.* Run the following Job DSL script on its own.
          {noformat}
          folder('/dir') {
            displayName('dir')
          }{noformat}
           

          Before the upgrade to Jenkins 2.107.2, this worked fine.  Following the upgrade, step 2 destroys the views that were created in step 1.
          Daniel Spilker made changes -
          Link New: This issue duplicates JENKINS-31308 [ JENKINS-31308 ]
          Daniel Spilker made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Daniel Spilker made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            daspilker Daniel Spilker
            oliverlockwood Oliver Lockwood
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: