Commit graph

11468 commits

Author SHA1 Message Date
Oleg Zaytsev e5eb66f422
Merge pull request #503 from grafana/fixup-labels-usage3
labels: add stringlabels version of StableHash
2023-05-05 13:11:00 +02:00
Oleg Zaytsev 1f14d27d40
mv sharding_string.go sharding_stringlabels.go
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2023-05-05 12:53:56 +02:00
Bryan Boreham 763af2dcce
Disable PRs from dependabot (#502)
* Disable PRs from dependabot

This repo should be be as far as possible identical to upstream Prometheus, so we don't want these PRs.

* Update .github/dependabot.yml

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

---------

Co-authored-by: Marco Pracucci <marco@pracucci.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-05-04 16:57:35 +00:00
Oleg Zaytsev 2cb71a164d Add CI pipeline to test with -tags=stringlabels
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2023-05-04 16:55:28 +02:00
Oleg Zaytsev 864e582a14
Add TestStableHash
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2023-05-04 16:54:39 +02:00
Bryan Boreham 2a7a27f91a labels: add stringlabels version of StableHash
Inlined the `Range()` implementation to avoid adding overhead.
2023-05-02 15:51:17 +01:00
George Krajcsovits 7b200a51c4
Merge pull request #489 from grafana/krajo/fix
Second sync from 28-apr-2023
2023-05-01 07:26:25 +02:00
György Krajcsovits 58cae45518 Merge remote-tracking branch 'upstream/main' into krajo/fix
From 0d049feac7
2023-04-28 23:05:05 +02:00
Filip Petkovski 0d049feac7
Fix encoding samples in ChunkSeries (#12185)
The storage.ChunkSeries iterator assumes that a histogram sample can always be
appended to the currently open chunk. This is not the case when there is a counter reset,
or when appending a stale sample to a chunk with non-stale samples. In addition, the open chunk sometimes
needs to be recoded before a sample can be appended.

This commit addresses the issue by implementing a RecodingAppender which can recode incoming
samples in a transparent way. It also detects cases when a sample cannot be appended at all and
returns `false` so that the caller can open a new chunk.

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
Co-authored-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com>
2023-04-28 16:52:21 -04:00
George Krajcsovits 99e591e7f9
Merge pull request #487 from grafana/sync-upstream-28-apr-2023
Sync upstream 28 apr 2023
2023-04-28 18:21:30 +02:00
György Krajcsovits 65b8edbed4 Merge remote-tracking branch 'upstream/main' into sync-upstream-28-apr-2023 2023-04-28 18:04:02 +02:00
George Krajcsovits 8094a8ea34
Merge pull request #486 from grafana/sync-upstream-26-apr-2023
Sync upstream 26 apr 2023
From d4bf47766e
2023-04-28 18:01:34 +02:00
György Krajcsovits be2747dc52 Fix OOMing golangci-lint
Upgrade to version I tested locally.
The old version blew my memory.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2023-04-28 16:53:32 +02:00
György Krajcsovits 87c727e957 Fix linter errors in Grafana additions
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2023-04-28 16:32:42 +02:00
Julien Pivotto 24d7e5bd49
Merge pull request #12296 from rsc/loopvar
scrape: fix two loop variable scoping bugs in test
2023-04-27 11:24:04 +02:00
Julien Pivotto 3c3ea24929
Merge pull request #12290 from cuishuang/main
Fix some comments.
2023-04-27 11:16:05 +02:00
Russ Cox 28f5502828 scrape: fix two loop variable scoping bugs in test
Consider code like:

	for i := 0; i < numTargets; i++ {
		stopFuncs = append(stopFuncs, func() {
			time.Sleep(i*20*time.Millisecond)
		})
	}

Because the loop variable i is shared by all closures,
all the stopFuncs sleep for numTargets*20 ms.

If the i were made per-iteration, as we are considering
for a future Go release, the stopFuncs would have sleep
durations ranging from 0 to (numTargets-1)*20 ms.

Two tests had code like this and were checking that the
aggregate sleep was at least numTargets*20 ms
("at least as long as the last target slept"). This is only true
today because i == numTarget during all the sleeps.

To keep the code working even if the semantics of this loop
change, this PR computes

	d := time.Duration((i+1)*20) * time.Millisecond

outside the closure (but inside the loop body), and then each
closure has its own d. Now the sleeps range from 20 ms
to numTargets*20 ms, keeping the test passing
(and probably behaving closer to the intent of the test author).

The failure being fixed can be reproduced by using the current
Go development branch with

	GOEXPERIMENT=loopvar go test

Signed-off-by: Russ Cox <rsc@golang.org>
2023-04-26 10:33:10 -04:00
Jeanette Tan caac4d5071 Upgrade go version to match prometheus (and need 1.19 for gomemlimit) 2023-04-26 22:27:32 +08:00
Jeanette Tan a064ec6fc1 Fix lint 2023-04-26 22:22:31 +08:00
Jeanette Tan 0fccba0db9 Merge remote-tracking branch 'upstream/main' 2023-04-26 21:25:21 +08:00
Julien Pivotto d4bf47766e
Merge pull request #12292 from tpaschalis/fix-recommended-protoc
Fix recommended protoc version
2023-04-26 14:38:32 +02:00
Paschalis Tsilias 8a34c43515
Update prompb/README.md
Co-authored-by: Julien Pivotto <roidelapluie@o11y.eu>
Signed-off-by: Paschalis Tsilias <tpaschalis@users.noreply.github.com>
2023-04-26 12:57:20 +03:00
Paschalis Tsilias 55626c6911 Fix final newline
Signed-off-by: Paschalis Tsilias <paschalist0@gmail.com>
2023-04-26 12:44:15 +03:00
Paschalis Tsilias 93f64754c0 Remove extra line
Signed-off-by: Paschalis Tsilias <paschalist0@gmail.com>
2023-04-26 12:43:19 +03:00
Jesus Vazquez 0bf707e288
Merge pull request #12293 from jesusvazquez/jvp/propose-jesus-vazquez-as-2-45-release-shepherd
Propose Jesus Vazquez as 2.45 release shepherd
2023-04-25 21:02:30 +02:00
Jesus Vazquez 38de61b59b Propose Jesus Vazquez as 2.45 release shepherd
Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>
2023-04-25 17:59:00 +02:00
Paschalis Tsilias 417e847662
Update prompb/README.md
Co-authored-by: Julien Pivotto <roidelapluie@o11y.eu>
Signed-off-by: Paschalis Tsilias <tpaschalis@users.noreply.github.com>
2023-04-25 17:17:22 +03:00
Paschalis Tsilias c06c02b3b1 Fix recommended protoc version
Signed-off-by: Paschalis Tsilias <paschalist0@gmail.com>
2023-04-25 16:27:39 +03:00
cui fliter 276ca6a883 fix some comments
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-04-25 14:19:16 +08:00
Bryan Boreham cf1bea344a
Merge pull request #12191 from narqo/web-gomemlimit
Display GOMEMLIMIT in runtime info
2023-04-24 13:13:06 +02:00
Vladimir Varankin d281ebb178 web: display GOMEMLIMIT in runtime info
Signed-off-by: Vladimir Varankin <vladimir@varank.in>
2023-04-23 20:24:34 +02:00
Julien Pivotto 7cd9f8a340
Merge pull request #12285 from bboreham/update-older-go
Update test_golang_oldest to 1.19
2023-04-22 15:55:59 +02:00
Bryan Boreham 13938d0ccc Update test_golang_oldest to 1.19
Since test_go is on 1.20, and it should use the previous version.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-04-22 10:16:49 +02:00
Björn Rabenstein d52a976ee1
Merge pull request #12272 from zenador/check-histogram-type-on-convert
Perform integer/float histogram type checking on conversions
2023-04-21 21:52:00 +02:00
Jeanette Tan 1102ffd188 Fix according to code review
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-04-22 02:27:15 +08:00
Jeanette Tan e9a1e26ab7 Perform integer/float histogram type checking on conversions, and use a consistent method for determining integer vs float histogram
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-04-22 02:27:15 +08:00
Julien Pivotto 8f1dc4a70f
Merge pull request #12248 from yeya24/consistent-response
Use same error for instant and range query when 400
2023-04-21 11:44:20 +02:00
Julien Pivotto 0b212fd123
Merge pull request #12279 from mmorel-35/linters
golangci-lint: remove skip-cache and restore singleCaseSwitch rule
2023-04-20 19:18:07 +02:00
Julien Pivotto 388eb03923
Merge pull request #12277 from roidelapluie/restore-main
Revert type casting removal
2023-04-20 19:17:32 +02:00
Matthieu MOREL 7e9acc2e46
golangci-lint: remove skip-cache and restore singleCaseSwitch rule
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-04-20 18:43:51 +02:00
Björn Rabenstein 78cd9ae2c3
Merge pull request #12264 from rabenhorst/sample-ring-iterator-mixed-histograms-fix
Fix for `sampleRingIterator` with mixed histograms
2023-04-20 16:58:18 +02:00
Julien Pivotto 637235f0a6 Revert type casting removal
This reverts the removal of type casting due to an error in the
dragonfly integration. The change in the type casting introduced by the
commit causes a type mismatch, resulting in the following errors:

util/runtime/limits_default.go:42:57: cannot use rlimit.Cur (variable of type int64) as type uint64 in argument to limitToString
util/runtime/limits_default.go:42:90: cannot use rlimit.Max (variable of type int64) as type uint64 in argument to limitToString

Reverting this commit to resolve the type mismatch error and maintain compatibility with the dragonfly integration.

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-04-20 16:36:25 +02:00
Julien Pivotto f7c6130ff2
Merge pull request #12251 from prymitive/query_samples_total
Add query_samples_total metric
2023-04-20 15:48:24 +02:00
Julien Pivotto e2512078e5
Merge pull request #12241 from mmorel-35/linter/nilerr
enable gocritic, unconvert and unused linters
2023-04-20 15:13:31 +02:00
Bryan Boreham 59176e5a97
Merge pull request #12271 from bboreham/update-go-deps
Update many Go dependencies
2023-04-20 14:23:07 +02:00
gotjosh 2f22c8b7f8
Merge pull request #12270 from prometheus/gotjosh/allow-filtering-of-rules-by-name-api
Rules API: Allow filtering by rule name
2023-04-20 12:03:08 +01:00
gotjosh e78be38cc0
don't show empty groups
Signed-off-by: gotjosh <josue.abreu@gmail.com>
2023-04-20 11:20:20 +01:00
gotjosh 74e6668e87
update docs
Signed-off-by: gotjosh <josue.abreu@gmail.com>
2023-04-20 09:34:15 +01:00
Bryan Boreham 1f04415494 Update many Go dependencies
Ran `make update-go-deps` then hand-edited to remove any downgrades.

Then backed out changes to:
* Azure: still waiting someone to test this.
* Kubernetes: needs update elsewhere to klog.
* kube-openapi: it doesn't compile with previous Go version.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-04-20 09:24:03 +02:00
Matthieu MOREL bae9a21200
Merge branch 'main' into linter/nilerr
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-04-19 19:56:39 +02:00