From 4ee5b45cb88b7b7e84474a49c6e988cedfb15c73 Mon Sep 17 00:00:00 2001 From: jochen Date: Sat, 14 Nov 2026 20:24:10 +0100 Subject: [PATCH] Grants: say each consumer it creates, and once each it cannot create: which bookmarks exist was readable only on the bus --- modules/mesh-grants/internal/grants/consumers.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/mesh-grants/internal/grants/consumers.go b/modules/mesh-grants/internal/grants/consumers.go index c3ee1029..3934107f 100644 --- a/modules/mesh-grants/internal/grants/consumers.go +++ b/modules/mesh-grants/internal/grants/consumers.go @@ -190,11 +190,21 @@ func (p *Part) consumers(res *Result, recs buscompose.Records, match string) { switch err := p.Consumers.CreateConsumer(stream, buscompose.ConsumerConfig(c)); { case err == nil: st.Created = append(st.Created, key) + if p.Logf != nil { + p.Logf("consumer %s created", key) + } p.say(res, EventAsserted, map[string]any{"consumer": c.Name, "stream": stream}) case errors.Is(err, ErrHeld): default: st.Missing = append(st.Missing, key) st.NotCreated = append(st.NotCreated, key+": "+err.Error()) + if p.Logf != nil && p.filterRefused[key] != "create: "+err.Error() { + p.Logf("consumer %s is not created: %v", key, err) + if p.filterRefused == nil { + p.filterRefused = map[string]string{} + } + p.filterRefused[key] = "create: " + err.Error() + } } } }