From c23bb3695688a98102a213b5b3dc63b022a8c7d8 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Wed, 5 Mar 2025 15:24:58 +0100 Subject: [PATCH] Zanzana: Fix health check endpoint (#101612) --- pkg/services/authz/zanzana/server/server.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pkg/services/authz/zanzana/server/server.go b/pkg/services/authz/zanzana/server/server.go index 9ec9a79c735..a0ae53af4d2 100644 --- a/pkg/services/authz/zanzana/server/server.go +++ b/pkg/services/authz/zanzana/server/server.go @@ -9,7 +9,6 @@ import ( "github.com/fullstorydev/grpchan/inprocgrpc" authzv1 "github.com/grafana/authlib/authz/proto/v1" openfgav1 "github.com/openfga/api/proto/openfga/v1" - "google.golang.org/protobuf/types/known/wrapperspb" dashboardalpha1 "github.com/grafana/grafana/pkg/apis/dashboard/v2alpha1" "github.com/grafana/grafana/pkg/infra/localcache" @@ -71,12 +70,7 @@ func NewServer(cfg setting.ZanzanaServerSettings, openfga OpenFGAServer, logger } func (s *Server) IsHealthy(ctx context.Context) (bool, error) { - // 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 + return s.openfga.IsReady(ctx) } func (s *Server) getContextuals(subject string) (*openfgav1.ContextualTupleKeys, error) {