Chore: Replace core plugins as external warning (#81877)

This commit is contained in:
Andres Martinez Gotor
2024-02-07 16:17:13 +02:00
committed by GitHub
parent 114e9e90f3
commit 26bc87b60e
6 changed files with 101 additions and 42 deletions
@@ -193,26 +193,5 @@ func (c *AsExternal) Filter(cl plugins.Class, bundles []*plugins.FoundBundle) ([
}
return res, nil
}
if cl == plugins.ClassExternal {
// Warn if the plugin is not found in the external plugins directory.
asExternal := map[string]bool{}
for pluginID, pluginCfg := range c.cfg.PluginSettings {
if pluginCfg["as_external"] == "true" {
asExternal[pluginID] = true
}
}
for _, bundle := range bundles {
if asExternal[bundle.Primary.JSONData.ID] {
delete(asExternal, bundle.Primary.JSONData.ID)
}
}
if len(asExternal) > 0 {
for p := range asExternal {
c.log.Error("Core plugin expected to be loaded as external, but it is missing", "pluginID", p)
}
}
}
return bundles, nil
}