prometheus / prometheus/alertmanager

Improve actor lifecycle / shutdown management in main.go

Open
#2,906 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/cleanup stale
Dominant language
Go
Stars
8.6k
Forks
2.5k
Avg merge
2d 6h
Merged PRs (30d)
61

Description

See https://github.com/prometheus/alertmanager/pull/2897#pullrequestreview-959181763. There are currently some actors / goroutines that are shut down upon exit via the stopc channel, but some others (like mem.Alerts) are shut down differently, and yet others (like the Dispatcher) aren't shut down properly at all. This could be made more consistent.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in main.go and review the discussion in PR 2897, then trace the shutdown paths using stopc, mem.Alerts, and Dispatcher as the named examples. Done means the actor and goroutine shutdown behavior is made consistent across these cases, with no actors left improperly shut down.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.