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

Resync upstream prometheus #641

Merged
merged 137 commits into from
Jun 7, 2024
Merged

Resync upstream prometheus #641

merged 137 commits into from
Jun 7, 2024

Conversation

pracucci
Copy link
Collaborator

@pracucci pracucci commented Jun 7, 2024

What has changed upstream

In this analysis I'm going to exclude:

  • Vendor updates PRs
  • Changes to tests

Impacting Mimir:

  • promql: ensure series in matrix values returned for instant queries are sorted (PR)
  • [ENHANCEMENT] TSDB: Faster exemplars (PR)
  • tsdb: add details to duplicate sample error (PR)
  • Improve contains check done by FastRegexMatcher (PR)
  • Implement histogram statistics decoder (PR)
  • Fix Group.Equals() to take in account the new queryOffset too (PR)

Not impacting Mimir:

  • Linode: bugfix, resolves partial fetch problem in 2.52 when service discovery would return more than exceeds 500 elements (PR)
  • tsdb: expose hook in tsdb to allow customizing compactor (PR)
  • Add configuration option for GOGC, default to 50 (PR)
  • RuleQueryOffset: Add omitempty for the global configuration (PR)

Changes I've done after merging upstream

tylitianrui and others added 30 commits February 15, 2024 20:40
Signed-off-by: tyltr <tylitianrui@126.com>
Bumps [@forevolve/bootstrap-dark](https://github.com/ForEvolve/bootstrap-dark) from 2.1.1 to 4.0.2.
- [Release notes](https://github.com/ForEvolve/bootstrap-dark/releases)
- [Commits](ForEvolve/bootstrap-dark@v2.1.1...v4.0.2)

---
updated-dependencies:
- dependency-name: "@forevolve/bootstrap-dark"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Signed-off-by: Charles Korn <charles.korn@grafana.com>
Signed-off-by: Charles Korn <charles.korn@grafana.com>
…them for pagination

Signed-off-by: David Andruczyk <dandrucz@akamai.com>
Linode: bugfix, resolves partial fetch problem in 2.52 when service discovery would return more than exceeds 500 elements
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Test with different amounts of capacity and exemplars, so that sometimes
new exemplars are evicting older exemplars.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
One exemplar per series is not a typical workload. Make it the same as
`BenchmarkAddExemplar`.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
In many cases we already have a pointer to the entry.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Saves memory and effort.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This saves having to zero the buffer every time.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Goes faster.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
[ENHANCEMENT] TSDB: Faster exemplars
# Conflicts:
#	promql/engine_test.go
promql: ensure series in matrix values returned for instant queries are sorted
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.19.0 to 1.19.1.
- [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.19.0...v1.19.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.4 to 4.1.6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4.1.4...a5ac7e5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.1 to 2.3.3.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](ossf/scorecard-action@0864cf1...dc50aa9)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [github.com/hetznercloud/hcloud-go/v2](https://github.com/hetznercloud/hcloud-go) from 2.7.2 to 2.9.0.
- [Release notes](https://github.com/hetznercloud/hcloud-go/releases)
- [Changelog](https://github.com/hetznercloud/hcloud-go/blob/main/CHANGELOG.md)
- [Commits](hetznercloud/hcloud-go@v2.7.2...v2.9.0)

---
updated-dependencies:
- dependency-name: github.com/hetznercloud/hcloud-go/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…er/compute/armcompute/v5

Bumps [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5](https://github.com/Azure/azure-sdk-for-go) from 5.6.0 to 5.7.0.
- [Release notes](https://github.com/Azure/azure-sdk-for-go/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md)
- [Commits](Azure/azure-sdk-for-go@sdk/resourcemanager/compute/armcompute/v5.6.0...sdk/resourcemanager/compute/armcompute/v5.7.0)

---
updated-dependencies:
- dependency-name: github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](actions/setup-go@0c52d54...cdcb360)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…ctions/checkout-4.1.6

build(deps): bump actions/checkout from 4.1.4 to 4.1.6
…ssf/scorecard-action-2.3.3

build(deps): bump ossf/scorecard-action from 2.3.1 to 2.3.3
…b.com/hetznercloud/hcloud-go/v2-2.9.0

build(deps): bump github.com/hetznercloud/hcloud-go/v2 from 2.7.2 to 2.9.0
…b.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5-5.7.0

build(deps): bump github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 from 5.6.0 to 5.7.0
SuperQ and others added 21 commits June 6, 2024 15:54
…/ui/nock-13.5.4

build(deps-dev): bump nock from 13.4.0 to 13.5.4 in /web/ui
…/ui/codemirror/language-6.10.2

build(deps): bump @codemirror/language from 6.9.3 to 6.10.2 in /web/ui
…/ui/fortawesome/free-solid-svg-icons-6.5.2

build(deps): bump @fortawesome/free-solid-svg-icons from 6.5.1 to 6.5.2 in /web/ui
…/ui/lezer/generator-1.7.0

build(deps-dev): bump @lezer/generator from 1.5.1 to 1.7.0 in /web/ui
…/ui/moment-timezone-0.5.45

build(deps): bump moment-timezone from 0.5.43 to 0.5.45 in /web/ui
…/ui/downshift-9.0.6

build(deps): bump downshift from 7.6.2 to 9.0.6 in /web/ui
…/ui/types/jquery-3.5.30

build(deps-dev): bump @types/jquery from 3.5.29 to 3.5.30 in /web/ui
Bumps [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) from 2.0.6 to 3.0.0.
- [Release notes](https://github.com/chimurai/http-proxy-middleware/releases)
- [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/master/CHANGELOG.md)
- [Commits](chimurai/http-proxy-middleware@v2.0.6...v3.0.0)

---
updated-dependencies:
- dependency-name: http-proxy-middleware
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Implement histogram statistics decoder

This commit speeds up histogram_count and histogram_sum
functions on native histograms. The idea is to have separate decoders which can be
used by the engine to only read count/sum values from histogram objects. This should help
with reducing allocations when decoding histograms, as well as with speeding up aggregations
like sum since they will be done on floats and not on histogram objects.

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

---------

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
…ed error message (#14038)

Add ability to assert that a query fails with a particular error message

This also adds documentation for the test scripting language in general,
including the new feature.

Signed-off-by: Charles Korn <charles.korn@grafana.com>

---------

Signed-off-by: Charles Korn <charles.korn@grafana.com>
…/ui/types/node-20.14.2

build(deps-dev): bump @types/node from 20.10.4 to 20.14.2 in /web/ui
Bumps [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) from 10.0.20 to 17.0.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon)

---
updated-dependencies:
- dependency-name: "@types/sinon"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [@codemirror/commands](https://github.com/codemirror/commands) from 6.3.2 to 6.6.0.
- [Changelog](https://github.com/codemirror/commands/blob/main/CHANGELOG.md)
- [Commits](codemirror/commands@6.3.2...6.6.0)

---
updated-dependencies:
- dependency-name: "@codemirror/commands"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.10.0 to 9.1.0.
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/eslint-config-prettier@v8.10.0...v9.1.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…tains

Improve contains check done by FastRegexMatcher
…/ui/codemirror/commands-6.6.0

build(deps): bump @codemirror/commands from 6.3.2 to 6.6.0 in /web/ui
…/ui/eslint-config-prettier-9.1.0

build(deps-dev): bump eslint-config-prettier from 8.10.0 to 9.1.0 in /web/ui
…/ui/types/sinon-17.0.3

build(deps-dev): bump @types/sinon from 10.0.20 to 17.0.3 in /web/ui
…/ui/http-proxy-middleware-3.0.0

build(deps): bump http-proxy-middleware from 2.0.6 to 3.0.0 in /web/ui
Signed-off-by: Marco Pracucci <marco@pracucci.com>
@CLAassistant
Copy link

CLAassistant commented Jun 7, 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.
3 out of 5 committers have signed the CLA.

✅ charleskorn
✅ bboreham
✅ pracucci
❌ fpetkovski
❌ SuperQ
You have signed the CLA already but the status is still pending? Let us recheck it.

Signed-off-by: Marco Pracucci <marco@pracucci.com>
LabelMatchers []*labels.Matcher
Offset time.Duration
Timestamp *int64
SkipHistogramBuckets bool // Set when decoding native histogram buckets is not needed for query evaluation.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Reminder for me and @krajorama. When updating mimir-prometheus in Mimir, we should check if there's anything to do about this (e.g. query sharding).

@@ -1523,181 +1523,6 @@ func TestRuleHealthUpdates(t *testing.T) {
require.Equal(t, HealthBad, rules.Health())
}

func TestGroup_Equals(t *testing.T) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note to reviewers: merged with the new upstream test defined in group_test.go.


func (f *histogramStatsIterator) setLastH(h *histogram.Histogram) {
if f.lastH == nil {
f.lastH = h.Copy()
Copy link
Contributor

Choose a reason for hiding this comment

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

These copies might introduce some overhead in mimir query frontend. Since it's easy to turn off this optimization, we can do that if it's noticeable, related to prometheus/prometheus#13679

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you think we should preemptively turn it off?

Copy link
Contributor

Choose a reason for hiding this comment

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

No. There isn't much native histogram usage yet that we know of, so in absolute terms it's fine. I hope to get back to migration sometime and introduce more usage at which point I'll be able to do profiling and check where we are

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

@pracucci pracucci merged commit fce8e33 into main Jun 7, 2024
8 of 9 checks passed
@pracucci pracucci deleted the resync-upstream branch June 7, 2024 08:01
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.

None yet