From a95005eab5f9616a05abd72bf378e288f44e1a7e Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Thu, 30 Jan 2025 17:42:48 +0100 Subject: [PATCH] Zanzana: Disable broken OpenFGA health check (#99818) * Zanzana: Disable broken OpenFGA health check * simplify return Co-authored-by: Gabriel MABILLE --------- Co-authored-by: Gabriel MABILLE --- pkg/services/authz/zanzana/server/server.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/services/authz/zanzana/server/server.go b/pkg/services/authz/zanzana/server/server.go index 6826b2b936f..891d13cb74b 100644 --- a/pkg/services/authz/zanzana/server/server.go +++ b/pkg/services/authz/zanzana/server/server.go @@ -10,6 +10,7 @@ import ( authzv1 "github.com/grafana/authlib/authz/proto/v1" openfgav1 "github.com/openfga/api/proto/openfga/v1" "go.opentelemetry.io/otel" + "google.golang.org/protobuf/types/known/wrapperspb" dashboardalpha1 "github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1" "github.com/grafana/grafana/pkg/infra/localcache" @@ -69,7 +70,12 @@ func NewServer(cfg setting.ZanzanaServerSettings, openfga OpenFGAServer, logger } func (s *Server) IsHealthy(ctx context.Context) (bool, error) { - return s.openfga.IsReady(ctx) + // FIXME: get back to openfga.IsReady() when issue is fixed + // https://github.com/openfga/openfga/issues/2251 + _, err := s.openfga.ListStores(ctx, &openfgav1.ListStoresRequest{ + PageSize: wrapperspb.Int32(1), + }) + return err == nil, nil } func (s *Server) getContextuals(ctx context.Context, subject string) (*openfgav1.ContextualTupleKeys, error) {