fix: address review feedback - remove WriteValuesImpl overrides, optimize debug log, add direct-only needs test

Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/c0b910d1-387a-476e-beb9-ea38ab6c1061
This commit is contained in:
copilot-swe-agent[bot]
2026-03-24 23:30:07 +00:00
co-authored by yxxhero
parent fd9c2179fc
commit 4fada4f73c
3 changed files with 23 additions and 16 deletions
+10 -4
View File
@@ -1617,11 +1617,17 @@ func (a *App) getSelectedReleases(r *Run, includeNeeds bool, includeTransitiveNe
extra = " matching " + strings.Join(r.state.Selectors, ",")
}
matchedOnly, err := r.state.GetSelectedReleases(false, false)
if err != nil {
return nil, nil, err
// When needs are included, we need a separate count of just the selector-matched releases
// for the debug log, so we don't count the included needs in the "found" message.
matchCount := len(selected)
if includeNeeds || includeTransitiveNeeds {
matchedOnly, err := r.state.GetSelectedReleases(false, false)
if err != nil {
return nil, nil, err
}
matchCount = len(matchedOnly)
}
a.Logger.Debugf("%d release(s)%s found in %s\n", len(matchedOnly), extra, r.state.FilePath)
a.Logger.Debugf("%d release(s)%s found in %s\n", matchCount, extra, r.state.FilePath)
return selected, deduplicated, nil
}