| Daniel Spilker - so I was able to easily reproduce the issue using the LTS docker image. That is `Jenkins ver. 2.164.2` at the time of this writing. To reproduce:
- docker run -p 8080:8080 -p 50000:50000 -v jenkins_home:/var/jenkins_home jenkins/jenkins:lts
- On initial startup, install the "recommended" plugins - do not customize the list
- Install the JobDSL plugin
- Create a FreeStyle job CreateFolder
- Configure the free style job to have an inline DSL section and provide the snippet below:
{
Unknown macro: {folder('GenFolder') { displayName('GenFolder') description('GenFolder') }}
}
- Save
- Run the CreateFolder Job
- Navigate in the Jenkins UI to the {{GenFolder}} directory (I get an error message in the UI, but this is fine)
- Navigate to the Logs page: `<your-server>/log/all`
- You should see the following log message:
JENKINS-38606 detected for AllView in com.cloudbees.hudson.plugins.folder.Folder@38aa17c8[GenFolder]; renaming view from All to all
This lines up with the expectations based on the Folder code: https://github.com/jenkinsci/cloudbees-folder-plugin/blob/e9a4d5b19e7db6021f81d2c4c8c2afa328e0d9f8/src/main/java/com/cloudbees/hudson/plugins/folder/AbstractFolder.java#L248 If you look there, the code requires that a primaryView be defined when this block of code is hit. I am not sure of the exact situation necessary, but it is fairly common in the wild. Following the code for {{ migrateLegacyPrimaryAllViewLocalizedName }}: https://github.com/jenkinsci/cloudbees-folder-plugin/blob/e9a4d5b19e7db6021f81d2c4c8c2afa328e0d9f8/src/main/java/com/cloudbees/hudson/plugins/folder/views/DefaultFolderViewHolder.java#L176 Under common conditions this will attempt to rename the view to {{ AllView.DEFAULT_VIEW_NAME }}. Checking that code: https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/AllView.java#L61 ... {{ AllView.DEFAULT_VIEW_NAME }} is {{ "all" }} (in lowercase). |