Commit graph

11573 commits

Author SHA1 Message Date
Bryan Boreham 9bb9faabb1 rules tests: use EmptyLabels instead of nil
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-03-27 18:03:52 +00:00
Bryan Boreham aa9385ea88 tsdb: one more labels.FromStrings
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-03-27 17:41:57 +00:00
Bryan Boreham 0679437825 promql/tests: couple more labels.FromStrings
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-03-27 17:41:30 +00:00
Ganesh Vernekar b33a382646
Remove mistakenly added file
It got added in https://github.com/prometheus/prometheus/pull/11992

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2023-03-27 20:44:11 +05:30
Ganesh Vernekar 211ae4f1f0
Merge pull request #12184 from codesome/edit-codeowners
Remove codesome as codeowner from promql/
2023-03-27 20:40:49 +05:30
Ganesh Vernekar 22806f2e83
Remove codesome as codeowner from promql/
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2023-03-27 17:18:01 +05:30
Alan Protasio 6ddadd98b4
Optimization on mergedStringIter (#12132)
Optimization on NewMergedStringIter

Signed-off-by: Alan Protasio <alanprot@gmail.com>
2023-03-27 17:10:45 +05:30
Julien Pivotto 8d8840880c
Merge pull request #12178 from roidelapluie/fixcl
Fix changelog about scrape configs
2023-03-23 23:05:29 +01:00
Alison 3ac49d4ae2
Set SourceMap to false to fix UI in MCR builds (#12175)
* Set sourceMap to false

Signed-off-by: Alison Burgess <alburgess@microsoft.com>

* add sourcemap=false to package.json build

Signed-off-by: Alison Burgess <alburgess@microsoft.com>

* set sourcemap to true in tsconfig

Signed-off-by: Alison Burgess <alburgess@microsoft.com>

---------

Signed-off-by: Alison Burgess <alburgess@microsoft.com>
Co-authored-by: Alison Burgess <alburgess@microsoft.com>
2023-03-23 22:25:48 +01:00
Bryan Boreham edc8e75c40
Merge pull request #12174 from bboreham/builder-range-smaller
labels: shrink stack arrays in Builder.Range
2023-03-23 11:40:29 +00:00
Oleg Zaytsev 8a7ef4cfac
Merge pull request #462 from grafana/fix-block-compaction-failed-when-shutting-down-cherry-picked
Fix block compaction failed when shutting down
2023-03-23 12:12:08 +01:00
Oleg Zaytsev 1535deb62c Fix context.Canceled wrapping in compaction
We need to make sure that `tsdb_errors.NewMulti` handles the errors.Is()
calls properly, like it's done in grafana/dskit.

Also we need to check that `errors.Is(err, context.Canceled)`, not that
`err == context.Canceled`.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2023-03-23 11:41:28 +01:00
Oleg Zaytsev dfbd52113b Test compaction not failed during shutdown
Test that blocks are not marked as "compaction failed" during shutdown.
This shouldn't happen but this test currently fails.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2023-03-23 11:41:28 +01:00
Oleg Zaytsev 581e5e961f
Merge pull request #461 from grafana/revert-460-implement-multi-errors-is
Revert "Implement Is() for multierrors"
2023-03-23 11:39:25 +01:00
Oleg Zaytsev d69082ea9a
Revert "Implement Is() for multierrors" 2023-03-23 11:10:56 +01:00
Oleg Zaytsev 344c630857
Fix context.Canceled wrapping in compaction
We need to make sure that `tsdb_errors.NewMulti` handles the errors.Is()
calls properly, like it's done in grafana/dskit.

Also we need to check that `errors.Is(err, context.Canceled)`, not that
`err == context.Canceled`.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2023-03-23 11:10:00 +01:00
Oleg Zaytsev 2f32a9e3c3
Test compaction not failed during shutdown
Test that blocks are not marked as "compaction failed" during shutdown.
This shouldn't happen but this test currently fails.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2023-03-23 11:08:56 +01:00
Julien Pivotto b73040cff6 Fix changelog
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-03-23 00:01:34 +01:00
Bryan Boreham ee1157c14a labels: shrink stack arrays in Builder.Range
Go spends some time initializing all the elements of these arrays to
zero, so reduce the size from 1024 to 128. This is still much bigger
than we ever expect for a set of labels.

(If someone does have more than 128 labels it will still work, but via
heap allocation.)

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-03-22 17:14:43 +00:00
Bryan Boreham b987afa7ef labels: simplify call to get Labels from Builder
It took a `Labels` where the memory could be re-used, but in practice
this hardly ever benefitted. Especially after converting `relabel.Process`
to `relabel.ProcessBuilder`.

Comparing the parameter to `nil` was a bug; `EmptyLabels` is not `nil`
so the slice was reallocated multiple times by `append`.

Lastly `Builder.Labels()` now estimates that the final size will depend
on labels added and deleted.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-03-22 17:05:20 +00:00
Bryan Boreham 90b2f7a540
Merge pull request #12161 from codesome/update-comment
tsdb: Fix a comment in tsdb/head_read.go
2023-03-22 17:02:28 +00:00
Oleg Zaytsev f7f1fc750c
Merge pull request #460 from grafana/implement-multi-errors-is
Implement Is() for multierrors
2023-03-22 17:55:37 +01:00
Oleg Zaytsev 3d8b5e89ae
Implement Is() for multierrors
We need to be able to identify the errors that a multierror wraps.
Especially in case of `context.Canceled`. This is the same
implementation of that method as we do in github.com/grafana/dskit/multierror

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2023-03-22 17:29:39 +01:00
Marco Pracucci 74916ab06e
Merge pull request #457 from grafana/codesome/sync-prom
Sync with upstream Prometheus
2023-03-22 10:25:40 +01:00
Bryan Boreham 5d90dc0627
Merge pull request #12084 from bboreham/target-labels
scraping: reduce memory allocations on Target labels
2023-03-22 09:02:08 +00:00
Marco Pracucci cc33c21548
Merge pull request #458 from grafana/allow-to-configure-block-postings-cache
Allow to configure compacted blocks postings for matchers cache
2023-03-22 09:33:26 +01:00
Ganesh Vernekar 7a33f5c2ca
Change UnsupportedMask to not clash with OutOfOrderMask
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2023-03-22 13:19:49 +05:30
Marco Pracucci 330e9b69af
Allow to configure compacted blocks postings for matchers cache
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-03-22 06:40:11 +01:00
Ganesh Vernekar 41649ceb1b
Merge remote-tracking branch 'upstream/main' into codesome/sync-prom
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2023-03-22 08:35:08 +05:30
Julien Pivotto 8ac5363590
Merge pull request #12168 from roidelapluie/booldoc
Docs: use boolean instead of bool
2023-03-21 18:04:17 +01:00
Julien Pivotto ae220724d4 Docs: use boolean instead of bool
boolean makes the type consistent and clickable on
https://prometheus.io/docs/prometheus/latest/configuration/configuration/

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-03-21 17:28:31 +01:00
Julien Pivotto de50efbf7a
Merge pull request #12165 from prometheus/release-2.43
Merge 2.43 in main
2023-03-21 17:26:28 +01:00
Björn Rabenstein 559adab471
Merge pull request #12085 from leizor/leizor/prometheus/issues/11204
Handle native histograms in remote read
2023-03-21 17:25:34 +01:00
Vernon Miller ca0abf26c5
Adds an affirmative log message for successful WAL repair (#12135)
* Adds an affirmative log message for successful WAL repair

Signed-off-by: Vernon Miller <vernon.miller@grafana.com>
Signed-off-by: Vernon Miller <96601789+aldernero@users.noreply.github.com>
Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com>
2023-03-21 19:33:43 +05:30
Julien Pivotto edfc3bcd02
Merge pull request #12164 from roidelapluie/rel-243
Address review comments on release 2.43 changelog.
2023-03-21 13:52:36 +01:00
Julien Pivotto 67f48f47c7 Address review comments
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-03-21 13:50:48 +01:00
Julien Pivotto 842ab019ed
Merge pull request #12162 from roidelapluie/rel-2.43
Release 2.43.0
2023-03-21 13:49:31 +01:00
Julien Pivotto 1070c9b06c Release 2.43.0
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-03-21 13:07:51 +01:00
SuperQ f14665b9e3 Fix docker tag sanitizer
Use a `-` instead of `_` to make the docker tag also pass semver checks.

Signed-off-by: SuperQ <superq@gmail.com>
2023-03-21 11:27:25 +01:00
Ganesh Vernekar 1b7d973f14
tsdb: Fix a comment in tsdb/head_read.go
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2023-03-21 15:15:36 +05:30
Julien Pivotto fd8992cdbd
Merge pull request #12137 from g3offrey/fix/update-prometheus-ansible-link
docs: update ansible installation link
2023-03-20 11:14:56 +01:00
Julien Pivotto 901937c6ac
Merge pull request #12142 from colega/store-the-remote-client-url-string
remote.Client: store urlString
2023-03-20 10:44:10 +01:00
Julien Pivotto bc7ce50d85
Merge pull request #12115 from prometheus/superq/go_1.20
Update Go version
2023-03-16 23:50:51 +01:00
Bryan Boreham 0c09c3feb0 scrape sync: avoid copy of labels for dropped targets
Since the Target object was just created in this function, nobody else
has a reference to it and there are no concerns about it being modified
concurrently so we don't need to copy the value.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-03-16 20:35:13 +00:00
Bryan Boreham 0dfa1e73f8 scrape: use LabelsRange instead of Labels, for performance
Includes a rewrite of `resolveConflictingExposedLabels` to use
`labels.Builder.Get`, which simplifies it considerably.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-03-16 20:35:13 +00:00
Bryan Boreham 2fde2fb37d scrape: add Target.LabelsRange
This allows users of a Target to iterate labels without allocating heap memory.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-03-16 20:35:13 +00:00
Julien Pivotto d08254324e
Merge pull request #12149 from roidelapluie/relrc1-updatemakefile
Update makefile to better handle semver build metadata
2023-03-16 21:33:49 +01:00
Julien Pivotto f8eb70c46d Merge branch 'release-2.43' of https://github.com/prometheus/prometheus into release-2.43 2023-03-16 21:09:16 +01:00
Julien Pivotto 71b24c25c2
Merge pull request #12147 from roidelapluie/relrc1
2.43.0-rc.1
2023-03-16 21:08:51 +01:00
Julien Pivotto 331a7dfd21 Replace '+' with '_' in docker image tag for semver compatibility
This change introduces a new variable, SANITIZED_DOCKER_IMAGE_TAG, which
replaces any '+' characters in the original DOCKER_IMAGE_TAG with '_'
characters. This ensures better compatibility with semver standards,
particularly when using metadata in version tags.

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-03-16 20:31:17 +01:00