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