Skip to content

Commit

Permalink
backend: plugins: Remove .plugins from watch list
Browse files Browse the repository at this point in the history
This fix prevents the development app (when running npm run dev-only-app) from watching for static plugins locally, which causes an endless loop of refreshes to the app.

Fixes: #1937

Signed-off-by: Evangelos Skopelitis <eskopelitis@microsoft.com>
  • Loading branch information
skoeva committed May 1, 2024
1 parent ce248d6 commit a7149b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/cmd/headlamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ func createHeadlampHandler(config *HeadlampConfig) http.Handler {

plugins.PopulatePluginsCache(config.staticPluginDir, config.pluginDir, config.cache)

if !config.useInCluster {
if !config.useInCluster && config.staticPluginDir != "" {
// in-cluster mode is unlikely to want reloading plugins.
pluginEventChan := make(chan string)
go plugins.Watch(config.pluginDir, pluginEventChan)
Expand Down

0 comments on commit a7149b2

Please sign in to comment.