From 9cd32c1e915a3218d54230178ef9cdaf3a52c17f Mon Sep 17 00:00:00 2001 From: Rohit Gudi <50377477+caretak3r@users.noreply.github.com> Date: Tue, 7 Jul 2026 09:18:42 -0400 Subject: [PATCH] fix(hip-0025): show unresolved subchart batches in dag; hoist annotation keys Address Copilot review on PR #32038: - dag.go: printChild returned early for subcharts whose chart metadata is unavailable (storage-decoded charts at rollback/uninstall), hiding the structural resource-group batches buildStructuralLevel generates. Print an accurate note and still recurse into the structural child level. The old 'not found in chart dependencies' message was also misleading. - sequencing.go: hoist HelmInternalSequencingAnnotations() out of the per-resource Visit closure so the slice is cloned once per batch. --- pkg/action/sequencing.go | 3 ++- pkg/cmd/dag.go | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/action/sequencing.go b/pkg/action/sequencing.go index 72851a90a..605f2844c 100644 --- a/pkg/action/sequencing.go +++ b/pkg/action/sequencing.go @@ -201,6 +201,7 @@ func (s *sequencedDeployment) applyBatch(ctx context.Context, batch sequence.Bat // resources before they are applied to Kubernetes. This prevents K8s API // validation errors for annotation keys that are not valid K8s label keys. func stripSequencingAnnotations(resources kube.ResourceList) error { + sequencingKeys := releaseutil.HelmInternalSequencingAnnotations() return resources.Visit(func(info *resource.Info, err error) error { if err != nil { return err @@ -214,7 +215,7 @@ func stripSequencingAnnotations(resources kube.ResourceList) error { return nil } changed := false - for _, key := range releaseutil.HelmInternalSequencingAnnotations() { + for _, key := range sequencingKeys { if _, exists := annotations[key]; exists { delete(annotations, key) changed = true diff --git a/pkg/cmd/dag.go b/pkg/cmd/dag.go index 45cff74b2..597d409ed 100644 --- a/pkg/cmd/dag.go +++ b/pkg/cmd/dag.go @@ -194,8 +194,7 @@ func printSequencingDAG(chrt *chart.Chart, manifest string, out io.Writer) error printChild := func(name string) { if slices.Contains(level.Unresolved, name) { - fmt.Fprintf(out, "%s (subchart %q not found in chart dependencies)\n", indent, name) - return + fmt.Fprintf(out, "%s (subchart %q metadata unavailable; sequenced structurally from manifests)\n", indent, name) } if child := levelByPath[level.Path+"/charts/"+name]; child != nil { printLevel(child)