mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 02:31:50 +08:00
Plugins: Fix scanning plugins when permission for directories is lacking (#44587)
Fixes so that errors (directory not exists, no permission) when scanning plugins are logged as errors rather than with debug level. In addition, before the scanning would halt in case of referenced errors, but with these changes the scanning will continue. If any other error than the referenced error happens the scanning for specific directory would halt and return the error, e.g. stop Grafana from starting. Fixes #43012
This commit is contained in:

committed by
GitHub

parent
5a5f5cacc8
commit
333de57999
@ -62,7 +62,7 @@ func New(cfg *plugins.Cfg, license models.Licensing, authorizer plugins.PluginLo
|
||||
func (l *Loader) Load(ctx context.Context, class plugins.Class, paths []string, ignore map[string]struct{}) ([]*plugins.Plugin, error) {
|
||||
pluginJSONPaths, err := l.pluginFinder.Find(paths)
|
||||
if err != nil {
|
||||
l.log.Error("plugin finder encountered an error", "err", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return l.loadPlugins(ctx, class, pluginJSONPaths, ignore)
|
||||
|
Reference in New Issue
Block a user