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

Support for Priority Sorter Plugin out of date

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: job-dsl-plugin
    • Labels:
      None
    • Environment:
      jenkins 1.609.1
      job-dsl-plugin 1.35
      priority sorter plugin 3.4
    • Similar Issues:

      Description

      Support for the Priority Sorter Plugin appears to date back to the old hudson plugin and doesn't work with the current jenkins plugin (https://wiki.jenkins-ci.org/display/JENKINS/Priority+Sorter+Plugin).

      e.g. from job_dsl_plugin priority(5) I get:

               <hudson.queueSorter.PrioritySorterJobProperty>
                    <priority>5</priority>
               </hudson.queueSorter.PrioritySorterJobProperty>
      

      For the same from the Jenkins priority sorter plugin (version 3.4) I get:

               <jenkins.advancedqueue.priority.strategy.PriorityJobProperty>
                   <useJobPriority>true</useJobPriority>
                    <priority>5</priority>
               </jenkins.advancedqueue.priority.strategy.PriorityJobProperty>
      

        Attachments

          Issue Links

            Activity

            Hide
            rg Russell Gallop added a comment -

            I believe that this was closed incorrectly. It is a duplicate of JENKINS-28303. From that bug:

            "Realised this issue is also mapped to job-dsl-plugin, if you want to upgrade the dsl-plugin to work with never versions on priority-sorter and need some directions just let me know."

            That is exactly what I want, sorry if that was not clear. If the recommended way is to support job groups then maybe we should implement that. When I set one of these up in the Jenkins Web interface I get the following added to config.xml:

                <jenkins.advancedqueue.priority.strategy.PriorityJobProperty plugin="PrioritySorter@3.4">
                  <useJobPriority>false</useJobPriority>
                  <priority>-1</priority>
                </jenkins.advancedqueue.priority.strategy.PriorityJobProperty>
            

            AND

                <jenkins.advancedqueue.jobinclusion.strategy.JobInclusionJobProperty plugin="PrioritySorter@3.4">
                  <useJobGroup>true</useJobGroup>
                  <jobGroupName>Responsive</jobGroupName>
                </jenkins.advancedqueue.jobinclusion.strategy.JobInclusionJobProperty>
            

            Are these both required for it to work or can we just add the second one?

            Would the following be a reasonable interface in the DSL?

            priorityGroup(String groupName)

            Personally I believe that setting the priority directly on a job would be helpful for job-dsl-plugin users who probably want to manage as much as possible from their DSL code. If it is still available in the web ui and is not deprecated then I don't see a problem with supporting it in job-dsl-plugin.

            Show
            rg Russell Gallop added a comment - I believe that this was closed incorrectly. It is a duplicate of JENKINS-28303 . From that bug: "Realised this issue is also mapped to job-dsl-plugin, if you want to upgrade the dsl-plugin to work with never versions on priority-sorter and need some directions just let me know." That is exactly what I want, sorry if that was not clear. If the recommended way is to support job groups then maybe we should implement that. When I set one of these up in the Jenkins Web interface I get the following added to config.xml: <jenkins.advancedqueue.priority.strategy.PriorityJobProperty plugin= "PrioritySorter@3.4" > <useJobPriority> false </useJobPriority> <priority>-1</priority> </jenkins.advancedqueue.priority.strategy.PriorityJobProperty> AND <jenkins.advancedqueue.jobinclusion.strategy.JobInclusionJobProperty plugin= "PrioritySorter@3.4" > <useJobGroup> true </useJobGroup> <jobGroupName>Responsive</jobGroupName> </jenkins.advancedqueue.jobinclusion.strategy.JobInclusionJobProperty> Are these both required for it to work or can we just add the second one? Would the following be a reasonable interface in the DSL? priorityGroup(String groupName) Personally I believe that setting the priority directly on a job would be helpful for job-dsl-plugin users who probably want to manage as much as possible from their DSL code. If it is still available in the web ui and is not deprecated then I don't see a problem with supporting it in job-dsl-plugin.
            Hide
            daspilker Daniel Spilker added a comment -

            This was closed because it is a duplicate of JENKINS-28303. The correct action would have been to reopen JENKINS-28303.

            But if you do not need any features of version >=3.0 of the Priority Sorter plugin, just use a version <3.0. IMHO it would be the best option for all users (not only Job DSL users) if the Priority Sorter plugin restores compatibility with earlier versions.

            Show
            daspilker Daniel Spilker added a comment - This was closed because it is a duplicate of JENKINS-28303 . The correct action would have been to reopen JENKINS-28303 . But if you do not need any features of version >=3.0 of the Priority Sorter plugin, just use a version <3.0. IMHO it would be the best option for all users (not only Job DSL users) if the Priority Sorter plugin restores compatibility with earlier versions.
            Show
            daspilker Daniel Spilker added a comment - https://github.com/jenkinsci/job-dsl-plugin/pull/800
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Daniel Spilker
            Path:
            docs/Home.md
            docs/Migration.md
            job-dsl-core/src/main/docs/examples/javaposse/jobdsl/dsl/helpers/properties/PropertiesContext/priority.groovy
            job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/Job.groovy
            job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/properties/PropertiesContext.groovy
            job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/JobSpec.groovy
            job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/properties/PropertiesContextSpec.groovy
            http://jenkins-ci.org/commit/job-dsl-plugin/5c187c31381b3cc5e02afa8b1b92d702d3862780
            Log:
            added support for newer version of the Priority Sorter plugin
            support for older versions is deprecated

            [FIXES JENKINS-29678]

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: docs/Home.md docs/Migration.md job-dsl-core/src/main/docs/examples/javaposse/jobdsl/dsl/helpers/properties/PropertiesContext/priority.groovy job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/Job.groovy job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/properties/PropertiesContext.groovy job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/JobSpec.groovy job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/properties/PropertiesContextSpec.groovy http://jenkins-ci.org/commit/job-dsl-plugin/5c187c31381b3cc5e02afa8b1b92d702d3862780 Log: added support for newer version of the Priority Sorter plugin support for older versions is deprecated [FIXES JENKINS-29678]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Daniel Spilker
            Path:
            docs/Home.md
            docs/Migration.md
            job-dsl-core/src/main/docs/examples/javaposse/jobdsl/dsl/helpers/properties/PropertiesContext/priority.groovy
            job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/Job.groovy
            job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/properties/PropertiesContext.groovy
            job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/JobSpec.groovy
            job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/properties/PropertiesContextSpec.groovy
            http://jenkins-ci.org/commit/job-dsl-plugin/9eea45cbfab0cecc43d42c3c2f4573fe1a876463
            Log:
            Merge pull request #800 from daspilker/JENKINS-29678

            JENKINS-29678 added support for newer version of the Priority Sorter plugin

            Compare: https://github.com/jenkinsci/job-dsl-plugin/compare/3260a7031fd2...9eea45cbfab0

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: docs/Home.md docs/Migration.md job-dsl-core/src/main/docs/examples/javaposse/jobdsl/dsl/helpers/properties/PropertiesContext/priority.groovy job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/Job.groovy job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/properties/PropertiesContext.groovy job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/JobSpec.groovy job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/properties/PropertiesContextSpec.groovy http://jenkins-ci.org/commit/job-dsl-plugin/9eea45cbfab0cecc43d42c3c2f4573fe1a876463 Log: Merge pull request #800 from daspilker/ JENKINS-29678 JENKINS-29678 added support for newer version of the Priority Sorter plugin Compare: https://github.com/jenkinsci/job-dsl-plugin/compare/3260a7031fd2...9eea45cbfab0

              People

              Assignee:
              daspilker Daniel Spilker
              Reporter:
              rg Russell Gallop
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: