mirror of
https://github.com/prometheus/alertmanager.git
synced 2026-02-05 15:45:34 +01:00
* Fix erroneous channels close while we did fix the goroutine leak at bulk import, in case of errors, unfortunately we broke the non-error path, since the silence channel needed to be closed, so that addSilenceWorker would terminate the loop, and and wg.Wait would work solve this by having just one cleanup function, that gets called on defer, but also manually before returning, ensuring the error count is correct, and all workers have indeed been collected. Fixes issue introduced in https://github.com/prometheus/alertmanager/pull/4556 Signed-off-by: Guido Trotter <guido@hudson-trading.com> * Add import silence cli tests Signed-off-by: Guido Trotter <guido@hudson-trading.com> --------- Signed-off-by: Guido Trotter <guido@hudson-trading.com> Co-authored-by: Guido Trotter <guido@hudson-trading.com>