fix: include-needs should only include direct dependencies, not transitive

- Fix collectDirectNeedsOnly to correctly match needs by full ID
- Fix PlanReleases to respect SelectedReleases when provided
- Fix unmarkNeedsDirectOnly to use full release IDs
- Update tests to expect correct behavior for include-needs vs include-transitive-needs
- Add SkipNeeds flag when needs are pre-included in withNeeds

This fixes CI issues in PR #2485

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2026-03-18 08:25:32 +08:00
committed by yxxhero
parent 3815ce1143
commit 2542988fbc
44 changed files with 288 additions and 239 deletions
@@ -29,11 +29,15 @@ Affected releases are:
serviceB (my/chart) UPDATED
serviceC (my/chart) UPDATED
invoking preapply hooks for 1 groups of releases in this order:
invoking preapply hooks for 3 groups of releases in this order:
GROUP RELEASES
1 default//serviceA
2 default//serviceB
3 default//serviceC
invoking preapply hooks for releases in group 1/1: default//serviceA
invoking preapply hooks for releases in group 1/3: default//serviceA
invoking preapply hooks for releases in group 2/3: default//serviceB
invoking preapply hooks for releases in group 3/3: default//serviceC
processing 3 groups of releases in this order:
GROUP RELEASES
1 default//serviceC