Closed bigkevmcd closed 1 year ago
Make sense, do we do this at the top level too? 👀
Make sense, do we do this at the top level too? 👀
We kind of do, we wouldn't generate anything there.
This is an issue at the Matrix level, because it complicates the logic when trying to figure out if either of the two combined elements are empty when merging elements to reduce duplicates.
Ah yeah, didn't read through the panic. Good one
│ manager github.com/weaveworks/gitopssets-controller/controllers/templates/generators/matrix.cartesian({0xc0002ccdc0?, 0x2, 0x0?}) │
We kind of do, we wouldn't generate anything there.
Would iterate over empty list:
We kind of do, we wouldn't generate anything there.
Would iterate over empty list:
Yeah, so nothing generated.
The issue is down to this https://github.com/weaveworks/gitopssets-controller/blob/main/controllers/templates/generators/matrix/matrix.go#L207-L209
It's a bit icky to determine whether or not either j or k are greater than their respective slice sizes, because even at 0
that's really size 1.
If generator doesn't yield any resources, then this will avoid generating from them.
Fixes #112