Loading
feat(cmd): construct the GLAZ client in the composition root
What
Wire the GLAZ authorization client into the composition root (assembleApp), mirroring wireIAM. No request-path consumer yet — this constructs the client so the authorization assembly (a follow-up MR) can inject it, and proves the IAM and GLAZ clients coexist in one binary.
Stacked on !951 (merged) (bmarjanovic/glaz-proto-path) — without the relationships descriptor-path fix, linking both clients panics at init. Target branch is the proto-fix branch so this diff is wireGLAZ-only; it retargets to main once !951 (merged) merges.
Changes
wire_glaz.go:glazClientinterface (glaz.Checker+Close), anewGLAZClientfactory on the injectablebootDepsseam,wireGLAZconstructing fromconfig.GLAZ, and aglazShutdownapp.Component that closes the gRPC connection.wire.go:newGLAZClientadded tobootDeps/defaultBootDeps;wireGLAZinvoked fromwireServices.- No absent-block no-op (the co-located sidecar always has a loopback default), no metrics (the loopback client carries none), no readiness gate (the authz hop is on every request — same reasoning as
wireIAM).
Testing
wire_glaz_test.go: constructs with defaults, maps a configured address/timeout through, fails boot on a construction error, and theglazShutdownlifecycle (Start no-op, Shutdown closes + wraps).- The app now boots with both clients linked (regression-guarded in !951 (merged));
go build ./..., the cmd wire tests, andgolangci-lintare green.
Related to gitlab-org/gitlab#605903 (closed)