From 61ed6c83ebbbb97cea799cff2ef52fd6ee643b4b Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 18 Jul 2023 08:52:56 +0000 Subject: [PATCH] fix(plugins): Enable RemotePluginInfoReleaseCache bean only when the property matches the condition (#1041) (#1070) Last week during Github's downtime, because the RemotePluginInfoReleaseCache runs in the background every 1 minutes, it forced the plugins to be reloaded(downloaded again from Github), action which failed because the Github keys were rotated due to their security leak The refresh of the plugins is caused by the updateManager.refresh() call in the refresh method of the RemotePluginInfoReleaseCache. As far as we can tell, the concept of remote plugins is something that is not used at all. So we can opt-in for this cache refresh bean by manually setting spinnaker.extensibility.remote-plugins.cache.enabled to true Incident report page: https://www.githubstatus.com/incidents/x7njwb481j9b (cherry picked from commit f7c9ef75cf93ba4ec36b3855ae5853631ac09860) Co-authored-by: ovidiupopa07 <105648914+ovidiupopa07@users.noreply.github.com> --- .../netflix/spinnaker/config/PluginsAutoConfiguration.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kork-plugins/src/main/java/com/netflix/spinnaker/config/PluginsAutoConfiguration.java b/kork-plugins/src/main/java/com/netflix/spinnaker/config/PluginsAutoConfiguration.java index 16f039016..a43e40ac1 100644 --- a/kork-plugins/src/main/java/com/netflix/spinnaker/config/PluginsAutoConfiguration.java +++ b/kork-plugins/src/main/java/com/netflix/spinnaker/config/PluginsAutoConfiguration.java @@ -237,6 +237,10 @@ public static PluginInfoReleaseProvider pluginInfoReleaseProvider( /** Not a static bean - see {@link RemotePluginsConfiguration}. */ @Bean @Beta + @ConditionalOnProperty( + value = "spinnaker.extensibility.remote-plugins.cache.enabled", + havingValue = "true", + matchIfMissing = true) public RemotePluginInfoReleaseCache remotePluginInfoReleaseCache( Collection pluginInfoReleaseSources, SpringStrictPluginLoaderStatusProvider springStrictPluginLoaderStatusProvider,