From 453e86878cc07dd8c276aa23725a2be900641064 Mon Sep 17 00:00:00 2001 From: Lyndon Shi Date: Fri, 13 Oct 2023 23:05:18 -0700 Subject: [PATCH] Add comment Signed-off-by: Lyndon Shi --- pkg/action/hooks.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/action/hooks.go b/pkg/action/hooks.go index 8535acbcb..aa12c5737 100644 --- a/pkg/action/hooks.go +++ b/pkg/action/hooks.go @@ -115,6 +115,7 @@ func (x hookByWeight) Len() int { return len(x) } func (x hookByWeight) Swap(i, j int) { x[i], x[j] = x[j], x[i] } func (x hookByWeight) Less(i, j int) bool { if x[i].Weight == x[j].Weight { + // It's safe to assume that we can use InstallOrder as hooks will be creating resources. ordering := make(map[string]int, len(releaseutil.InstallOrder)) for v, k := range releaseutil.InstallOrder { ordering[k] = v