ian woolf
025528a5d6
cmd: use os.MkdirTemp instead of ioutil.TempDir ( #10320 )
...
Signed-off-by: ianwoolf <btw515wolf2@gmail.com>
3 years ago
Levi Harrison
a9e2ffb717
Specify type in metadata parser errors ( #10269 )
3 years ago
David Leadbeater
51a023dc24
Run required checks always ( #10405 )
...
i.e. even if there's no Go code changes. That way the required checks
don't need bypassing.
Signed-off-by: David Leadbeater <dgl@dgl.cx>
3 years ago
dependabot[bot]
9dbd1cc1b9
build(deps-dev): bump typescript from 4.5.2 to 4.6.2 in /web/ui ( #10402 )
...
Bumps [typescript](https://github.com/Microsoft/TypeScript ) from 4.5.2 to 4.6.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases )
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.5.2...v4.6.2 )
---
updated-dependencies:
- dependency-name: typescript
dependency-type: direct:development
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>
3 years ago
Łukasz Mierzwa
4e3b6fc043
Upgrade create-react-app to v5 ( #10396 )
...
* Upgrade create-react-app to v5
Some other dependencies needs to be upgraded as well, plus some typescript errors fixed.
Signed-off-by: Łukasz Mierzwa <l.mierzwa@gmail.com>
* Use ESM imports for codemirror-promql
Signed-off-by: Łukasz Mierzwa <l.mierzwa@gmail.com>
* Update FontAwesome to v6
Signed-off-by: Łukasz Mierzwa <l.mierzwa@gmail.com>
3 years ago
Jayapriya Pai
edfe657b54
scrape: Fix label_limits cache usage ( #10370 )
...
Fixes #10344
Signed-off-by: Jayapriya Pai <janantha@redhat.com>
3 years ago
Łukasz Mierzwa
da23c4649a
Enable misspell check in golangci-lint ( #10393 )
...
Signed-off-by: Łukasz Mierzwa <l.mierzwa@gmail.com>
3 years ago
Łukasz Mierzwa
a4317bf0ec
Run gofumpt on all files ( #10392 )
...
* Run gofumpt on all files
Getting golangci-lint errors when building on my laptop, possibly because I have newer version of gofumpt then what it was formatted with.
Run gofumpt -w -extra on all files as it will be needed in the future anyway.
* Update golangci-lint to v1.44.2
v1.44.0 upgraded gofumpt so bumping version in CI will help keep formatting correct for everyone
* Address golangci-lint error
Getting 'error-strings: error strings should not be capitalized or end with punctuation or a newline' from revive here.
Drop new line.
Signed-off-by: Łukasz Mierzwa <l.mierzwa@gmail.com>
3 years ago
dependabot[bot]
8e9d5c57ed
build(deps): bump actions/checkout from 2 to 3 ( #10382 )
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years ago
dependabot[bot]
7373bcc842
build(deps): bump github.com/Azure/azure-sdk-for-go ( #10390 )
...
Bumps [github.com/Azure/azure-sdk-for-go](https://github.com/Azure/azure-sdk-for-go ) from 61.6.0+incompatible to 62.0.0+incompatible.
- [Release notes](https://github.com/Azure/azure-sdk-for-go/releases )
- [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/CHANGELOG.md )
- [Commits](https://github.com/Azure/azure-sdk-for-go/compare/v61.6.0...v62.0.0 )
---
updated-dependencies:
- dependency-name: github.com/Azure/azure-sdk-for-go
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years ago
dependabot[bot]
9fe258a655
build(deps): bump github.com/aws/aws-sdk-go from 1.43.4 to 1.43.10 ( #10391 )
...
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go ) from 1.43.4 to 1.43.10.
- [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.43.4...v1.43.10 )
---
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>
3 years ago
dependabot[bot]
2ab54a9e77
build(deps): bump github.com/envoyproxy/protoc-gen-validate ( #10383 )
...
Bumps [github.com/envoyproxy/protoc-gen-validate](https://github.com/envoyproxy/protoc-gen-validate ) from 0.6.3 to 0.6.6.
- [Release notes](https://github.com/envoyproxy/protoc-gen-validate/releases )
- [Commits](https://github.com/envoyproxy/protoc-gen-validate/compare/v0.6.3...v0.6.6 )
---
updated-dependencies:
- dependency-name: github.com/envoyproxy/protoc-gen-validate
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>
3 years ago
cui fliter
c9b56d1a49
all: fix some typos ( #10389 )
...
Signed-off-by: cuishuang <imcusg@gmail.com>
3 years ago
dependabot[bot]
1ecebc3a20
build(deps): bump bufbuild/buf-setup-action from 0.6.0 to 1.1.0 ( #10380 )
...
Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action ) from 0.6.0 to 1.1.0.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases )
- [Commits](https://github.com/bufbuild/buf-setup-action/compare/v0.6.0...v1.1.0 )
---
updated-dependencies:
- dependency-name: bufbuild/buf-setup-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years ago
Chris Marchbanks
e25a599255
Cut 2.34.0-rc.0 ( #10347 )
...
Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
3 years ago
Ganesh Vernekar
4cc25c0cb0
Fix panic on query when m-map replay fails with snapshot enabled ( #10348 )
...
* Fix panic on query when m-map replay fails with snapshot enabled
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
* Fix review
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
* Fix flake
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
3 years ago
dependabot[bot]
0b835e341b
build(deps): bump github.com/aws/aws-sdk-go from 1.43.3 to 1.43.4 ( #10346 )
...
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go ) from 1.43.3 to 1.43.4.
- [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.43.3...v1.43.4 )
---
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>
3 years ago
Chris Marchbanks
4b195fa080
Merge pull request #10340 from prometheus/csmarchbanks/2.34-go-upgrades
...
Upgrade go dependencies for the release
3 years ago
Björn Rabenstein
d1edb006c1
Merge pull request #10341 from prometheus/release-2.33
...
Merge release-2.33 forward into main
3 years ago
Julien Pivotto
fb2da1f26a
Followup on tracing ( #10338 )
...
* Simplify code by letting common deal with empty TLS config
* Improve error message if we notice a user is putting an authorization
header into its configuration.
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
3 years ago
Chris Marchbanks
3e0a0a5d59
Fix Scaleway test
...
The upgraded client adds order=creation_date_desc to the query
parameters causing the tests to fail. Instead of checking the full URI,
just check that the path is correct.
Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
3 years ago
Chris Marchbanks
b80ef363fa
Upgrade go dependencies for the release
...
The k8s dependencies have been manually updated to the most recent
0.22.x release due to 0.23.x requiring go 1.17.
Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
3 years ago
Ganesh Vernekar
83032011a5
Cut v2.33.4 ( #10337 )
...
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
3 years ago
Matej Gera
0acbe5e3f5
Tracing: Add additional options to align with the upstream exporter ( #10276 )
...
* Enhance configuration
Signed-off-by: Matej Gera <matejgera@gmail.com>
3 years ago
dependabot[bot]
61bcf47706
build(deps): bump go.opentelemetry.io/otel/trace from 1.2.0 to 1.4.0 ( #10292 )
...
Bumps [go.opentelemetry.io/otel/trace](https://github.com/open-telemetry/opentelemetry-go ) from 1.2.0 to 1.4.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases )
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md )
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.2.0...v1.4.0 )
---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/trace
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>
3 years ago
dependabot[bot]
bc15861e31
build(deps-dev): bump @types/react from 17.0.36 to 17.0.39 in /web/ui ( #10323 )
...
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react ) from 17.0.36 to 17.0.39.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases )
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react )
---
updated-dependencies:
- dependency-name: "@types/react"
dependency-type: direct:development
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>
3 years ago
Ganesh Vernekar
24827782cb
Fix panics when m-mapping head chunks ( #10316 )
...
* Fix panics when m-mapping head chunks
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
* Fix review comments
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
* Fix reviews
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
3 years ago
Augustin Husson
779a9118db
bump kvsearch to v0.5.0 that support generic type. It removes unnecessary cast in the process ( #10296 )
...
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
3 years ago
Julien Pivotto
e239e3ee8b
github action: Add buf-lint, fix buf ( #10307 )
...
* github action: Add buf-lint, fix buf
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
3 years ago
Dieter Plaetinck
aa8874bc56
clarify Head.appendableMinValidTime ( #10303 )
...
Signed-off-by: Dieter Plaetinck <dieter@grafana.com>
3 years ago
DrAuYueng
5a6e26556b
Add an option to use the external labels as selectors for the remote read endpoint ( #10254 )
...
* An option to ignore external_labels
Signed-off-by: DrAuYueng <ouyang1204@gmail.com>
3 years ago
Rémy Léone
4cc18b1109
add support for buf ( #10112 )
...
* add support for buf
Co-authored-by: Alex McKinney <alexmckinney01@gmail.com>
Signed-off-by: Rémy Léone <rleone@scaleway.com>
3 years ago
Tobias Klausmann
b998636893
Improve error logging for missing config and QL dir ( #10260 )
...
* Improve error logging for missing config and QL dir
Currently, when Prometheus can't open its config file or the query
logging dir under the data dir, it only logs what it has been given
default or commandline/config. Depending on the environment this can be
less than helpful, since the working directory may be unclear to the
user. I have specifically kept the existing error messages as intact as
possible to a) still log the parameter as given and b) cause as little
disruption for log-parsers/-analyzers as possible.
So in case of the config file or the data dir being non-absolute paths,
I use os.GetWd to find the working dir and assemble an absolute path for
error logging purposes. If GetWd fails, we just log "unknown", as
recovering from an error there would be very complex measure, likely not
worth the code/effort.
Example errors:
```
$ ./prometheus
ts=2022-02-06T16:00:53.034Z caller=main.go:445 level=error msg="Error loading config (--config.file=prometheus.yml)" fullpath=/home/klausman/src/prometheus/prometheus.yml err="open prometheus.yml: no such file or directory"
$ touch prometheus.yml
$ ./prometheus
[...]
ts=2022-02-06T16:01:00.992Z caller=query_logger.go:99 level=error component=activeQueryTracker msg="Error opening query log file" file=data/queries.active fullpath=/home/klausman/src/prometheus/data/queries.active err="open data/queries.active: permission denied"
panic: Unable to create mmap-ed active query log
[...]
$
```
Signed-off-by: Tobias Klausmann <klausman@schwarzvogel.de>
* Replace our own logic with just using filepath.Abs()
Signed-off-by: Tobias Klausmann <klausman@schwarzvogel.de>
* Further simplification
Signed-off-by: Tobias Klausmann <klausman@schwarzvogel.de>
* Review edits
Signed-off-by: Tobias Klausmann <klausman@schwarzvogel.de>
* Review edits
Signed-off-by: Tobias Klausmann <klausman@schwarzvogel.de>
* Review edits
Signed-off-by: Tobias Klausmann <klausman@schwarzvogel.de>
3 years ago
Björn Rabenstein
0ce1546097
Merge pull request #10295 from jyz0309/add-NaN-case
...
PromQL: Define and document behavior of quantile and histogram_quantile with φ=NaN
3 years ago
David N Perkins
fcb6f18122
Uyuni login less often ( #10072 )
...
* Initial implementation of caching the uyuni login token
Signed-off-by: David N Perkins <David.N.Perkins@ibm.com>
3 years ago
jyz0309
e40deb1086
address comment
...
Signed-off-by: jyz0309 <45495947@qq.com>
3 years ago
Matthias Loibl
afdd1357e0
Merge pull request #10267 from roidelapluie/contenttype
...
Improve content-type error handling
3 years ago
jyz0309
02e032884a
add doc
...
Signed-off-by: jyz0309 <45495947@qq.com>
3 years ago
jyz0309
7f32a5d0d6
add NaN case
...
Signed-off-by: jyz0309 <45495947@qq.com>
3 years ago
Julien Pivotto
9a2e93228e
Switch to grafana/regexp everywhere ( #10268 )
...
Let's have a consistent library for regexp.
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
3 years ago
Keegan Carruthers-Smith
e17d6aad01
Bump github.com/containerd/containerd to 1.5.9 ( #10282 )
...
There is the critical CVE-2021-43816 against containerd which is only
fixed in v1.5.9. In practice I don't believe this affects prometheus.
However, upgrading will help quieten loud vulnerability scanners.
To upgrade I ran go get github.com/containerd/containerd@v1.5.9.
Signed-off-by: Keegan Carruthers-Smith <keegan.csmith@gmail.com>
3 years ago
Julien Pivotto
b0d70557b7
Merge pull request #10285 from prometheus/release-2.33
3 years ago
Julien Pivotto
56e14463bc
Release 2.33.3
...
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
3 years ago
Julien Pivotto
002ceb7232
Fix panic in Azure SD when no public interface is set.
...
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
3 years ago
Julien Pivotto
b4714db0a6
Release 2.33.2 ( #10286 )
...
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
3 years ago
Chris Marchbanks
bfb1500a38
Fix deadlock when stopping a shard ( #10279 )
...
If a queue is stopped and one of its shards happens to hit the
batch_send_deadline at the same time a deadlock can occur where stop
holds the mutex and will not release it until the send is finished, but
the send needs the mutex to retrieve the most recent batch. This is
fixed by using a second mutex just for writing.
In addition, the test I wrote exposed a case where during shutdown a
batch could be sent twice due to concurrent calls to queue.Batch() and
queue.FlushAndShutdown(). Protect these with a mutex as well.
Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
3 years ago
johncming
37c6ef9661
discovery/digitalocean: make do api be aware of discovery context. ( #10281 )
...
Signed-off-by: johncming <johncming@yahoo.com>
3 years ago
Levi Harrison
1b3443ede1
Azure: Fix panic when IP Address isn't set ( #10280 )
3 years ago
Bryan Boreham
579331446a
Allow downstream projects to use faster regexp ( #10251 )
...
* Add benchmark for FastRegexMatcher
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
* Use modified regexp package with optimisations
See https://github.com/grafana/regexp/tree/speedup#readme
Includes the following changes proposed upstream:
* [regexp: allow patterns with no alternates to be one-pass](https://go-review.googlesource.com/c/go/+/353711 )
* [regexp: speed up onepass prefix check](https://go-review.googlesource.com/c/go/+/354909 )
* [regexp: handle prefix string with fold-case](https://go-review.googlesource.com/c/go/+/358756 )
* [regexp: avoid copying each instruction executed](https://go-review.googlesource.com/c/go/+/355789 )
* [regexp: allow prefix string anchored at beginning](https://go-review.googlesource.com/c/go/+/377294 )
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
* Use regexp code identical to upstream Go
Change `grafana/regexp` import to use `main` branch.
This means Prometheus is not using the proposed optimisations, but
downstream users of Prometheus code are able to `replace` the library
with the `speedup` branch which does.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
3 years ago
Julien Pivotto
f695df843f
Improve content-type error handling
...
- Call err everywhere
- Change log message to underscore-separated field
Followup on #10186
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
3 years ago