Skip to content
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

build(deps): bump github.com/prometheus/client_golang from 1.12.2 to 1.13.0 #1247

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 15, 2022

Bumps github.com/prometheus/client_golang from 1.12.2 to 1.13.0.

Release notes

Sourced from github.com/prometheus/client_golang's releases.

1.13.0 / 2022-08-06

  • [CHANGE] Minimum required Go version is now 1.17 (we also test client_golang against the new 1.19 version).
  • [ENHANCEMENT] Added prometheus.TransactionalGatherer interface for promhttp.Handler use which allows using low allocation update techniques for custom collectors. #989
  • [ENHANCEMENT] Added exemplar support to prometheus.NewConstHistogram. See ExampleNewConstHistogram_WithExemplar example on how to use it. #986
  • [ENHANCEMENT] prometheus/push.Pusher now has context-aware methods that pass context to HTTP requests. #1028
  • [ENHANCEMENT] prometheus/push.Pusher has now Error method that retrieve last error. #1075
  • [ENHANCEMENT] testutil.GatherAndCompare provides now readable diff on failed comparisons. #998
  • [ENHANCEMENT] Query API now supports timeouts. #1014
  • [ENHANCEMENT] New MetricVec method DeletePartialMatch(labels Labels) for deleting all metrics that match provided labels. #1013
  • [ENHANCEMENT] api.Config now accepts passing custom *http.Client. #1025
  • [BUGFIX] Raise exemplar labels limit from 64 to 128 bytes as specified in OpenMetrics spec. #1091
  • [BUGFIX] Allow adding exemplar to +Inf bucket to const histograms. #1094
  • [ENHANCEMENT] Most promhttp.Instrument* middlewares now support adding exemplars to metrics. This allows hooking those to your tracing middleware that retrieves trace ID and puts it in exemplar if present. #1055
  • [ENHANCEMENT] Added testutil.ScrapeAndCompare method. #1043
  • [BUGFIX] Fixed GopherJS build support. #897
  • [ENHANCEMENT] ⚠️ Added way to specify what runtime/metrics collectors.NewGoCollector should use. See ExampleGoCollector_WithAdvancedGoMetrics. #1102

New Contributors ❤️

... (truncated)

Changelog

Sourced from github.com/prometheus/client_golang's changelog.

1.13.0 / 2022-08-05

  • [CHANGE] Minimum required Go version is now 1.17 (we also test client_golang against new 1.19 version).
  • [ENHANCEMENT] Added prometheus.TransactionalGatherer interface for promhttp.Handler use which allows using low allocation update techniques for custom collectors. #989
  • [ENHANCEMENT] Added exemplar support to prometheus.NewConstHistogram. See ExampleNewConstHistogram_WithExemplar example on how to use it. #986
  • [ENHANCEMENT] prometheus/push.Pusher has now context aware methods that pass context to HTTP request. #1028
  • [ENHANCEMENT] prometheus/push.Pusher has now Error method that retrieve last error. #1075
  • [ENHANCEMENT] testutil.GatherAndCompare provides now readable diff on failed comparisons. #998
  • [ENHANCEMENT] Query API now supports timeouts. #1014
  • [ENHANCEMENT] New MetricVec method DeletePartialMatch(labels Labels) for deleting all metrics that match provided labels. #1013
  • [ENHANCEMENT] api.Config now accepts passing custom *http.Client. #1025
  • [BUGFIX] Raise exemplar labels limit from 64 to 128 bytes as specified in OpenMetrics spec. #1091
  • [BUGFIX] Allow adding exemplar to +Inf bucket to const histograms. #1094
  • [ENHANCEMENT] Most promhttp.Instrument* middlewares now supports adding exemplars to metrics. This allows hooking those to your tracing middleware that retrieves trace ID and put it in exemplar if present. #1055
  • [ENHANCEMENT] Added testutil.ScrapeAndCompare method. #1043
  • [BUGFIX] Fixed GopherJS build support. #897
  • [ENHANCEMENT] ⚠️ Added way to specify what runtime/metrics collectors.NewGoCollector should use. See ExampleGoCollector_WithAdvancedGoMetrics. #1102
Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot requested a review from a team as a code owner August 15, 2022 04:18
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Aug 15, 2022
@miguelsorianod
Copy link
Contributor

@dependabot rebase

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.12.2 to 1.13.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](prometheus/client_golang@v1.12.2...v1.13.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/go_modules/github.com/prometheus/client_golang-1.13.0 branch from bdd51a0 to c942877 Compare August 29, 2022 15:44
@miguelsorianod
Copy link
Contributor

I've been working on this.

The tests were failing and the cause of the issue was that httpAPIMock type in the observatorium package part of KFM implements prometheus's golang client API interface and with the latest prometheus's golang client release the signature of the Query and QueryRange has changed (in a backwards compatible way).

I updated KFM code to comply with the new signatures.
I additionally added an interface guard to more easily detect the interface implementation breaking potentially in the future.

After reading the changelog it seems we should be safe to update too. The two most important changes seem to be:

If the tests pass I think we should be ok to merge.

@@ -26,13 +28,13 @@ func (t *httpAPIMock) QueryExemplars(ctx context.Context, query string, startTim
}

// performs a query for the kafka metrics.
func (t *httpAPIMock) Query(ctx context.Context, query string, ts time.Time) (pModel.Value, pV1.Warnings, error) {
func (t *httpAPIMock) Query(ctx context.Context, query string, ts time.Time, opts ...pV1.Option) (pModel.Value, pV1.Warnings, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @pb82 to review the changes in this PR.

I think with the changes we've done in this PR we are ok. We don't need to take the options into account at all due to this is part of the httpAPIMock type which is a mock and we don't need to process them at all.

Independently on that maybe we should consider if it would be interesting to process the options when using the real client in a future PR if we deem it would be useful. cc @pb82

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for updating this @miguelsorianod
Looks like the only available option at the moment is a timeout: https://github.com/prometheus/client_golang/blob/83d56b1144a0c2eb10d399e7abbae3333bebc463/api/prometheus/v1/api.go#L820

But regardless, it can be useful in the future.

@codecov
Copy link

codecov bot commented Aug 29, 2022

Codecov Report

Merging #1247 (d04ebf0) into main (46e0aba) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1247   +/-   ##
=======================================
  Coverage   82.89%   82.89%           
=======================================
  Files         137      137           
  Lines       12057    12057           
=======================================
  Hits         9995     9995           
  Misses       1697     1697           
  Partials      365      365           
Flag Coverage Δ
unittests 82.89% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@miguelsorianod miguelsorianod requested a review from a team August 30, 2022 14:38
@machi1990
Copy link
Contributor

I've approved this but it'll be good to get a review from @pb82 or @JameelB on this one as well :-)

@machi1990 machi1990 requested a review from JameelB August 30, 2022 15:50
@miguelsorianod
Copy link
Contributor

@dependabot merge

@dependabot dependabot bot merged commit 484a320 into main Aug 31, 2022
@dependabot dependabot bot deleted the dependabot/go_modules/github.com/prometheus/client_golang-1.13.0 branch August 31, 2022 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants