Skip to content

Commit

Permalink
Merge pull request #2353 from hankfreund/expander_logs_test
Browse files Browse the repository at this point in the history
Fix panic when enabling expander debug logs.
  • Loading branch information
google-oss-prow[bot] authored Jul 24, 2024
2 parents 257c928 + daf8750 commit 59b46c1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ func (r *ExpanderReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c
if expanderDebugLogsEnabled {
r.Recorder.Event(&inputcr, "Normal", fmt.Sprintf("Finished expander stage %d: %s", index, expander), expanderDebugLog(&inputcr)+fmt.Sprintf("---resource count: %d", applier.Count()))
for i, resourceStatus := range newStatus.Stages[expander].LastApplied {
logger.Info("Resource %d, Resource name: %s, resource namespace: %s, resource gvk: %s %s %s, resource status: %s",
i, resourceStatus.Name, resourceStatus.Namespace, resourceStatus.Group, resourceStatus.Version, resourceStatus.Kind, resourceStatus.Health)
logger.Info("Expander debug logs", "Resource", i, "Name", resourceStatus.Name, "Namespace", resourceStatus.Namespace, "Group",
resourceStatus.Group, "Version", resourceStatus.Version, "Kind", resourceStatus.Kind, "Status", resourceStatus.Health)
}
}
}
Expand Down

0 comments on commit 59b46c1

Please sign in to comment.