fix: config adapters must not overwrite code-registered internal handlers
CI / CI (push) Failing after 7m40s
CI / CI (push) Failing after 7m40s
Config-loaded adapters (from gateway-config-secret.yaml) were overwriting code-registered workflow adapter that has internal Handler for JSON-to-gRPC translation. Now skips config adapters if serviceName already registered.
This commit is contained in:
+5
-1
@@ -108,8 +108,12 @@ func main() {
|
||||
}
|
||||
_ = registry.Add(notifAdapter)
|
||||
|
||||
// Add other adapters from config
|
||||
// Add other adapters from config (skip if already registered in code)
|
||||
for _, a := range cfg.Adapters {
|
||||
if existing := registry.Get(a.ServiceName); existing != nil {
|
||||
log.Printf("skip config adapter '%s': already registered with internal handler", a.ServiceName)
|
||||
continue
|
||||
}
|
||||
_ = registry.Add(a)
|
||||
}
|
||||
log.Printf("%d service adapters loaded", registry.Count())
|
||||
|
||||
Reference in New Issue
Block a user