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

Queue#getApproximateItemsQuickly can cache invalid results

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Queue#getApproximateItemsQuickly uses a cache to return results faster. However, the return value depends on current Authentication which is not taken into account in the cache.

      Given that the queue is currently based on Snapshots this cache should no longer be needed.

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            Seems getApproximateItemsQuickly was added in 1.483, and should have been removed as part of the Queue refactoring in 1.607, right Stephen Connolly?

            Show
            jglick Jesse Glick added a comment - Seems getApproximateItemsQuickly was added in 1.483, and should have been removed as part of the Queue refactoring in 1.607, right Stephen Connolly ?
            Hide
            stephenconnolly Stephen Connolly added a comment -

            yep... not sure why I didn't remove it at the time

            Show
            stephenconnolly Stephen Connolly added a comment - yep... not sure why I didn't remove it at the time
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andres Rodriguez
            Path:
            core/src/main/java/hudson/model/Queue.java
            core/src/main/java/hudson/model/View.java
            core/src/main/java/hudson/widgets/BuildHistoryWidget.java
            core/src/main/resources/hudson/model/ComputerSet/sidepanel.jelly
            core/src/main/resources/hudson/model/View/ajaxBuildQueue.jelly
            core/src/main/resources/jenkins/widgets/BuildQueueWidget/index.groovy
            core/src/main/resources/lib/hudson/queue.jelly
            test/src/test/java/hudson/model/QueueTest.java
            http://jenkins-ci.org/commit/jenkins/638ceb2316df86e724e537cd7ed0b5e4f263e315
            Log:
            JENKINS-32517 Deprecate Queue#getApproximateItemsQuickly

            Now that the item list is obtained lock-free the cache is no longer needed.
            Besides, the cache could be returning invalid results for requests with different authorization to the one that cached the result (in any case this invalid result is transient).

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andres Rodriguez Path: core/src/main/java/hudson/model/Queue.java core/src/main/java/hudson/model/View.java core/src/main/java/hudson/widgets/BuildHistoryWidget.java core/src/main/resources/hudson/model/ComputerSet/sidepanel.jelly core/src/main/resources/hudson/model/View/ajaxBuildQueue.jelly core/src/main/resources/jenkins/widgets/BuildQueueWidget/index.groovy core/src/main/resources/lib/hudson/queue.jelly test/src/test/java/hudson/model/QueueTest.java http://jenkins-ci.org/commit/jenkins/638ceb2316df86e724e537cd7ed0b5e4f263e315 Log: JENKINS-32517 Deprecate Queue#getApproximateItemsQuickly Now that the item list is obtained lock-free the cache is no longer needed. Besides, the cache could be returning invalid results for requests with different authorization to the one that cached the result (in any case this invalid result is transient).
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            core/src/main/java/hudson/model/Queue.java
            core/src/main/java/hudson/model/View.java
            core/src/main/java/hudson/widgets/BuildHistoryWidget.java
            core/src/main/resources/hudson/model/ComputerSet/sidepanel.jelly
            core/src/main/resources/hudson/model/View/ajaxBuildQueue.jelly
            core/src/main/resources/jenkins/widgets/BuildQueueWidget/index.groovy
            core/src/main/resources/lib/hudson/queue.jelly
            test/src/test/java/hudson/model/QueueTest.java
            http://jenkins-ci.org/commit/jenkins/95043db718b3a725add208b2ebce1b277485fa86
            Log:
            Merge pull request #1991 from andresrc/JENKINS-32517

            JENKINS-32517 Deprecate Queue#getApproximateItemsQuickly

            Compare: https://github.com/jenkinsci/jenkins/compare/dc2c64e85926...95043db718b3

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: core/src/main/java/hudson/model/Queue.java core/src/main/java/hudson/model/View.java core/src/main/java/hudson/widgets/BuildHistoryWidget.java core/src/main/resources/hudson/model/ComputerSet/sidepanel.jelly core/src/main/resources/hudson/model/View/ajaxBuildQueue.jelly core/src/main/resources/jenkins/widgets/BuildQueueWidget/index.groovy core/src/main/resources/lib/hudson/queue.jelly test/src/test/java/hudson/model/QueueTest.java http://jenkins-ci.org/commit/jenkins/95043db718b3a725add208b2ebce1b277485fa86 Log: Merge pull request #1991 from andresrc/ JENKINS-32517 JENKINS-32517 Deprecate Queue#getApproximateItemsQuickly Compare: https://github.com/jenkinsci/jenkins/compare/dc2c64e85926...95043db718b3
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #4437
            JENKINS-32517 Deprecate Queue#getApproximateItemsQuickly (Revision 638ceb2316df86e724e537cd7ed0b5e4f263e315)

            Result = SUCCESS
            arodriguez : 638ceb2316df86e724e537cd7ed0b5e4f263e315
            Files :

            • core/src/main/java/hudson/model/Queue.java
            • core/src/main/resources/hudson/model/ComputerSet/sidepanel.jelly
            • test/src/test/java/hudson/model/QueueTest.java
            • core/src/main/resources/lib/hudson/queue.jelly
            • core/src/main/resources/jenkins/widgets/BuildQueueWidget/index.groovy
            • core/src/main/resources/hudson/model/View/ajaxBuildQueue.jelly
            • core/src/main/java/hudson/widgets/BuildHistoryWidget.java
            • core/src/main/java/hudson/model/View.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #4437 JENKINS-32517 Deprecate Queue#getApproximateItemsQuickly (Revision 638ceb2316df86e724e537cd7ed0b5e4f263e315) Result = SUCCESS arodriguez : 638ceb2316df86e724e537cd7ed0b5e4f263e315 Files : core/src/main/java/hudson/model/Queue.java core/src/main/resources/hudson/model/ComputerSet/sidepanel.jelly test/src/test/java/hudson/model/QueueTest.java core/src/main/resources/lib/hudson/queue.jelly core/src/main/resources/jenkins/widgets/BuildQueueWidget/index.groovy core/src/main/resources/hudson/model/View/ajaxBuildQueue.jelly core/src/main/java/hudson/widgets/BuildHistoryWidget.java core/src/main/java/hudson/model/View.java
            Hide
            aheritier Arnaud Héritier added a comment -

            Due to the UI inconsistencies it can create could we backport it in the next 1.642 LTS ?

            Show
            aheritier Arnaud Héritier added a comment - Due to the UI inconsistencies it can create could we backport it in the next 1.642 LTS ?
            Hide
            olivergondza Oliver Gondža added a comment -

            Arnaud Héritier the release line is over now and the next one already contains this fix. Removing the candidate label.

            Show
            olivergondza Oliver Gondža added a comment - Arnaud Héritier the release line is over now and the next one already contains this fix. Removing the candidate label.
            Hide
            aheritier Arnaud Héritier added a comment -
            Show
            aheritier Arnaud Héritier added a comment - Oliver Gondža agreed

              People

              • Assignee:
                andresrc Andres Rodriguez
                Reporter:
                andresrc Andres Rodriguez
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: