mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 06:32:17 +08:00
Plugins: Add synchronous CDN plugin loader (#99096)
* WIP * Run plugin validations and validation steps sequentially if feature is off * Remove dependency between sources.Service and pluginscdn.Service * lint * Parallelize validation only if class is CDN * re-generate feature toggles * remove waitgroup usage * PR review: Add loader concurrency limit setting * re-generate feature toggles * pr review feedback * fix const name * Skip module.js validation for cdn plugins * do not run validation steps in parallel * lint * reduce diff * re-generate feature toggles * lint * pr review feedback * remove leftover config.PluginManagementCfg from sources.Service
This commit is contained in:
@ -57,6 +57,11 @@ func newModuleJSValidator() *ModuleJSValidator {
|
||||
}
|
||||
|
||||
func (v *ModuleJSValidator) Validate(_ context.Context, p *plugins.Plugin) error {
|
||||
// CDN plugins are ignored because the module.js is guaranteed to exist
|
||||
if p.Class == plugins.ClassCDN {
|
||||
return nil
|
||||
}
|
||||
|
||||
if !p.IsRenderer() && !p.IsCorePlugin() {
|
||||
f, err := p.FS.Open("module.js")
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user