Skip to content

Drop support for side-files #483

@jglick

Description

@jglick

While waiting a long time for a config page to load in a newly started controller, I decided to take a thread dump, and noticed this:

"Handling GET /mc/manage/configureClouds/ from … : Jetty (winstone)-… KubernetesCloud/DescriptorImpl/config.jelly PodTemplate/config.jelly" Id=… Group=main RUNNABLE
	at java.base@11.0.20/sun.nio.fs.UnixNativeDispatcher.lstat(UnixNativeDispatcher.java:334)
	at java.base@11.0.20/sun.nio.fs.UnixFileAttributes.get(UnixFileAttributes.java:72)
	at java.base@11.0.20/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:52)
	at java.base@11.0.20/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:149)
	at java.base@11.0.20/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
	at java.base@11.0.20/java.nio.file.Files.readAttributes(Files.java:1764)
	at java.base@11.0.20/java.nio.file.Files.isSymbolicLink(Files.java:2190)
	at org.eclipse.jetty.util.resource.PathResource.checkAliasPath(PathResource.java:98)
	at org.eclipse.jetty.util.resource.PathResource.<init>(PathResource.java:262)
	at org.eclipse.jetty.util.resource.PathResource.addPath(PathResource.java:367)
	at org.eclipse.jetty.server.handler.ContextHandler.getResource(ContextHandler.java:1947)
	at org.eclipse.jetty.webapp.WebAppContext.getResource(WebAppContext.java:410)
	at org.eclipse.jetty.webapp.WebAppContext$Context.getResource(WebAppContext.java:1444)
	at org.kohsuke.stapler.IndexHtmlDispatcher.make(IndexHtmlDispatcher.java:44)
	at org.kohsuke.stapler.MetaClass.buildDispatchers(MetaClass.java:153)
	at org.kohsuke.stapler.MetaClass.<init>(MetaClass.java:99)
	at org.kohsuke.stapler.WebApp$1.computeValue(WebApp.java:230)
	at org.kohsuke.stapler.WebApp$1.computeValue(WebApp.java:227)
	at java.base@11.0.20/java.lang.ClassValue.getFromHashMap(ClassValue.java:228)
	at java.base@11.0.20/java.lang.ClassValue.getFromBackup(ClassValue.java:210)
	at java.base@11.0.20/java.lang.ClassValue.get(ClassValue.java:116)
	at org.kohsuke.stapler.WebApp.getMetaClass(WebApp.java:246)
	at org.kohsuke.stapler.jelly.groovy.GroovyFacet.createRequestDispatcher(GroovyFacet.java:74)
	at org.kohsuke.stapler.RequestImpl.getView(RequestImpl.java:307)
	at org.kohsuke.stapler.RequestImpl.getView(RequestImpl.java:302)
	at hudson.model.Descriptor.getHelpFile(Descriptor.java:776)
	at hudson.model.Descriptor.getHelpFile(Descriptor.java:757)
	at hudson.model.Descriptor.getHelpFile(Descriptor.java:746)
	at …

Something spending time crawling the filesystem (not the jenkins.war) looking for something, but what?

* Serve {@code index.html} from {@code WEB-INF/side-files} if that exists.
but I have never heard of such a thing. History does not help much other than 95f7089 (#102)

Since this feature is rarely used…

In fact it seems this feature is never used at all. (Checked @cloudbees too.) Since we expect Stapler to only be used by Jenkins these days, we could simplify code and apparently speed up view initialization by dropping this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions