Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for side-files #483

Open
jglick opened this issue Aug 3, 2023 · 2 comments
Open

Drop support for side-files #483

jglick opened this issue Aug 3, 2023 · 2 comments

Comments

@jglick
Copy link
Member

jglick commented Aug 3, 2023

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 [email protected]/sun.nio.fs.UnixNativeDispatcher.lstat(UnixNativeDispatcher.java:334)
	at [email protected]/sun.nio.fs.UnixFileAttributes.get(UnixFileAttributes.java:72)
	at [email protected]/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:52)
	at [email protected]/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:149)
	at [email protected]/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
	at [email protected]/java.nio.file.Files.readAttributes(Files.java:1764)
	at [email protected]/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 [email protected]/java.lang.ClassValue.getFromHashMap(ClassValue.java:228)
	at [email protected]/java.lang.ClassValue.getFromBackup(ClassValue.java:210)
	at [email protected]/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.

@ahmed-kamal2004
Copy link
Contributor

ahmed-kamal2004 commented Jan 3, 2025

@timja @jglick
To address this issue effectively:

  • Remove Support for side-files
    The side-files feature will be deprecated and removed from the Stapler project, as it has never been used. This streamlining will simplify the codebase and align with modern practices.

  • Update Examples and Documentation
    All examples and documentation will be revised to reflect the updated approach, adhering to Jenkins Core's method of using Stapler. This ensures consistency and clarity for users.

If there's anything in this plan you believe needs further discussion, clarification, or adjustment, please let me know 🚀

@timja
Copy link
Member

timja commented Jan 4, 2025

Sounds good it’s not infrequent use it’s never used outside of the stapler examples that we can tell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants