mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-21 01:20:05 +02:00
fix: address review comments - preserve tab delimiters in List and fix transitive needs cross-namespace resolution
1. exec.go List(): Filter empty lines without TrimSpace-ing non-empty lines, preserving trailing tab separators from helm list output. 2. state.go collectNeedsWithTransitives(): Resolve transitives by full ReleaseToID matching (via ID→ReleaseSpec map) instead of name-based matching, avoiding cross-namespace ambiguity when multiple releases share the same name. Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/94b03eb4-31e5-4d04-9959-eeaafb695855 Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
This commit is contained in:
co-authored by
yxxhero
parent
cd216c6ee9
commit
121fda4900
@@ -528,8 +528,8 @@ func (helm *execer) List(context HelmContext, filter string, flags ...string) (s
|
||||
lines := strings.Split(string(out), "\n")
|
||||
var filtered []string
|
||||
for _, line := range lines[1:] {
|
||||
if trimmed := strings.TrimSpace(line); trimmed != "" {
|
||||
filtered = append(filtered, trimmed)
|
||||
if strings.TrimSpace(line) != "" {
|
||||
filtered = append(filtered, line)
|
||||
}
|
||||
}
|
||||
out = []byte(strings.Join(filtered, "\n"))
|
||||
|
||||
Reference in New Issue
Block a user