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

Sectioned views are not evaluated for job priority

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • prioritysorter-plugin
    • None
    • * Jenkins and plugins latest
      * thousands of generated jobs by job-dsl plugin
      * Nested view with lots of sectioned views

    Description

      If a job is inside a sectioned view (section view plugin) the view-base priority evaluation seems to be broken. Excerpt from log:

      Evaluating JobGroup [21] ...
      [...]
          Evaluating View [Continuous] ...
      [...}
          Evaluating View [~NEVER-OPEN-THIS] ...
            Using filter ...
              Job is matching the filter ...
            No applicable strategy - Using JobGroup default 
      
      Jun 17, 2014 9:26:28 AM FINE PrioritySorter.Queue.Items
      
      Buildable: Id: 6076, JobName: DirectoryService_Tests, jobGroupId: 21, reason: <none>, priority: 5, weight: 5.0, status: BUILDABLE
      

      The same Job "DirectoryService_Tests" is in the sectioned [Continuous] view but it is only evaluated in the view NEVER-OPEN-THIS which is a flat ALL jobs view.

      Attachments

        Activity

          bruce Dirk Kuypers created issue -
          emsa23 Magnus Sandberg made changes -
          Field Original Value New Value
          Assignee bklarson [ bklarson ] Magnus Sandberg [ emsa23 ]
          klou Kurt made changes -
          Assignee Magnus Sandberg [ emsa23 ] bklarson [ bklarson ]
          Description If a job is inside a sectioned view the view-base priority evaluation seems to be broken. Excerpt from log:

          Evaluating JobGroup [21] ...
          [...]
              Evaluating View [Continuous] ...
          [...}
              Evaluating View [~NEVER-OPEN-THIS] ...
                Using filter ...
                  Job is matching the filter ...
                No applicable strategy - Using JobGroup default

          Jun 17, 2014 9:26:28 AM FINE PrioritySorter.Queue.Items

          Buildable: Id: 6076, JobName: DirectoryService_Tests, jobGroupId: 21, reason: <none>, priority: 5, weight: 5.0, status: BUILDABLE

          The Job is in the sectioned [Continuous] view but it is only evaluated in the list view [~NEVER-OPEN-THIS] which is a list view generated by regular expression containing all test jobs.
          If a job is inside a sectioned view (section view plugin) the view-base priority evaluation seems to be broken. Excerpt from log:

          {noformat}
          Evaluating JobGroup [21] ...
          [...]
              Evaluating View [Continuous] ...
          [...}
              Evaluating View [~NEVER-OPEN-THIS] ...
                Using filter ...
                  Job is matching the filter ...
                No applicable strategy - Using JobGroup default

          Jun 17, 2014 9:26:28 AM FINE PrioritySorter.Queue.Items

          Buildable: Id: 6076, JobName: DirectoryService_Tests, jobGroupId: 21, reason: <none>, priority: 5, weight: 5.0, status: BUILDABLE
          {noformat}

          The same Job "DirectoryService_Tests" is in the sectioned [Continuous] view but it is only evaluated in the view [~NEVER-OPEN-THIS] which is a flat ALL jobs view.

          Is this done by using Nested View Plugin or some other plugin?

          emsa23 Magnus Sandberg added a comment - Is this done by using Nested View Plugin or some other plugin?
          emsa23 Magnus Sandberg made changes -
          Assignee bklarson [ bklarson ] Magnus Sandberg [ emsa23 ]
          klou Kurt added a comment - - edited

          I've just updated the description. Sorry, due to a mid-air-collision I fear I had messed up the Assignee.

          It's a view using the "Section View Plugin: https://wiki.jenkins-ci.org/display/JENKINS/Sectioned+View+Plugin

          To be even more precise: All sections of that view are of type "List View Section".

          klou Kurt added a comment - - edited I've just updated the description. Sorry, due to a mid-air-collision I fear I had messed up the Assignee. It's a view using the "Section View Plugin: https://wiki.jenkins-ci.org/display/JENKINS/Sectioned+View+Plugin To be even more precise: All sections of that view are of type "List View Section".

          No worries.

          Your not using any other plugin like the Nested View plugin or Cloudbees Folders in the Sectioned View?

          emsa23 Magnus Sandberg added a comment - No worries. Your not using any other plugin like the Nested View plugin or Cloudbees Folders in the Sectioned View?
          klou Kurt added a comment -

          Nested view plugin is installed but not actually used as we've not (yet) set up any nested views. Reason was that we wanted to use it but as far as I remember there were some troubles using that nested view structure with the Role-based Authorization Strategy plugin and project roles (not sure if that is already solved - but at least we didn't find time to test it again).
          So if useful we could try to completely uninstall the "Nested View" plugin.

          The CloudBees Folders plugin is not even installed.

          klou Kurt added a comment - Nested view plugin is installed but not actually used as we've not (yet) set up any nested views. Reason was that we wanted to use it but as far as I remember there were some troubles using that nested view structure with the Role-based Authorization Strategy plugin and project roles (not sure if that is already solved - but at least we didn't find time to test it again). So if useful we could try to completely uninstall the "Nested View" plugin. The CloudBees Folders plugin is not even installed.

          Thanks. Let's see what I can do ...

          emsa23 Magnus Sandberg added a comment - Thanks. Let's see what I can do ...

          How is the job "DirectoryService_Tests" included in the Section? By name or by pattern (regex)?

          emsa23 Magnus Sandberg added a comment - How is the job "DirectoryService_Tests" included in the Section? By name or by pattern (regex)?
          bruce Dirk Kuypers added a comment -

          By Pattern.

          bruce Dirk Kuypers added a comment - By Pattern.

          OK - then I have a fix in the pipe ...

          emsa23 Magnus Sandberg added a comment - OK - then I have a fix in the pipe ...

          Code changed in jenkins
          User: emsa23
          Path:
          src/main/java/jenkins/advancedqueue/PriorityConfiguration.java
          http://jenkins-ci.org/commit/priority-sorter-plugin/30567281338443e5f73d7790bbb6aefc4d0594b1
          Log:
          JENKINS-23462 Sectioned views are not evaluated for job priority

          Handling differences in implementations of contains() in
          various View/ViewGroups

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: emsa23 Path: src/main/java/jenkins/advancedqueue/PriorityConfiguration.java http://jenkins-ci.org/commit/priority-sorter-plugin/30567281338443e5f73d7790bbb6aefc4d0594b1 Log: JENKINS-23462 Sectioned views are not evaluated for job priority Handling differences in implementations of contains() in various View/ViewGroups

          Code changed in jenkins
          User: emsa23
          Path:
          pom.xml
          src/main/java/jenkins/advancedqueue/PriorityConfiguration.java
          src/test/java/jenkins/advancedqueue/test/SectionedViewTest.java
          src/test/resources/jenkins/advancedqueue/test/SectionedViewTest/config.xml
          src/test/resources/jenkins/advancedqueue/test/SectionedViewTest/jenkins.advancedqueue.PriorityConfiguration.xml
          src/test/resources/jenkins/advancedqueue/test/SectionedViewTest/jenkins.advancedqueue.PrioritySorterConfiguration.xml
          http://jenkins-ci.org/commit/priority-sorter-plugin/4ec547ee116f5e6f7a78d08e9af606c5813f74ec
          Log:
          JENKINS-23462 Sectioned views are not evaluated for job priority

          • Need to use getItems() not getItem() to get the items in the View
          • Added test-case for Sectioned View Plugin
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: emsa23 Path: pom.xml src/main/java/jenkins/advancedqueue/PriorityConfiguration.java src/test/java/jenkins/advancedqueue/test/SectionedViewTest.java src/test/resources/jenkins/advancedqueue/test/SectionedViewTest/config.xml src/test/resources/jenkins/advancedqueue/test/SectionedViewTest/jenkins.advancedqueue.PriorityConfiguration.xml src/test/resources/jenkins/advancedqueue/test/SectionedViewTest/jenkins.advancedqueue.PrioritySorterConfiguration.xml http://jenkins-ci.org/commit/priority-sorter-plugin/4ec547ee116f5e6f7a78d08e9af606c5813f74ec Log: JENKINS-23462 Sectioned views are not evaluated for job priority Need to use getItems() not getItem() to get the items in the View Added test-case for Sectioned View Plugin

          Code changed in jenkins
          User: emsa23
          Path:
          src/test/resources/jenkins/advancedqueue/test/SectionedViewTest/config.xml
          http://jenkins-ci.org/commit/priority-sorter-plugin/47b129c07106bacc38b3c1a509461ce976b66b29
          Log:
          JENKINS-23462 Sectioned views are not evaluated for job priority

          Updated test-case to include job by regex since this was the
          the cause of the problem.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: emsa23 Path: src/test/resources/jenkins/advancedqueue/test/SectionedViewTest/config.xml http://jenkins-ci.org/commit/priority-sorter-plugin/47b129c07106bacc38b3c1a509461ce976b66b29 Log: JENKINS-23462 Sectioned views are not evaluated for job priority Updated test-case to include job by regex since this was the the cause of the problem.

          Fixed in 2.8

          emsa23 Magnus Sandberg added a comment - Fixed in 2.8
          emsa23 Magnus Sandberg made changes -
          Fix Version/s current [ 10162 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          bruce Dirk Kuypers added a comment -

          Thanks for you fast fix Magnus. I have a good and a bad message about it though

          The good one: It seems to work, the jobs are found in the views and priorities are assigned as configured.
          The bad one: It seems to be a real performance hog at least with our quite large installation.:-/ Jenkins UI was unusable after some time, after downgrading everything is back to normal.

          Some facts: We have about 10000 Jobs, more than 20 views refering most of the jobs via regex pattern. So I could imagine that there are long lists of jobs being iterated while computing priorities.

          Would it be a better approach for us to configure job priority directly on the job? That would be not a big deal because most of them are generated from template?

          Should I open a new JIRA ticket? Or reopen this one?

          bruce Dirk Kuypers added a comment - Thanks for you fast fix Magnus. I have a good and a bad message about it though The good one: It seems to work, the jobs are found in the views and priorities are assigned as configured. The bad one: It seems to be a real performance hog at least with our quite large installation.:-/ Jenkins UI was unusable after some time, after downgrading everything is back to normal. Some facts: We have about 10000 Jobs, more than 20 views refering most of the jobs via regex pattern. So I could imagine that there are long lists of jobs being iterated while computing priorities. Would it be a better approach for us to configure job priority directly on the job? That would be not a big deal because most of them are generated from template? Should I open a new JIRA ticket? Or reopen this one?
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 156090 ] JNJira + In-Review [ 195341 ]
          markewaite Mark Waite made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

          People

            emsa23 Magnus Sandberg
            bruce Dirk Kuypers
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: