1
0
mirror of https://github.com/prometheus/alertmanager.git synced 2026-02-05 15:45:34 +01:00
Files
alertmanager/cli
Guido Trotter da9f50c540 Fix erroneous channels close (#4733)
* 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>
2025-11-14 07:56:00 +01:00
..
2024-03-21 11:26:46 +00:00
2021-12-22 14:03:53 +01:00
2024-03-21 11:26:46 +00:00
2024-03-21 11:26:46 +00:00
2024-03-21 11:26:46 +00:00
2025-08-05 19:47:33 +02:00
2023-12-08 16:44:13 +01:00
2024-03-21 11:26:46 +00:00
2024-03-21 11:26:46 +00:00