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

job-dsl using multiple "Process Job DSLs" build steps causes UI bugs

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core, job-dsl-plugin
    • None
    • Jenkins Version 1.651.3
      Job DSL Plugin Version 1.56
      RHEL 6.8
      Chrome
      Java 8

      A separate link on the side bar "Job DSL API Reference" is created for each instance of the "Process Job DSLs" build step.

      Please see attachments for an image of the issue.

          [JENKINS-41083] job-dsl using multiple "Process Job DSLs" build steps causes UI bugs

          I can reproduce this on 1.642.1 and on 2.32.1.

          The fields will appear if you click on the radio buttons. The script text will appear if you start editing. I think this is a framework bug in Jenkins/Stapler/Jelly and needs to be fixed there.

          The issue with multiple links in the sidebar is also a limitation of the framework and would IMHO need to be addressed in Jenkins core. A build step can provide some actions to be shown in the side bar. And Jenkins currently shows all provided action even if they are identical.

          Why do you need multiple Job DSL build steps?

          Daniel Spilker added a comment - I can reproduce this on 1.642.1 and on 2.32.1. The fields will appear if you click on the radio buttons. The script text will appear if you start editing. I think this is a framework bug in Jenkins/Stapler/Jelly and needs to be fixed there. The issue with multiple links in the sidebar is also a limitation of the framework and would IMHO need to be addressed in Jenkins core. A build step can provide some actions to be shown in the side bar. And Jenkins currently shows all provided action even if they are identical. Why do you need multiple Job DSL build steps?

          Technically, I suppose I don't need to.

          I currently have several DSL scripts categorized in different directories that configure ~145 jobs. My current seed job had a build step for each directory (some of these directories are all DSL scripts - others contain groovy files that get read into the DSL scripts.. so i would have to write a more complicated regex for which files to process that i felt was necessary when i could just use multiple build steps).

          This was something I noticed that I felt should be brought to your attention - but I guess isn't a blocker.

          Sounds like it should be handled in Jenkins core anyway - thanks!

          Steven Terrana added a comment - Technically, I suppose I don't need to. I currently have several DSL scripts categorized in different directories that configure ~145 jobs. My current seed job had a build step for each directory (some of these directories are all DSL scripts - others contain groovy files that get read into the DSL scripts.. so i would have to write a more complicated regex for which files to process that i felt was necessary when i could just use multiple build steps). This was something I noticed that I felt should be brought to your attention - but I guess isn't a blocker. Sounds like it should be handled in Jenkins core anyway - thanks!

          Daniel Beck added a comment -

          A build step can provide some actions to be shown in the side bar. And Jenkins currently shows all provided action even if they are identical.

          Not a core bug. The solution is for the plugin / whatever adds actions to check whether an action exists already (and add data to that if applicable) in subsequent step executions before adding a new action.

          Daniel Beck added a comment - A build step can provide some actions to be shown in the side bar. And Jenkins currently shows all provided action even if they are identical. Not a core bug. The solution is for the plugin / whatever adds actions to check whether an action exists already (and add data to that if applicable) in subsequent step executions before adding a new action.

          Unfortunately this issue is about two problems, the radio buttons and the side bar links. PR #989 is going to fix the problem with the side bar links. I'm opening another ticket for the problem with the radio buttons.

          Daniel Spilker added a comment - Unfortunately this issue is about two problems, the radio buttons and the side bar links. PR #989 is going to fix the problem with the side bar links. I'm opening another ticket for the problem with the radio buttons.

          JENKINS-41389 is the follow-up issue for the problem with the radio buttons and textareas.

          Daniel Spilker added a comment - JENKINS-41389 is the follow-up issue for the problem with the radio buttons and textareas.

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          docs/Home.md
          job-dsl-plugin/src/main/groovy/javaposse/jobdsl/plugin/ExecuteDslScripts.java
          job-dsl-plugin/src/main/groovy/javaposse/jobdsl/plugin/actions/ApiViewerActionFactory.groovy
          job-dsl-plugin/src/test/groovy/javaposse/jobdsl/plugin/ExecuteDslScriptsSpec.groovy
          job-dsl-plugin/src/test/groovy/javaposse/jobdsl/plugin/actions/ApiViewerActionFactorySpec.groovy
          http://jenkins-ci.org/commit/job-dsl-plugin/35606b7b2eff31d821e736ec531a47213d505f33
          Log:
          show only one link to embedded API viewer

          [FIXES JENKINS-41083]

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: docs/Home.md job-dsl-plugin/src/main/groovy/javaposse/jobdsl/plugin/ExecuteDslScripts.java job-dsl-plugin/src/main/groovy/javaposse/jobdsl/plugin/actions/ApiViewerActionFactory.groovy job-dsl-plugin/src/test/groovy/javaposse/jobdsl/plugin/ExecuteDslScriptsSpec.groovy job-dsl-plugin/src/test/groovy/javaposse/jobdsl/plugin/actions/ApiViewerActionFactorySpec.groovy http://jenkins-ci.org/commit/job-dsl-plugin/35606b7b2eff31d821e736ec531a47213d505f33 Log: show only one link to embedded API viewer [FIXES JENKINS-41083]

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          docs/Home.md
          job-dsl-plugin/src/main/groovy/javaposse/jobdsl/plugin/ExecuteDslScripts.java
          job-dsl-plugin/src/main/groovy/javaposse/jobdsl/plugin/actions/ApiViewerActionFactory.groovy
          job-dsl-plugin/src/test/groovy/javaposse/jobdsl/plugin/ExecuteDslScriptsSpec.groovy
          job-dsl-plugin/src/test/groovy/javaposse/jobdsl/plugin/actions/ApiViewerActionFactorySpec.groovy
          http://jenkins-ci.org/commit/job-dsl-plugin/62306c7d1c4f0a2d8eee62b8e82130b5d30cc706
          Log:
          Merge pull request #989 from daspilker/JENKINS-41083

          JENKINS-41083 show only one link to embedded API viewer

          Compare: https://github.com/jenkinsci/job-dsl-plugin/compare/224523422c47...62306c7d1c4f

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: docs/Home.md job-dsl-plugin/src/main/groovy/javaposse/jobdsl/plugin/ExecuteDslScripts.java job-dsl-plugin/src/main/groovy/javaposse/jobdsl/plugin/actions/ApiViewerActionFactory.groovy job-dsl-plugin/src/test/groovy/javaposse/jobdsl/plugin/ExecuteDslScriptsSpec.groovy job-dsl-plugin/src/test/groovy/javaposse/jobdsl/plugin/actions/ApiViewerActionFactorySpec.groovy http://jenkins-ci.org/commit/job-dsl-plugin/62306c7d1c4f0a2d8eee62b8e82130b5d30cc706 Log: Merge pull request #989 from daspilker/ JENKINS-41083 JENKINS-41083 show only one link to embedded API viewer Compare: https://github.com/jenkinsci/job-dsl-plugin/compare/224523422c47...62306c7d1c4f

            daspilker Daniel Spilker
            sterrana Steven Terrana
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: