Skip to content

Commit

Permalink
Log grant expansion progress. (#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggreer authored Dec 18, 2024
1 parent a148571 commit 956dc59
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/sync/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,7 @@ func (s *syncer) SyncGrantExpansion(ctx context.Context) error {
return err
}
} else {
l.Info("Finished loading entitlement graph", zap.Int("edges", len(entitlementGraph.Edges)))
entitlementGraph.Loaded = true
}

Expand Down Expand Up @@ -1427,6 +1428,11 @@ func (s *syncer) expandGrantsForEntitlements(ctx context.Context) error {
l = l.With(zap.Int("depth", graph.Depth))
l.Debug("expandGrantsForEntitlements: start", zap.Any("graph", graph))

actions := len(graph.Actions)
if actions%250 == 0 || actions < 10 {
l.Info("Expanding grants", zap.Int("actions", actions))
}

actionsDone, err := s.runGrantExpandActions(ctx)
if err != nil {
l.Error("expandGrantsForEntitlements: error running graph actions", zap.Error(err))
Expand Down

0 comments on commit 956dc59

Please sign in to comment.