-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add time template helpers #627
feat: add time template helpers #627
Conversation
a629df0
to
ca27390
Compare
@gotjosh can you look at this? |
a6324bf
to
b0dc45a
Compare
Signed-off-by: Sergey <[email protected]>
Signed-off-by: Sergey <[email protected]>
Signed-off-by: Sergey <[email protected]>
Signed-off-by: Sergey <[email protected]>
b0dc45a
to
270171b
Compare
Hi @freak12techno, in the old PR prometheus/alertmanager#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.
EDIT: I already reviewed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @freak12techno - apologies for the wait 🙏 , I've dropped some comments but all of them a very minor. If you could please address them I'd be thankful if not, I'll do it myself and merge this - just let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should have a single file containing everything, we call it time.go
under helpers/template/time.go
then we can have the tests file adjusted to be time_test.go
.
Co-authored-by: gotjosh <[email protected]> Signed-off-by: Sergey <[email protected]>
Co-authored-by: gotjosh <[email protected]> Signed-off-by: Sergey <[email protected]>
Co-authored-by: gotjosh <[email protected]> Signed-off-by: Sergey <[email protected]>
Signed-off-by: Sergey <[email protected]>
@gotjosh done, can you review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Lovely stuff, appreciate your quick turn around .
@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 :) |
…5472) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/common](https://github.com/prometheus/common) | `v0.53.0` -> `v0.54.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.53.0/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.53.0/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>prometheus/common (github.com/prometheus/common)</summary> ### [`v0.54.0`](https://github.com/prometheus/common/releases/tag/v0.54.0) [Compare Source](https://github.com/prometheus/common/compare/v0.53.0...v0.54.0) #### What's Changed - Bump golang.org/x/net from 0.22.0 to 0.23.0 in /sigv4 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/624](https://github.com/prometheus/common/pull/624) - Bump golang.org/x/net from 0.22.0 to 0.23.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/623](https://github.com/prometheus/common/pull/623) - Add HTTP headers support to common HTTP client. by [@​roidelapluie](https://github.com/roidelapluie) in [https://github.com/prometheus/common/pull/416](https://github.com/prometheus/common/pull/416) - Synchronize common files from prometheus/prometheus by [@​prombot](https://github.com/prombot) in [https://github.com/prometheus/common/pull/633](https://github.com/prometheus/common/pull/633) - Bump github.com/aws/aws-sdk-go from 1.51.11 to 1.51.32 in /sigv4 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/632](https://github.com/prometheus/common/pull/632) - Bump golang.org/x/oauth2 from 0.18.0 to 0.19.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/628](https://github.com/prometheus/common/pull/628) - Bump golang.org/x/net from 0.23.0 to 0.24.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/630](https://github.com/prometheus/common/pull/630) - Bump github.com/prometheus/client_model from 0.6.0 to 0.6.1 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/631](https://github.com/prometheus/common/pull/631) - Bump google.golang.org/protobuf from 1.33.0 to 1.34.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/629](https://github.com/prometheus/common/pull/629) - Use common interface to fetch secrets in HTTP client config by [@​TheSpiritXIII](https://github.com/TheSpiritXIII) in [https://github.com/prometheus/common/pull/538](https://github.com/prometheus/common/pull/538) - Add support for secret refs via a secret manager by [@​TheSpiritXIII](https://github.com/TheSpiritXIII) in [https://github.com/prometheus/common/pull/572](https://github.com/prometheus/common/pull/572) - oauth2RoundTripper: Avoid race condition and readability changes. by [@​bwplotka](https://github.com/bwplotka) in [https://github.com/prometheus/common/pull/634](https://github.com/prometheus/common/pull/634) - Synchronize common files from prometheus/prometheus by [@​prombot](https://github.com/prombot) in [https://github.com/prometheus/common/pull/636](https://github.com/prometheus/common/pull/636) - Bump github.com/aws/aws-sdk-go from 1.51.32 to 1.53.14 in /sigv4 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/638](https://github.com/prometheus/common/pull/638) - Bump github.com/prometheus/client_golang from 1.19.0 to 1.19.1 in /sigv4 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/639](https://github.com/prometheus/common/pull/639) - feat: add time template helpers by [@​freak12techno](https://github.com/freak12techno) in [https://github.com/prometheus/common/pull/627](https://github.com/prometheus/common/pull/627) #### New Contributors - [@​bwplotka](https://github.com/bwplotka) made their first contribution in [https://github.com/prometheus/common/pull/634](https://github.com/prometheus/common/pull/634) - [@​freak12techno](https://github.com/freak12techno) made their first contribution in [https://github.com/prometheus/common/pull/627](https://github.com/prometheus/common/pull/627) **Full Changelog**: prometheus/common@v0.53.0...v0.54.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-go). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…5709) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/common](https://github.com/prometheus/common) | `v0.53.0` -> `v0.54.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.53.0/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.53.0/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>prometheus/common (github.com/prometheus/common)</summary> ### [`v0.54.0`](https://github.com/prometheus/common/releases/tag/v0.54.0) [Compare Source](https://github.com/prometheus/common/compare/v0.53.0...v0.54.0) #### What's Changed - Bump golang.org/x/net from 0.22.0 to 0.23.0 in /sigv4 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/624](https://github.com/prometheus/common/pull/624) - Bump golang.org/x/net from 0.22.0 to 0.23.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/623](https://github.com/prometheus/common/pull/623) - Add HTTP headers support to common HTTP client. by [@​roidelapluie](https://github.com/roidelapluie) in [https://github.com/prometheus/common/pull/416](https://github.com/prometheus/common/pull/416) - Synchronize common files from prometheus/prometheus by [@​prombot](https://github.com/prombot) in [https://github.com/prometheus/common/pull/633](https://github.com/prometheus/common/pull/633) - Bump github.com/aws/aws-sdk-go from 1.51.11 to 1.51.32 in /sigv4 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/632](https://github.com/prometheus/common/pull/632) - Bump golang.org/x/oauth2 from 0.18.0 to 0.19.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/628](https://github.com/prometheus/common/pull/628) - Bump golang.org/x/net from 0.23.0 to 0.24.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/630](https://github.com/prometheus/common/pull/630) - Bump github.com/prometheus/client_model from 0.6.0 to 0.6.1 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/631](https://github.com/prometheus/common/pull/631) - Bump google.golang.org/protobuf from 1.33.0 to 1.34.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/629](https://github.com/prometheus/common/pull/629) - Use common interface to fetch secrets in HTTP client config by [@​TheSpiritXIII](https://github.com/TheSpiritXIII) in [https://github.com/prometheus/common/pull/538](https://github.com/prometheus/common/pull/538) - Add support for secret refs via a secret manager by [@​TheSpiritXIII](https://github.com/TheSpiritXIII) in [https://github.com/prometheus/common/pull/572](https://github.com/prometheus/common/pull/572) - oauth2RoundTripper: Avoid race condition and readability changes. by [@​bwplotka](https://github.com/bwplotka) in [https://github.com/prometheus/common/pull/634](https://github.com/prometheus/common/pull/634) - Synchronize common files from prometheus/prometheus by [@​prombot](https://github.com/prombot) in [https://github.com/prometheus/common/pull/636](https://github.com/prometheus/common/pull/636) - Bump github.com/aws/aws-sdk-go from 1.51.32 to 1.53.14 in /sigv4 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/638](https://github.com/prometheus/common/pull/638) - Bump github.com/prometheus/client_golang from 1.19.0 to 1.19.1 in /sigv4 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/639](https://github.com/prometheus/common/pull/639) - feat: add time template helpers by [@​freak12techno](https://github.com/freak12techno) in [https://github.com/prometheus/common/pull/627](https://github.com/prometheus/common/pull/627) #### New Contributors - [@​bwplotka](https://github.com/bwplotka) made their first contribution in [https://github.com/prometheus/common/pull/634](https://github.com/prometheus/common/pull/634) - [@​freak12techno](https://github.com/freak12techno) made their first contribution in [https://github.com/prometheus/common/pull/627](https://github.com/prometheus/common/pull/627) **Full Changelog**: prometheus/common@v0.53.0...v0.54.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-go-contrib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/common](https://github.com/prometheus/common) | `v0.53.0` -> `v0.54.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.53.0/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.53.0/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>prometheus/common (github.com/prometheus/common)</summary> ### [`v0.54.0`](https://github.com/prometheus/common/releases/tag/v0.54.0) [Compare Source](https://github.com/prometheus/common/compare/v0.53.0...v0.54.0) #### What's Changed - Bump golang.org/x/net from 0.22.0 to 0.23.0 in /sigv4 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/624](https://github.com/prometheus/common/pull/624) - Bump golang.org/x/net from 0.22.0 to 0.23.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/623](https://github.com/prometheus/common/pull/623) - Add HTTP headers support to common HTTP client. by [@​roidelapluie](https://github.com/roidelapluie) in [https://github.com/prometheus/common/pull/416](https://github.com/prometheus/common/pull/416) - Synchronize common files from prometheus/prometheus by [@​prombot](https://github.com/prombot) in [https://github.com/prometheus/common/pull/633](https://github.com/prometheus/common/pull/633) - Bump github.com/aws/aws-sdk-go from 1.51.11 to 1.51.32 in /sigv4 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/632](https://github.com/prometheus/common/pull/632) - Bump golang.org/x/oauth2 from 0.18.0 to 0.19.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/628](https://github.com/prometheus/common/pull/628) - Bump golang.org/x/net from 0.23.0 to 0.24.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/630](https://github.com/prometheus/common/pull/630) - Bump github.com/prometheus/client_model from 0.6.0 to 0.6.1 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/631](https://github.com/prometheus/common/pull/631) - Bump google.golang.org/protobuf from 1.33.0 to 1.34.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/629](https://github.com/prometheus/common/pull/629) - Use common interface to fetch secrets in HTTP client config by [@​TheSpiritXIII](https://github.com/TheSpiritXIII) in [https://github.com/prometheus/common/pull/538](https://github.com/prometheus/common/pull/538) - Add support for secret refs via a secret manager by [@​TheSpiritXIII](https://github.com/TheSpiritXIII) in [https://github.com/prometheus/common/pull/572](https://github.com/prometheus/common/pull/572) - oauth2RoundTripper: Avoid race condition and readability changes. by [@​bwplotka](https://github.com/bwplotka) in [https://github.com/prometheus/common/pull/634](https://github.com/prometheus/common/pull/634) - Synchronize common files from prometheus/prometheus by [@​prombot](https://github.com/prombot) in [https://github.com/prometheus/common/pull/636](https://github.com/prometheus/common/pull/636) - Bump github.com/aws/aws-sdk-go from 1.51.32 to 1.53.14 in /sigv4 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/638](https://github.com/prometheus/common/pull/638) - Bump github.com/prometheus/client_golang from 1.19.0 to 1.19.1 in /sigv4 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/639](https://github.com/prometheus/common/pull/639) - feat: add time template helpers by [@​freak12techno](https://github.com/freak12techno) in [https://github.com/prometheus/common/pull/627](https://github.com/prometheus/common/pull/627) #### New Contributors - [@​bwplotka](https://github.com/bwplotka) made their first contribution in [https://github.com/prometheus/common/pull/634](https://github.com/prometheus/common/pull/634) - [@​freak12techno](https://github.com/freak12techno) made their first contribution in [https://github.com/prometheus/common/pull/627](https://github.com/prometheus/common/pull/627) **Full Changelog**: prometheus/common@v0.53.0...v0.54.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <[email protected]>
) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/common](https://github.com/prometheus/common) | `v0.53.0` -> `v0.54.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.53.0/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.53.0/v0.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>prometheus/common (github.com/prometheus/common)</summary> ### [`v0.54.0`](https://github.com/prometheus/common/releases/tag/v0.54.0) [Compare Source](https://github.com/prometheus/common/compare/v0.53.0...v0.54.0) #### What's Changed - Bump golang.org/x/net from 0.22.0 to 0.23.0 in /sigv4 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/624](https://github.com/prometheus/common/pull/624) - Bump golang.org/x/net from 0.22.0 to 0.23.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/623](https://github.com/prometheus/common/pull/623) - Add HTTP headers support to common HTTP client. by [@​roidelapluie](https://github.com/roidelapluie) in [https://github.com/prometheus/common/pull/416](https://github.com/prometheus/common/pull/416) - Synchronize common files from prometheus/prometheus by [@​prombot](https://github.com/prombot) in [https://github.com/prometheus/common/pull/633](https://github.com/prometheus/common/pull/633) - Bump github.com/aws/aws-sdk-go from 1.51.11 to 1.51.32 in /sigv4 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/632](https://github.com/prometheus/common/pull/632) - Bump golang.org/x/oauth2 from 0.18.0 to 0.19.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/628](https://github.com/prometheus/common/pull/628) - Bump golang.org/x/net from 0.23.0 to 0.24.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/630](https://github.com/prometheus/common/pull/630) - Bump github.com/prometheus/client_model from 0.6.0 to 0.6.1 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/631](https://github.com/prometheus/common/pull/631) - Bump google.golang.org/protobuf from 1.33.0 to 1.34.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/629](https://github.com/prometheus/common/pull/629) - Use common interface to fetch secrets in HTTP client config by [@​TheSpiritXIII](https://github.com/TheSpiritXIII) in [https://github.com/prometheus/common/pull/538](https://github.com/prometheus/common/pull/538) - Add support for secret refs via a secret manager by [@​TheSpiritXIII](https://github.com/TheSpiritXIII) in [https://github.com/prometheus/common/pull/572](https://github.com/prometheus/common/pull/572) - oauth2RoundTripper: Avoid race condition and readability changes. by [@​bwplotka](https://github.com/bwplotka) in [https://github.com/prometheus/common/pull/634](https://github.com/prometheus/common/pull/634) - Synchronize common files from prometheus/prometheus by [@​prombot](https://github.com/prombot) in [https://github.com/prometheus/common/pull/636](https://github.com/prometheus/common/pull/636) - Bump github.com/aws/aws-sdk-go from 1.51.32 to 1.53.14 in /sigv4 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/638](https://github.com/prometheus/common/pull/638) - Bump github.com/prometheus/client_golang from 1.19.0 to 1.19.1 in /sigv4 by [@​dependabot](https://github.com/dependabot) in [https://github.com/prometheus/common/pull/639](https://github.com/prometheus/common/pull/639) - feat: add time template helpers by [@​freak12techno](https://github.com/freak12techno) in [https://github.com/prometheus/common/pull/627](https://github.com/prometheus/common/pull/627) #### New Contributors - [@​bwplotka](https://github.com/bwplotka) made their first contribution in [https://github.com/prometheus/common/pull/634](https://github.com/prometheus/common/pull/634) - [@​freak12techno](https://github.com/freak12techno) made their first contribution in [https://github.com/prometheus/common/pull/627](https://github.com/prometheus/common/pull/627) **Full Changelog**: prometheus/common@v0.53.0...v0.54.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zODguMSIsInVwZGF0ZWRJblZlciI6IjM3LjM4OC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <[email protected]>
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: prometheus/alertmanager#3717
Related: prometheus/alertmanager#3720 (comment)
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).