Commit graph

10492 commits

Author SHA1 Message Date
Peter Štibraný 7908530560
Merge pull request #249 from grafana/update-upstream
Update upstream Prometheus
2022-06-10 12:27:57 +02:00
Ganesh Vernekar 0eb828c179
Add an option to enable overlapping compaction separately with overlapping queries
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-06-09 12:11:42 -07:00
Julien Pivotto a84c472745
Merge back release-2.36 (#10850)
* Fix UI build (#10842)

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>

* Add --lint-fatal option (#10815) (#10840)

This keeps the previous behaviour of printing details about duplicate
rules but doesn't exit with a fatal exit code unless turned on.

Signed-off-by: David Leadbeater <dgl@dgl.cx>

Co-authored-by: David Leadbeater <dgl@dgl.cx>

* Add v2.36.1 CHANGELOG and VERSION update

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>

Co-authored-by: Julien Pivotto <roidelapluie@inuits.eu>
Co-authored-by: David Leadbeater <dgl@dgl.cx>
2022-06-09 18:09:44 +02:00
dependabot[bot] 00982ce4d3
build(deps): bump github.com/stretchr/testify from 1.7.1 to 1.7.2
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.1...v1.7.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-09 14:37:17 +00:00
Matthias Loibl 3c0a100dec
Merge pull request #10848 from metalmatze/release-2.36.1
Add v2.36.1 CHANGELOG and VERSION update
2022-06-09 16:35:42 +02:00
Matthias Loibl e5b794293f
Add v2.36.1 CHANGELOG and VERSION update
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
2022-06-09 16:14:52 +02:00
Julien Pivotto 8ac4e50ec4
Add --lint-fatal option (#10815) (#10840)
This keeps the previous behaviour of printing details about duplicate
rules but doesn't exit with a fatal exit code unless turned on.

Signed-off-by: David Leadbeater <dgl@dgl.cx>

Co-authored-by: David Leadbeater <dgl@dgl.cx>
2022-06-09 15:33:31 +02:00
Julien Pivotto f2ba2a0800
Fix UI build (#10843)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-06-09 15:11:46 +02:00
Julien Pivotto b8724ca763
Fix UI build (#10842)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-06-09 15:11:45 +02:00
Peter Štibraný d051065441 Remove use of io/ioutil. 2022-06-09 15:01:34 +02:00
Peter Štibraný 9d51bf50db Merge upstream Prometheus 2022-06-09 11:29:19 +02:00
dependabot[bot] 867d3bd78f
build(deps): bump github.com/go-kit/log (#10827)
Bumps [github.com/go-kit/log](https://github.com/go-kit/log) from 0.2.0 to 0.2.1.
- [Release notes](https://github.com/go-kit/log/releases)
- [Commits](https://github.com/go-kit/log/compare/v0.2.0...v0.2.1)

---
updated-dependencies:
- dependency-name: github.com/go-kit/log
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-08 15:55:35 +02:00
dependabot[bot] c2d6acdcc5
build(deps): bump github.com/vultr/govultr/v2 from 2.17.0 to 2.17.1 (#10811)
Bumps [github.com/vultr/govultr/v2](https://github.com/vultr/govultr) from 2.17.0 to 2.17.1.
- [Release notes](https://github.com/vultr/govultr/releases)
- [Changelog](https://github.com/vultr/govultr/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vultr/govultr/compare/v2.17.0...v2.17.1)

---
updated-dependencies:
- dependency-name: github.com/vultr/govultr/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-08 15:55:12 +02:00
dependabot[bot] 7b8ed5d36b
build(deps): bump github.com/prometheus/common (#10826)
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.32.1 to 0.34.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.32.1...v0.34.0)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-08 15:55:01 +02:00
dependabot[bot] c92d571e5d
build(deps): bump github.com/gophercloud/gophercloud (#10834)
Bumps [github.com/gophercloud/gophercloud](https://github.com/gophercloud/gophercloud) from 0.24.0 to 0.25.0.
- [Release notes](https://github.com/gophercloud/gophercloud/releases)
- [Changelog](https://github.com/gophercloud/gophercloud/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gophercloud/gophercloud/compare/v0.24.0...v0.25.0)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-08 15:54:38 +02:00
Julien Pivotto e4a09f2b4b
uyuni: Use default HTTP client and set relative paths (#10814)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-06-08 11:29:44 +02:00
dependabot[bot] eef02a0334
build(deps): bump github.com/prometheus/client_golang (#10828)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.12.1 to 1.12.2.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.12.1...v1.12.2)

---
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>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-08 11:14:39 +02:00
dependabot[bot] 6bd75d5ba7
build(deps): bump github.com/stretchr/testify (#10829)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.0 to 1.7.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.0...v1.7.2)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-08 11:14:29 +02:00
dependabot[bot] 28322709eb
build(deps): bump github.com/aws/aws-sdk-go from 1.44.20 to 1.44.29 (#10832)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.20 to 1.44.29.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.44.20...v1.44.29)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-08 10:58:30 +02:00
dependabot[bot] 80eded08f6
build(deps): bump google.golang.org/api from 0.80.0 to 0.83.0 (#10830)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.80.0 to 0.83.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.80.0...v0.83.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-08 10:54:05 +02:00
dependabot[bot] 2bf9d26732
build(deps): bump k8s.io/api from 0.24.0 to 0.24.1 (#10812)
Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.24.0 to 0.24.1.
- [Release notes](https://github.com/kubernetes/api/releases)
- [Commits](https://github.com/kubernetes/api/compare/v0.24.0...v0.24.1)

---
updated-dependencies:
- dependency-name: k8s.io/api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-08 10:50:54 +02:00
Matthieu MOREL 0906f2eafa
refactor (promql): move from github.com/pkg/errors to 'errors' and 'fmt' (#10817)
Signed-off-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>

Co-authored-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>
2022-06-08 10:47:52 +02:00
Matthieu MOREL 47e13b26c1
refactor (tracing): move from github.com/pkg/errors to 'errors' and 'fmt' (#10819)
Signed-off-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>

Co-authored-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>
2022-06-08 10:44:42 +02:00
Matthieu MOREL 554f3f32f8
refactor (template): move from github.com/pkg/errors to 'errors' and 'fmt' (#10818)
Signed-off-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>

Co-authored-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>
2022-06-08 10:44:08 +02:00
Matthieu MOREL 15aeadedbe
enable dependabot for github.com/prometheus/prometheus/documentation/examples/remote_storage module (#10821)
Signed-off-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>

Co-authored-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>
2022-06-08 10:28:21 +02:00
Peter Štibraný 55236be04a
Fix comments. (#248) 2022-06-08 10:01:05 +02:00
Bryan Boreham 9f79a6f4b5
tsdb: faster CRC check by avoiding allocations (#10789)
Instead of creating a new hashing object every time, call `crc32.Checksum`
which computes the answer without allocations.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2022-06-08 08:00:59 +05:30
Peter Štibraný 1e2d2fb2d8
Job queue (#247)
This PR reimplements chan chunkWriteJob with custom buffered queue that should use less memory, because it doesn't preallocate entire buffer for maximum queue size at once. Instead it allocates individual "segments" with smaller size.

As elements are added to the queue, they fill individual segments. When elements are removed from the queue (and segments), empty segments can be thrown away. This doesn't change memory usage of the queue when it's full, but should decrease its memory footprint when it's empty (queue will keep max 1 segment in such case).
2022-06-07 17:42:28 +02:00
Filip Petkovski 7a78897d0b
Improve reliability of Kubernetes SD tests (#10761)
The tests for Kubernetes SD rely on comparing target groups by first
serializing them to JSON. However, the target group MarshalJSON function
only serializes the __address__ label, which makes eliminates all other
labels from the comparison.

This commit implements a separate marshaling function intended for use in
Kubernetes SD tests. The function serializes all target labels, making
comparisons much more reliable. The commit also fixes all tests that
started to fail due to the newly introduced change.

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
2022-06-07 16:19:40 +01:00
Filip Petkovski a56731126d
Export TSDB status structs (#10783)
We would like to implement the tsdb/status API in certain Thanos
components.

In order to match the Prometheus API and avoid duplicating code,
this commit makes the structs used in the status API public.

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
2022-06-07 16:13:21 +01:00
Bryan Boreham 2e2c014d52
Labels: optimise creation of signature with/without labels (#10667)
* Labels: create signature with/without labels

Instead of creating a new Labels slice then converting to signature,
go directly to the signature and save time.

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

* Labels: refactor Builder tests

Have one test with a range of cases, and have them check the final
output rather than checking the internal structure of the Builder.

Also add a couple of cases where the value is "", which should be
interpreted as 'delete'.

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

* Labels: add 'Keep' function to Builder

This lets us replace `Labels.WithLabels` with the more general `Builder`.

In `engine.resultMetric()` we can call `Keep()` instead of checking
and calling `Del()`.

Avoid calling `Sort()` in `Builder.Labels()` if we didn't add anything,
so that `Keep()` has the same performance as `WithLabels()`.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2022-06-07 10:08:27 +05:30
Julien Pivotto 143a760e76
Hetzner SD: Implement set directory (#10813)
Makes path relative to Prometheus config file.

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-06-05 07:54:43 +02:00
Łukasz Mierzwa b11062bfcc
Don't count added labels when initializing slice (#10756)
This was added in #10749 but based on feedback it might be over-allocating so worth removing.

Signed-off-by: Łukasz Mierzwa <l.mierzwa@gmail.com>
2022-06-04 08:45:02 +05:30
David Leadbeater 355b8bcf0b
Add --lint-fatal option (#10815)
This keeps the previous behaviour of printing details about duplicate
rules but doesn't exit with a fatal exit code unless turned on.

Signed-off-by: David Leadbeater <dgl@dgl.cx>
2022-06-03 23:33:39 +10:00
dependabot[bot] 636f7e5483
build(deps): bump k8s.io/apimachinery from 0.24.0 to 0.24.1 (#10806)
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.24.0 to 0.24.1.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.24.0...v0.24.1)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-03 13:48:47 +02:00
Matthieu MOREL f43749e82f
refactor (discovery): move from github.com/pkg/errors to 'errors' and 'fmt' (#10807)
Signed-off-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>

Co-authored-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>
2022-06-03 13:47:14 +02:00
Matthieu MOREL 12de742ae4
refactor (documentation): move from github.com/pkg/errors to 'errors' and 'fmt' (#10808)
Signed-off-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>

Co-authored-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>
2022-06-03 13:27:01 +02:00
Julien Pivotto 8801b01468
Merge back Release 2.36 (#10803)
* Update CHANGELOG for v2.36

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>

* Cut v2.36.0

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>

* Remove go version wording from changelog (#10778)

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>

Co-authored-by: Matthias Loibl <mail@matthiasloibl.com>
2022-06-03 10:22:45 +02:00
dependabot[bot] ad198b081b
build(deps): bump github.com/linode/linodego from 1.5.0 to 1.6.0 (#10792)
Bumps [github.com/linode/linodego](https://github.com/linode/linodego) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/linode/linodego/releases)
- [Commits](https://github.com/linode/linodego/compare/v1.5.0...v1.6.0)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-03 10:11:16 +02:00
dependabot[bot] c7298b4b08
build(deps): bump github.com/hashicorp/consul/api from 1.12.0 to 1.13.0 (#10794)
Bumps [github.com/hashicorp/consul/api](https://github.com/hashicorp/consul) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/hashicorp/consul/releases)
- [Changelog](https://github.com/hashicorp/consul/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/consul/compare/v1.12.0...api/v1.13.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/consul/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-03 10:11:06 +02:00
Julien Pivotto 4cb32a001e
Remove go version wording from changelog (#10778)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-06-03 00:26:06 +02:00
dependabot[bot] 03e5603d39
build(deps): bump bufbuild/buf-setup-action from 1.4.0 to 1.5.0 (#10790)
Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.4.0...v1.5.0)

---
updated-dependencies:
- dependency-name: bufbuild/buf-setup-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-02 16:43:31 +02:00
dependabot[bot] d713e39865
build(deps): bump golangci/golangci-lint-action from 3.1.0 to 3.2.0 (#10791)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.1.0...v3.2.0)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-02 16:42:59 +02:00
Mauro Stettler 459f59935c
Reduce chunk write queue memory usage (#131)
* dont waste space on the chunkRefMap
* add time factor
* add comments
* better readability
* add instrumentation and more comments
* formatting
* uppercase comments
* Address review feedback. Renamed "free" to "shrink" everywhere, updated comments and threshold to 1000.
* double space

Signed-off-by: Mauro Stettler <mauro.stettler@gmail.com>
Co-authored-by: Peter Štibraný <pstibrany@gmail.com>
2022-06-02 13:48:30 +02:00
David Leadbeater b84494d50d
Update go-yaml v3 to 3.0.1 (#10786)
Picks up the fix for https://github.com/go-yaml/yaml/issues/665 -- we
picked up the important fix for CVE-2022-28948 already.

This only affects go-yaml *v3*; the only user of v3 in Prometheus itself
is rulefmt so the impact seems limited.

Signed-off-by: David Leadbeater <dgl@dgl.cx>
2022-06-02 10:16:44 +10:00
Hu Shuai 31cffd9e92
Fix a small typo (#10771)
Signed-off-by: Hu Shuai <hus.fnst@fujitsu.com>
2022-06-01 12:31:18 +10:00
TJ Hoplock 69beb3f23d
fix: update docs to reflect new go 1.17 version minimum (#10780)
The minimum go version was bumped to 1.17 in
29b58448e1, but the main README still
referenced go 1.16 as the minimum version required. This updates that.

I took a quick look through the other docs in the repo (ie, I did some
naive grepping), and this is the only reference I spotted.

Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
2022-05-31 13:37:05 +02:00
Matej Gera 1dd247f68b
Remote Write: Rename confusing walDir parameter to dir (#10464)
* Rename walDir parameter to dir

Signed-off-by: Matej Gera <matejgera@gmail.com>

* Improve NewQueueManager comment

Signed-off-by: Matej Gera <matejgera@gmail.com>
2022-05-30 21:45:30 -07:00
Matthias Loibl d48f381d9a
Merge pull request #10776 from metalmatze/cut-v2.36.0
Cut v2.36.0
2022-05-30 15:40:56 +02:00
Matthias Loibl 4dc148113e
Cut v2.36.0
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
2022-05-30 15:16:57 +02:00