mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 20:52:34 +08:00
Codegen: Remove pfs codegen dependency from Grafana codebase (#98840)
* Remove pfs dependency for IAM struct to avoid to import codegen code in main go.mod * Remove pointer * Remove dependency cycle * Update tests
This commit is contained in:
@ -13,7 +13,6 @@ import (
|
||||
"github.com/grafana/grafana/pkg/infra/tracing"
|
||||
"github.com/grafana/grafana/pkg/plugins"
|
||||
"github.com/grafana/grafana/pkg/plugins/auth"
|
||||
"github.com/grafana/grafana/pkg/plugins/codegen/pfs"
|
||||
"github.com/grafana/grafana/pkg/plugins/config"
|
||||
"github.com/grafana/grafana/pkg/plugins/log"
|
||||
"github.com/grafana/grafana/pkg/plugins/manager/pipeline/initialization"
|
||||
@ -57,7 +56,7 @@ func (r *ExternalServiceRegistration) Register(ctx context.Context, p *plugins.P
|
||||
|
||||
ctxLogger := r.log.FromContext(ctx)
|
||||
|
||||
s, err := r.externalServiceRegistry.RegisterExternalService(ctx, p.ID, pfs.Type(p.Type), p.IAM)
|
||||
s, err := r.externalServiceRegistry.RegisterExternalService(ctx, p.ID, string(p.Type), p.IAM)
|
||||
if err != nil {
|
||||
ctxLogger.Error("Could not register an external service. Initialization skipped", "pluginId", p.ID, "error", err)
|
||||
span.SetStatus(codes.Error, fmt.Sprintf("could not register external service: %v", err))
|
||||
|
Reference in New Issue
Block a user