Repository navigation
Omit zero end times from Alertmanager notifications - #1946
Merged
binwiederhier merged 1 commit intoOct 7, 2026
Merged
binwiederhier merged 1 commit into
binwiederhier merged 1 commit into
Conversation
Owner
|
thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
The built-in Alertmanager template treats the zero
endsAtvalue on firing alerts as a real end time. Its whitespace trim also joins a resolved alert's start and end timestamps onto one line.Fixes #1940
Changes
Ends at:only whenendsAtis present and nonzero.User impact
Firing notifications no longer show a year-one end timestamp, while resolved notifications show their end timestamp on a separate line.
Verification
10cb6506withStarts at: 2025-07-17T07:00:00ZEnds at: 0001-01-01T00:00:00Zand passes with this change.go vet ./server— passed.go mod tidy— no module changes.make template-checkwith Go 1.27.0 — passed.gofmt -l server/server_test.go— no output.go test ./... -count=1— attempted; the Windows host hasCGO_ENABLED=0, while ntfy's documented SQLite test setup requires gcc/cgo. SQLite-dependent tests therefore use the go-sqlite3 stub; unrelated Unix-socket and open-log cleanup tests also fail on this host.