FS: Call IndexDataHooks for custom version string (#112670)

* Add enterprise hooks

* wip...

* undo

* update wire gen

* remove old hook thing

* move build info into seperate func

* align fs context middleware with grafana, setting SignedInUser

* Call IndexDataHooks to get modified build info

* update tests

* go workspace

* idk, reset workspace files or whatever

* conditionally mount license

* support loading decoupled plugins from cdn

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
This commit is contained in:
Josh Hunt
2025-10-24 11:04:44 +01:00
committed by GitHub
co-authored by Ashley Harrison
parent 71d10a3fa3
commit bb6d7d02c7
11 changed files with 196 additions and 39 deletions
+5 -1
View File
@@ -27,6 +27,8 @@ import (
"github.com/grafana/grafana/pkg/infra/tracing"
"github.com/grafana/grafana/pkg/modules"
"github.com/grafana/grafana/pkg/services/featuremgmt"
"github.com/grafana/grafana/pkg/services/hooks"
"github.com/grafana/grafana/pkg/services/licensing"
"github.com/grafana/grafana/pkg/services/sqlstore/sqlutil"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/storage/unified/resource"
@@ -330,8 +332,10 @@ func initModuleServerForTest(
apiOpts api.ServerOptions,
) testModuleServer {
tracer := tracing.InitializeTracerForTest()
hooksService := hooks.ProvideService()
license := &licensing.OSSLicensingService{}
ms, err := NewModule(opts, apiOpts, featuremgmt.WithFeatures(featuremgmt.FlagUnifiedStorageSearch), cfg, nil, nil, prometheus.NewRegistry(), prometheus.DefaultGatherer, tracer, nil, ProvideNoopModuleRegisterer(), nil)
ms, err := NewModule(opts, apiOpts, featuremgmt.WithFeatures(featuremgmt.FlagUnifiedStorageSearch), cfg, nil, nil, prometheus.NewRegistry(), prometheus.DefaultGatherer, tracer, license, ProvideNoopModuleRegisterer(), nil, hooksService)
require.NoError(t, err)
conn, err := grpc.NewClient(cfg.GRPCServer.Address,