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

Merge upstream Prometheus at c5040c5 #655

Merged
merged 23 commits into from
Jun 27, 2024
Merged

Conversation

charleskorn
Copy link
Contributor

@charleskorn charleskorn commented Jun 27, 2024

⚠️ Please check the changes to tsdb/compact.go from prometheus/prometheus#14213 carefully! I'm not familiar with this part of the codebase and I'm not 100% confident my changes are correct - we have diverged from the upstream implementation of PopulateBlock in a few places.

This PR merges the following changes from upstream:

Major changes

Performance improvements

Minor changes and refactoring

Bug fixes

Non-production changes

Not relevant to Mimir

bboreham and others added 23 commits January 31, 2024 12:14
If given a single querier, just return it instead of constructing a
complicated wrapper. The code in `mergeGenericQuerier` which skipped
merging when there was only one is not needed any more.

This change required a few tests to be tweaked, because they relied on
the specific behaviour of `mergeGenericQuerier.Select()`.

Signed-off-by: Bryan Boreham <[email protected]>
This can give a more precise result, by keeping a separate running
compensation value to accumulate small errors.

See https://en.wikipedia.org/wiki/Kahan_summation_algorithm

Signed-off-by: Bryan Boreham <[email protected]>
…es #7406 (#14156)

* discovery: aws: expose Primary IPv6 addresses as label

Add __meta_ec2_primary_ipv6_addresses label. This label contains the
Primary IPv6 address for every ENI attached to the EC2 instance. It is
ordered by the DeviceIndex and the missing elements (interface without
Primary IPv6 address) are kept in the list.

---------

Signed-off-by: Arpad Kunszt <[email protected]>
Co-authored-by: Ayoub Mrini <[email protected]>
goyacc is installed using 'install-goyacc' and ends up in GOPATH/bin.
GOPATH isn't usually part of standard PATH, so when make tries to run goyacc it fails, unless PATH includes GOPATH/bin.
Other Go tools, like golangci-lint, are also installed via go install into GOPATH/bin but they run correctly because make invocations for them use FIRST_GOPATH viriable to use full path.
Call goyacc using FIRST_GOPATH/bin as well so it works without GOPATH being included in PATH.

Signed-off-by: Lukasz Mierzwa <[email protected]>
…078)

* fix: try to reproduce the bug from prometheus/prometheus#13979 in a test case

Signed-off-by: David Vavra <[email protected]>

* fix: data corruption in remote write if max_sample_age is applied

Signed-off-by: David Vavra <[email protected]>

* add benchmark for buildTimeSeries which does the filtering

Signed-off-by: Callum Styan <[email protected]>

---------

Signed-off-by: David Vavra <[email protected]>
Signed-off-by: Callum Styan <[email protected]>
Co-authored-by: David Vavra <[email protected]>
Co-authored-by: Callum Styan <[email protected]>
[ENHANCEMENT] PromQL: use Kahan summation for sum()
Signed-off-by: Arve Knudsen <[email protected]>
* expose hook for block querier

Signed-off-by: Ben Ye <[email protected]>

* update comment

Signed-off-by: Ben Ye <[email protected]>

* use defined type

Signed-off-by: Ben Ye <[email protected]>

---------

Signed-off-by: Ben Ye <[email protected]>
…g-read

Fix issue where pending OOO read can be left dangling if creating querier fails
* fix(remote_write): reject samples with future timestamps

* increase check to +10 minutes to allow for clock drift

---------

Signed-off-by: Jan-Otto Kröpke <[email protected]>
Signed-off-by: Jan-Otto Kröpke <[email protected]>
Signed-off-by: Jan-Otto Kröpke <[email protected]>
Co-authored-by: Bryan Boreham <[email protected]>
This PR updates go-retryablehttp to version 0.7.7, even if it's used as
an indirect import. Versions previous to that can didn't sanitize urls,
discussed at HDCSEC-2024-12 [1]

[1] https://discuss.hashicorp.com/t/hcsec-2024-12-go-retryablehttp-can-leak-basic-auth-credentials-to-log-files/68027

Signed-off-by: Daniel Mellado <[email protected]>
Upgrade to golangci-lint v1.59.1, fix errors
storage: don't wrap single querier in merge-queriers
…(#14290)

* Add draining of queued notifications to `notifier.Manager`

Signed-off-by: Charles Korn <[email protected]>

* Update docs

Signed-off-by: Charles Korn <[email protected]>

* Address PR feedback

Signed-off-by: Charles Korn <[email protected]>

* Add more logging

Signed-off-by: Charles Korn <[email protected]>

* Address offline feedback: remove timeout

Signed-off-by: Charles Korn <[email protected]>

* Ensure stopping takes priority over further processing, make tests more robust

Signed-off-by: Charles Korn <[email protected]>

* Make channel unbuffered

Signed-off-by: Charles Korn <[email protected]>

* Update docs

Signed-off-by: Charles Korn <[email protected]>

* Fix race in test

Signed-off-by: Charles Korn <[email protected]>

* Remove unnecessary context

Signed-off-by: Charles Korn <[email protected]>

* Make Stop safe to call multiple times

Signed-off-by: Charles Korn <[email protected]>

---------

Signed-off-by: Charles Korn <[email protected]>
[ENHANCEMENT] Docker SD: add MatchFirstNetwork for containers with multiple networks

Fixes docker sd service misssing in shared mode and deduplicate targets by network
…-prometheus

# Conflicts:
#	.github/workflows/ci.yml
#	tsdb/compact.go
#	tsdb/compact_test.go
#	tsdb/db.go
#	tsdb/db_test.go
Signed-off-by: Charles Korn <[email protected]>
@CLAassistant
Copy link

CLAassistant commented Jun 27, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
7 out of 11 committers have signed the CLA.

✅ bboreham
✅ thampiotr
✅ DrAuYueng
✅ aknuds1
✅ FUSAKLA
✅ charleskorn
✅ jkroepke
❌ prymitive
❌ akunszt
❌ yeya24
❌ danielmellado
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

@krajorama krajorama left a comment

Choose a reason for hiding this comment

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

LGTM, PopulateBlock changes seem straightforward.
We had this about that for a long time, just never got to it: #484

@charleskorn charleskorn merged commit 5073d04 into main Jun 27, 2024
8 of 9 checks passed
@charleskorn charleskorn deleted the charleskorn/upgrade-prometheus branch June 27, 2024 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.