Secrets: Reduce amount of feature toggle checks to only app entrypoint (#108110)
* Secrets: Reduce amount of feature toggle checks to only app entrypoint * Wire: Fix merge conflict * Wire: Fix merge conflict
This commit is contained in:
@@ -10,7 +10,6 @@ import (
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
|
||||
"github.com/grafana/grafana/pkg/registry/apis/secret/contracts"
|
||||
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
||||
"github.com/grafana/grafana/pkg/storage/unified/sql"
|
||||
"github.com/grafana/grafana/pkg/storage/unified/sql/sqltemplate"
|
||||
)
|
||||
@@ -24,12 +23,7 @@ var (
|
||||
func ProvideEncryptedValueStorage(
|
||||
db contracts.Database,
|
||||
tracer trace.Tracer,
|
||||
features featuremgmt.FeatureToggles,
|
||||
) (contracts.EncryptedValueStorage, error) {
|
||||
if !features.IsEnabledGlobally(featuremgmt.FlagSecretsManagementAppPlatform) {
|
||||
return &encryptedValStorage{}, nil
|
||||
}
|
||||
|
||||
return &encryptedValStorage{
|
||||
db: db,
|
||||
dialect: sqltemplate.DialectForDriver(db.DriverName()),
|
||||
|
||||
Reference in New Issue
Block a user