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

<l:task> fails to serve plugin icons as static resources

      Run Jenkins with --accessLoggerClassName=winstone.accesslog.SimpleAccessLogger --simpleAccessLogger.file=/tmp/access.log and then tail -n +0 -f /tmp/access.log | fgrep 304 to see every case when a resource is served which could have been cached. In stock Jenkins you will see /plugin/translation/flags.png on every page, and if you run with a lot of plugins this count goes up; e.g. for Jenkins Enterprise by CloudBees a job page can also load /plugin/nectar-rbac/images/24x24/groups.png, /plugin/nectar-rbac/images/24x24/roles.png, /plugin/cloudbees-folder/images/24x24/move.png, /plugin/skip-plugin/images/24x24/skip-off.png, and /plugin/cloudbees-secure-copy/images/24x24/exports.png, and also /plugin/nectar-vmware/24x24/vmware.gif at top level.

      All these HTTP requests add load to the handling thread (especially when all the various security and logging filters are processed), and may add some I/O load depending on the container. The overhead is increased considerably if auto refresh is enabled. All that work is wasted since these icons can be safely cached by the browser.

      task.jelly tries to prepend Jenkins.RESOURCE_PATH to images, which works for built-in actions but fails for actions provided by plugins (assuming they define their own icons). The flags.png problem was fixed in translation-1.9.hpi, but Jenkins still bundles 1.8.

          [JENKINS-16530] <l:task> fails to serve plugin icons as static resources

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          core/src/main/resources/lib/layout/task.jelly
          war/pom.xml
          http://jenkins-ci.org/commit/jenkins/a9c0080ebdb5ce99cfa47cef674dc59a4035e779
          Log:
          [FIXED JENKINS-16530] Improve icon caching.


          You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com.
          For more options, visit https://groups.google.com/groups/opt_out.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/resources/lib/layout/task.jelly war/pom.xml http://jenkins-ci.org/commit/jenkins/a9c0080ebdb5ce99cfa47cef674dc59a4035e779 Log: [FIXED JENKINS-16530] Improve icon caching. – You received this message because you are subscribed to the Google Groups "Jenkins Commits" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out .

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2227
          [FIXED JENKINS-16530] Improve icon caching. (Revision a9c0080ebdb5ce99cfa47cef674dc59a4035e779)

          Result = SUCCESS
          Jesse Glick : a9c0080ebdb5ce99cfa47cef674dc59a4035e779
          Files :

          • war/pom.xml
          • core/src/main/resources/lib/layout/task.jelly
          • changelog.html

          dogfood added a comment - Integrated in jenkins_main_trunk #2227 [FIXED JENKINS-16530] Improve icon caching. (Revision a9c0080ebdb5ce99cfa47cef674dc59a4035e779) Result = SUCCESS Jesse Glick : a9c0080ebdb5ce99cfa47cef674dc59a4035e779 Files : war/pom.xml core/src/main/resources/lib/layout/task.jelly changelog.html

          Code changed in jenkins
          User: Christopher Orr
          Path:
          src/main/java/org/jenkinsci/plugins/android_lint/LintDescriptor.java
          http://jenkins-ci.org/commit/android-lint-plugin/7d90c1de9206daa9f3d13961687e4cf7e40b0ac9
          Log:
          [FIXED JENKINS-16075] Remove redundant resource path from icon URL.

          Apparently the fix for JENKINS-16530 now includes this automatically
          for all plugin images, regardless of whether the plugin was already
          doing the right thing and allowing caching.

          Compare: https://github.com/jenkinsci/android-lint-plugin/compare/8a56499d1ece...7d90c1de9206

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christopher Orr Path: src/main/java/org/jenkinsci/plugins/android_lint/LintDescriptor.java http://jenkins-ci.org/commit/android-lint-plugin/7d90c1de9206daa9f3d13961687e4cf7e40b0ac9 Log: [FIXED JENKINS-16075] Remove redundant resource path from icon URL. Apparently the fix for JENKINS-16530 now includes this automatically for all plugin images, regardless of whether the plugin was already doing the right thing and allowing caching. Compare: https://github.com/jenkinsci/android-lint-plugin/compare/8a56499d1ece...7d90c1de9206

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: