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

Update prometheus to 0.42.0 #6119

Merged
merged 5 commits into from
Feb 14, 2023
Merged

Conversation

fpetkovski
Copy link
Contributor

@fpetkovski fpetkovski commented Feb 13, 2023

This commit updates the Prometheus dependency to 0.42.0.

There are (yet again) three breaking changes which require updates in many places:

  • The chunkenc.Iterator interface now allows object reuse by passing an existing iterator instance.
  • Labels are now immutable and there is a separate ScratchBuilder interface for mutations.
  • The relabel.Process function now returns a second keep argument.

Signed-off-by: Filip Petkovski filip.petkovsky@gmail.com

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Verification

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
matej-g
matej-g previously approved these changes Feb 13, 2023
Copy link
Collaborator

@matej-g matej-g left a comment

Choose a reason for hiding this comment

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

As far as I understand the breaking changes, this is looking good 👍

@@ -159,7 +159,7 @@ func (s *chunkSeries) Labels() labels.Labels {
return s.lset
}

func (s *chunkSeries) Iterator() chunkenc.Iterator {
func (s *chunkSeries) Iterator(iterator chunkenc.Iterator) chunkenc.Iterator {
Copy link
Collaborator

@matej-g matej-g Feb 13, 2023

Choose a reason for hiding this comment

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

Nit: since we're not reusing the iterators, I'd either use unnamed parameter everywhere or preferably _ chunkenc.Iterator to indicate it is unused

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
@matej-g matej-g merged commit 1e16ba5 into thanos-io:main Feb 14, 2023
ngraham20 pushed a commit to ngraham20/thanos that referenced this pull request Apr 17, 2023
* Update prometheus to 0.42.0

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>

* Change type in e2e tests

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>

* Fix lint

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>

* Do not reuse any chunk iterators

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>

* Make chunkenc.Iterator an unnamed parameter

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>

---------

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
ngraham20 pushed a commit to ngraham20/thanos that referenced this pull request Apr 17, 2023
* Update prometheus to 0.42.0

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>

* Change type in e2e tests

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>

* Fix lint

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>

* Do not reuse any chunk iterators

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>

* Make chunkenc.Iterator an unnamed parameter

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>

---------

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants