Skip to content

Commit

Permalink
Remove plugin load / binding logging, per review comments.
Browse files Browse the repository at this point in the history
Signed-off-by: Edwin Buck <edwbuck@gmail.com>
  • Loading branch information
edwbuck committed Dec 3, 2024
1 parent 5ddf246 commit afe6263
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
7 changes: 0 additions & 7 deletions pkg/common/catalog/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,20 +181,16 @@ func Load(ctx context.Context, config *Config, repo Repository) (_ *Catalog, err
if err != nil {
return nil, err
}
log.Infof("bindablePluginRepos: %+v", pluginRepos)

serviceRepos, err := makeBindableServiceRepos(repo.Services())
if err != nil {
return nil, err
}
log.Infof("bindableServiceRepos: %+v", serviceRepos)

pluginCounts := make(map[string]int)
var reconfigurers Reconfigurers

for _, pluginConfig := range config.PluginConfigs {
log.Infof("plugin(%s): processing", pluginConfig.Name)

pluginLog := makePluginLog(config.Log, pluginConfig)

pluginRepo, ok := pluginRepos[pluginConfig.Type]
Expand All @@ -205,7 +201,6 @@ func Load(ctx context.Context, config *Config, repo Repository) (_ *Catalog, err
}
continue
}
log.Infof("plugin(%s): supported", pluginConfig.Name)

if pluginConfig.Disabled {
pluginLog.Debug("Not loading plugin; disabled")
Expand All @@ -227,7 +222,6 @@ func Load(ctx context.Context, config *Config, repo Repository) (_ *Catalog, err
// panic, etc.) we want the defer above to close the plugin. Failure to
// do so can orphan external plugin processes.
closers = append(closers, pluginCloser{plugin: plugin, log: pluginLog})
log.Infof("plugin(%s): loaded", pluginConfig.Name)

configurer, err := plugin.bindRepos(pluginRepo, serviceRepos)
if err != nil {
Expand All @@ -237,7 +231,6 @@ func Load(ctx context.Context, config *Config, repo Repository) (_ *Catalog, err
return nil, fmt.Errorf("failed to bind plugin %q: %w", pluginConfig.Name, err)
}
}
log.Infof("plugin(%s): bound, configurer %+v", pluginConfig.Name, configurer)

if !config.ValidateOnly {
reconfigurer, err := configurePlugin(ctx, pluginLog, config.CoreConfig, configurer, pluginConfig.DataSource)
Expand Down
2 changes: 0 additions & 2 deletions pkg/common/catalog/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,9 @@ func (p *pluginImpl) initFacade(facade Facade) any {

func (p *pluginImpl) bindRepos(pluginRepo bindablePluginRepo, serviceRepos []bindableServiceRepo) (Configurer, error) {
grpcServiceNames := grpcServiceNameSet(p.grpcServiceNames)
p.log.Infof("plugin %q binding repos", p.info.Name())

impl := p.bindRepo(pluginRepo, grpcServiceNames)
for _, serviceRepo := range serviceRepos {
p.log.Infof("plugin %q binding repo %+v", p.info.Name(), serviceRepo)
p.bindRepo(serviceRepo, grpcServiceNames)
}

Expand Down

0 comments on commit afe6263

Please sign in to comment.