-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Use detached plugins as a cache for the Update Center #9476
Conversation
@jtnord I don't think this should affect FIPS support since this is a best-effort optimization and since CloudBees doesn't ship a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Could make PluginManager#getDetachedLocation public and consume it here, but this method is | ||
* best-effort anyway. | ||
*/ | ||
src = Jenkins.get().servletContext.getResource(String.format("/WEB-INF/detached-plugins/%s.hpi", plugin.name)); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This PR is now ready for merge. We will merge it after approximately 24 hours if there is no negative feedback. /label ready-for-merge |
While doing manual testing recently I was frustrated by how long it took to get through the setup wizard. This change makes the setup wizard a little faster by using the detached plugins directory as a cache for the update center. This is a best-effort optimization that only kicks in if we happen to have the file we are about to download in the
WEB-INF/detached-plugins
directory and if its checksum happens to match. If so we simply save ourselves a trip to the download site by using what we already have. If anything goes wrong here we ignore the error and proceed along the normal download path. This brings the number of plugins that need to be downloaded during the setup wizard from 89 to 50 and (on my slow internet connection) drops the setup wizard time from 1 minute 52 seconds to 1 minute 9 seconds.Testing done
Manual testing:
Automated testing:
mvn clean verify -Dtest=hudson.ClassicPluginStrategyTest,hudson.cli.DisablePluginCommandTest,hudson.cli.EnablePluginCommandTest,hudson.cli.InstallPluginCommandTest,hudson.cli.ListPluginsCommandTest,hudson.core.PluginManagerOverrideTest,hudson.CustomPluginManagerTest,hudson.ExtensionListListenerTest,hudson.lifecycle.LifecycleTest,hudson.model.DownloadServiceTest,hudson.model.UpdateCenter2Test,hudson.model.UpdateCenterConnectionStatusTest,hudson.model.UpdateCenterCustomTest,hudson.model.UpdateCenterPluginInstallTest,hudson.model.UpdateCenterTest,hudson.model.UpdateSiteTest,hudson.PluginManagerCheckUpdateCenterTest,hudson.PluginManagerInstalledGUITest,hudson.PluginManagerTest,hudson.PluginManagerUtil,hudson.PluginManagerWhichTest,hudson.PluginTest,hudson.PluginWrapperTest,hudson.slaves.JNLPLauncherRealTest,jenkins.install.InstallUtilTest,jenkins.install.LoadDetachedPluginsTest,jenkins.install.SetupWizardTest,jenkins.model.JenkinsManagePermissionTest,jenkins.plugins.DetachedPluginsUtilTest,jenkins.security.CustomClassFilterTest,jenkins.security.SecurityContextExecutorServiceTest,jenkins.security.stapler.Security914Test
Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Desired reviewers
@mention
Before the changes are marked as
ready-for-merge
:Maintainer checklist