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:
Giuseppe Guerra
2025-02-07 11:07:08 +01:00
committed by GitHub
parent e291140be3
commit ccb9cab131
16 changed files with 105 additions and 22 deletions
@@ -1575,7 +1575,7 @@ func newLoader(t *testing.T, cfg *config.PluginManagementCfg, reg registry.Servi
terminate, err := pipeline.ProvideTerminationStage(cfg, reg, proc)
require.NoError(t, err)
return ProvideService(pipeline.ProvideDiscoveryStage(cfg,
return ProvideService(cfg, pipeline.ProvideDiscoveryStage(cfg,
finder.NewLocalFinder(false), reg),
pipeline.ProvideBootstrapStage(cfg, signature.DefaultCalculator(cfg), assets),
pipeline.ProvideValidationStage(cfg, signature.NewValidator(signature.NewUnsignedAuthorizer(cfg)), angularInspector),
@@ -1607,7 +1607,7 @@ func newLoaderWithOpts(t *testing.T, cfg *config.PluginManagementCfg, opts loade
backendFactoryProvider = fakes.NewFakeBackendProcessProvider()
}
return ProvideService(pipeline.ProvideDiscoveryStage(cfg,
return ProvideService(cfg, pipeline.ProvideDiscoveryStage(cfg,
finder.NewLocalFinder(false), reg),
pipeline.ProvideBootstrapStage(cfg, signature.DefaultCalculator(cfg), assets),
pipeline.ProvideValidationStage(cfg, signature.NewValidator(signature.NewUnsignedAuthorizer(cfg)), angularInspector),