Closed freak12techno closed 3 weeks ago
@gotjosh can you look at this?
Hi @freak12techno, in the old PR https://github.com/prometheus/alertmanager/pull/3720 you also included time.since. Is it possible to add here?
@LMantovan I'll still need to make a PR towards alertmanager to use this template, my plan is to add time.Since in the next PR which will supersede the one I closed.
This one needs to be merged first regardless though.
@gotjosh ping?
@gotjosh are you up to reviewing this? Either way, could you comment so that we at least know you have seen this PR?
I apologise for missing the notifications for these - like everyone else, managing Github notifications has become an impossible task at this point.
@grobinson-grafana do you have any spare cycles to review this?
EDIT: I already reviewed.
@gotjosh done, can you review?
@freak12techno thank you very much for your contribution 🙏
@gotjosh can you bump a new version of this repo so I can use it in alertmanager (and I guess in prometheus as well)?
@ArthurSens can you help me bump a new patch version? Is it the same process as other repositories? TIA.
I think I've figured it out - you should be good to go @freak12techno.
Yeah, there's no release process here as far as I know. Just go to the release pages and do things manually :)
Copied from here https://github.com/prometheus/prometheus/blob/34ee8c607809cca973a1d7383713035045f681d8/template/template.go#L267, the eventual goal is to reuse it in Alertmanager as well to allow it as a template helper, and also in Prometheus.
Related: https://github.com/prometheus/alertmanager/issues/3717 Related: https://github.com/prometheus/alertmanager/pull/3720#issuecomment-1968901170
Function itself is moved as is, tests are updated as there's no templates rendering here.
Also
added theadded the go.mod entry to go.mod and go.sum (otherwise.idea
to.gitignore
(as I use Goland IDE and it creates some files that are probably not to be committed) andmake test
would fail).