diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3d23a75af..2af4908b6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -58,3 +58,15 @@ When running docker image via `make run-docker` with `DEBUG` make variable set to `true` volume mapping will be added (in read-only mode), so that unsee instance running inside the docker can read asset files from the sources directory. + +## Adding support for new Alertmanager release + +To support a new release that breaks API following changes needs to be done: + +* Verify that `GetVersion()` function can still correctly read remote + Alertmanager version via `/api/v1/status` endpoint, adapt it if needed. +* Create a new mapper package implementing unmarshaling of alerts and/or + silences (depending if both need a new code) under mapper/vXY (X major + Alertmanager version, Y minor version). +* Register new mapper in the `init()` function in the + `alertmanager/alertmanager.go` file.