detached 83b82b4

fix(eventbus): attach logger to bus context so handlers get a working logger

The event bus created its context from context.Background() without
attaching the zerowrap logger. Any handler using zerowrap.FromCtx(ctx)
got a no-op logger, silently swallowing all log output. Now the bus
injects its logger via zerowrap.WithCtx so handler logs are visible.
commit
83b82b46fd56b92f1eb482ecda76127550809040
author
brice · · 2026-03-19 08:51 UTC
parent
2b4c159
signature
unsigned
2 files · +10 -2
M internal/adapters/out/eventbus/inmemory.go +1 -1
@@ -44,7 +44,7 @@ func NewInMemory(bufferSize int, log zerowrap.Logger) *InMemory {
4444 bufferSize = 100
4545 }
4646
47- ctx, cancel := context.WithCancel(context.Background())
47+ ctx, cancel := context.WithCancel(zerowrap.WithCtx(context.Background(), log))
4848
4949 return &InMemory{
5050 handlers: make([]out.EventHandler, 0),
@@ -44,7 +44,7 @@ func NewInMemory(bufferSize int, log zerowrap.Logger) *InMemory {
44 bufferSize = 10044 bufferSize = 100
45 }45 }
46 46
47- ctx, cancel := context.WithCancel(context.Background())47+ ctx, cancel := context.WithCancel(zerowrap.WithCtx(context.Background(), log))
48 48
49 return &InMemory{49 return &InMemory{
50 handlers: make([]out.EventHandler, 0),50 handlers: make([]out.EventHandler, 0),
M internal/usecase/auto/dispatcher.go +9 -1
@@ -48,7 +48,15 @@ func (d *ImagePushDispatcher) Handle(ctx context.Context, event domain.Event) er
4848 return d.routeHandler.Handle(ctx, event)
4949 }
5050
51- if d.config.IsPreviewEnabled() && d.matchesTagPatterns(payload.Reference) {
51+ previewEnabled := d.config.IsPreviewEnabled()
52+ tagMatch := d.matchesTagPatterns(payload.Reference)
53+ log.Debug().
54+ Bool("preview_enabled", previewEnabled).
55+ Bool("tag_match", tagMatch).
56+ Str("reference", payload.Reference).
57+ Msg("dispatcher classifying push event")
58+
59+ if previewEnabled && tagMatch {
5260 return d.previewHandler.Handle(ctx, event)
5361 }
5462 return d.routeHandler.Handle(ctx, event)
@@ -48,7 +48,15 @@ func (d *ImagePushDispatcher) Handle(ctx context.Context, event domain.Event) er
48 return d.routeHandler.Handle(ctx, event)48 return d.routeHandler.Handle(ctx, event)
49 }49 }
50 50
51- if d.config.IsPreviewEnabled() && d.matchesTagPatterns(payload.Reference) {51+ previewEnabled := d.config.IsPreviewEnabled()
52+ tagMatch := d.matchesTagPatterns(payload.Reference)
53+ log.Debug().
54+ Bool("preview_enabled", previewEnabled).
55+ Bool("tag_match", tagMatch).
56+ Str("reference", payload.Reference).
57+ Msg("dispatcher classifying push event")
58+
59+ if previewEnabled && tagMatch {
52 return d.previewHandler.Handle(ctx, event)60 return d.previewHandler.Handle(ctx, event)
53 }61 }
54 return d.routeHandler.Handle(ctx, event)62 return d.routeHandler.Handle(ctx, event)

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close