Fix agentk panic in when leader module errors
The problem was that `nilableCfg` channel was still assigned to a closed `w.cfg2module` channel after a leader module stop (via `w.stop()`). This caused an attempt to either send `nil` or an agent configuration to the `nilableCfg` channel which was `nil` at that point causing the panic. This problem only appears for leader modules that return from `Run` before it's signaled to stop (known one is the `remote_development` module) - which is a breach of contract, but anyways, agentk musn't panic in that case and gracefully continue to run. Closes https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent/-/issues/434
Please register or sign in to comment