Guard against Kustomization tree cycles - #6000
Conversation
Track Kustomizations in the active traversal path so cyclic inventories stop before issuing repeated API requests. Add a golden regression test for a two-object inventory cycle. Assisted-by: codex/gpt-5 Signed-off-by: Akash Kumar <meakash7902@gmail.com>
|
Hi @AkashKumar7902, or even graphs where multiple cycles are interconnected, for example: or: or a graph with nested/overlapping cycles: Those are usually much harder to detect correctly than the trivial two-node case. |
Closes #5998
What
Guard
flux tree kustomizationrecursion with the current traversalpath. Cyclic inventory paths now stop at an ancestor instead of querying
the API server until the command times out.
Path-local tracking keeps shared non-cyclic subtrees traversable under
independent branches.
Tests
make tidy fmt vet && make testLocal testing
fluxfrome8594afcd6c29c9a573464892d0c645c1e2cdf65.two-object Kustomization inventory cycle. The base binary exited 1 at
the two-second timeout; the candidate exited 0 and printed
cycle-afollowed by
cycle-bonce each.Assisted-by: codex/gpt-5