-
Notifications
You must be signed in to change notification settings - Fork 8
Home
This is our fork of the Alertmanager. Its purpose is to help us move forward with both the Grafana and Alertmanager development by testing out features we might need with a higher degree of urgency than upstream (prometheus/alertmanager).
It is not meant to be a replacement for upstream but more of an avenue that encourages us to explore and feel more comfortable with the Alertmanager codebase.
When upgrading, we prefer to bring the main
branch up to date and then re-add our changes to our top. For this to work cleanly, we need each feature that has not been upstreamed yet to be compacted into a single commit that you can then cherry-pick through a pull request once you've fast-forwarded main
.
Let's go ahead and guide you step by step:
- Make sure your local copy of the main branch is up to date.
- Create a local copy of the main branch as backup by executing
$ git checkout main
and then$ git checkout -b main-backup
. - Create a branch for the current head of main by executing
git checkout -b main-$(git rev-parse HEAD | head -c 7)
and push it. This is required for Go modules, so older versions of Grafana can still be built. - In https://github.com/grafana/prometheus-alertmanager, click the "Sync fork" and make sure you discard all commits. These commits should match 1:1 the number of features we have not upstreamed yet and should still be on their dedicated feature branches. Refer to the list of feature branches to get an understanding of what feature branches you'll need to re-introduce.
- Now that
main
is in sync with upstream, we want to introduce our changes 1 by 1. - For each feature branch, re-create a pull request by cherry-picking the commit of the change into a new branch. Make sure to resolve conflicts as much as possible.
- Merge into
main
and ensure it is all squash into a single commit if there's more than one on the feature branch. - You're done 🎉 - you can now delete your backup of the main branch with
git branch -D main-backup
-
feature/errors-in-notifications
with https://github.com/grafana/prometheus-alertmanager/pull/31
When introducing a new feature that has not been upstreamed yet, please make sure to:
- You must introduce the whole feature via a single commit. You can spread the introduction of your feature across multiple commits if you'd like but please make sure that when merging the feature to
main
you introduce just a single commit. This enables a clean cherry-pick workflow later on. - You must document the feature on the "active feature branches" section to let the next person know what kind of changes they should add when they update the fork next.