From 806c46f5086dc1830933f6cd0809d6f3b85c4f85 Mon Sep 17 00:00:00 2001 From: "gcp-cherry-pick-bot[bot]" <98988430+gcp-cherry-pick-bot[bot]@users.noreply.github.com> Date: Tue, 1 Aug 2023 09:07:47 -0700 Subject: [PATCH] fix: ManagedResources API should not return diff for hooks (#14816) (#14830) Signed-off-by: Alexander Matyushentsev Co-authored-by: Alexander Matyushentsev --- server/application/application.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/application/application.go b/server/application/application.go index 66908fdae7096..fe9697dc77056 100644 --- a/server/application/application.go +++ b/server/application/application.go @@ -1486,7 +1486,7 @@ func (s *Server) ManagedResources(ctx context.Context, q *application.ResourcesQ res := &application.ManagedResourcesResponse{} for i := range items { item := items[i] - if isMatchingResource(q, kube.ResourceKey{Name: item.Name, Namespace: item.Namespace, Kind: item.Kind, Group: item.Group}) { + if !item.Hook && isMatchingResource(q, kube.ResourceKey{Name: item.Name, Namespace: item.Namespace, Kind: item.Kind, Group: item.Group}) { res.Items = append(res.Items, item) } }