From fd5bc6329389558227dc11ce9ad2ec33bb8c03af Mon Sep 17 00:00:00 2001 From: James Shubin Date: Sun, 25 May 2025 04:19:38 -0400 Subject: [PATCH] engine: traits: Allow self-kind with hierarchical grouping Not sure why I was blocking this previously, perhaps there was no use case, and I was trying to ensure there wasn't accidental, unwanted grouping? Perhaps I wanted to improve performance? In any case, let's turn this off for now, and check for bugs. --- engine/traits/autogroup.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/engine/traits/autogroup.go b/engine/traits/autogroup.go index 9dd4bbb0..860abd07 100644 --- a/engine/traits/autogroup.go +++ b/engine/traits/autogroup.go @@ -89,7 +89,11 @@ func (obj *Groupable) GroupRes(res engine.GroupableRes) error { ok = false // non-hierarchical grouping, error! } } - if !ok { + // XXX: Why is it not acceptable to allow hierarchical grouping, + // AND self-kind grouping together? For example, group + // http:server:flag with another flag, and then group that group + // inside http:server! + if !ok && false { // XXX: disabled this check for now... return fmt.Errorf("the `%s` resource already contains %d grouped resources", res, l) } }