mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
cd: drop the two informers the notification subsystem left behind
v3.6.0-.2 could not start. hanzocd-server crash-looped:
fatal: Recovered from panic: nil pointer dereference
server.(*ArgoCDServer).Init -> server/server.go:554
configMapInformer and secretInformer were declared on the struct and Run() in
Init(), but never assigned anywhere in the repo. b2d7140a (delete the
notification subsystem) removed their construction —
secretInformer := k8s.NewSecretInformer(..., "cd-notifications-secret")
configMapInformer := k8s.NewConfigMapInformer(..., "cd-notifications-cm")
— which fed api.NewFactory for notifications and nothing else. The fields and
the two Run() calls survived the deletion, so both were nil at boot.
Deleted rather than reconstructed: they watched notification config, and there
is no notification subsystem to configure. We use hanzoai/notify.
Worth naming the class, because it is the third time tonight: a nil interface
field is valid Go, so `go build ./...` passed clean and said nothing. Same
shape as the Register* seams and the mounted globals — it compiles, and it
yields the zero value.
The "secret key does not exist in secret" warning on the preceding line is
unrelated; hanzocd-secret carries all five keys and works on sha-e1b9244.
Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
@@ -204,8 +204,6 @@ type ArgoCDServer struct {
|
||||
indexData []byte
|
||||
indexDataErr error
|
||||
staticAssets http.FileSystem
|
||||
secretInformer cache.SharedIndexInformer
|
||||
configMapInformer cache.SharedIndexInformer
|
||||
serviceSet *ArgoCDServiceSet
|
||||
extensionManager *extension.Manager
|
||||
Shutdown func()
|
||||
@@ -551,8 +549,6 @@ func (server *ArgoCDServer) Init(ctx context.Context) {
|
||||
go server.appInformer.Run(ctx.Done())
|
||||
go server.appsetInformer.Run(ctx.Done())
|
||||
go server.clusterInformer.Run(ctx.Done())
|
||||
go server.configMapInformer.Run(ctx.Done())
|
||||
go server.secretInformer.Run(ctx.Done())
|
||||
}
|
||||
|
||||
// Run runs the API Server
|
||||
|
||||
Reference in New Issue
Block a user