Skip to content
Snippets Groups Projects
Unverified Commit f3e3bce8 authored by Timo Furrer's avatar Timo Furrer
Browse files

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
parent f8fd65a7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment