Commit graph

1421 commits

Author SHA1 Message Date
Julien Pivotto 5198eac6f4 Release 2.40.6 with security fixes
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-12-09 11:04:13 +01:00
Ganesh Vernekar 44af4716c8
Cut v2.40.5 (#11646)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-12-01 18:16:11 +05:30
Julien Pivotto 31a2db3ae9 Fix Basic Authentication Bypass (CVE-2022-46146)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-11-29 10:44:09 +01:00
Ganesh Vernekar aa3f8d0975
Cut v2.40.3
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-11-23 18:16:54 +05:30
Ganesh Vernekar ef886ac4b3
Cut v2.40.2
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-11-16 13:54:46 +01:00
Julius Volz 1eb327b99b
Fix black-on-black metric name color in dark mode (#11572)
The color should not be set explicitly at all. That way it simply inherits the
theme's default color, as before
https://github.com/prometheus/prometheus/pull/11068.

Fixes https://github.com/prometheus/prometheus/issues/11568

Signed-off-by: Julius Volz <julius.volz@gmail.com>

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2022-11-16 13:50:37 +01:00
Ganesh Vernekar 965274259f
Cut v2.40.1 (#11557)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-11-09 13:31:01 +01:00
Ganesh Vernekar c08d76b363
Cut v2.40.0 (#11543)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-11-07 19:06:52 +01:00
Ganesh Vernekar 033b3efb12
Cut v2.40.0-rc.0 (#11525)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-11-03 15:20:38 -04:00
Ganesh Vernekar 6dd4e907a3
Update dependencies for 2.40 (#11524)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-11-03 11:48:01 -04:00
Ganesh Vernekar e3719d670b
Merge remote-tracking branch 'upstream/main' into sparsehistogram
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-10-25 14:38:56 -04:00
Alan Protasio 5ac12ac351
api: Wrapped promQL based API errors with returnAPIError function (#11356)
* wrap api error on get series/labels on `returnAPIError` function

Signed-off-by: Alan Protasio <approtas@amazon.com>

* lint

Signed-off-by: Alan Protasio <approtas@amazon.com>

* query exemplars

Signed-off-by: Alan Protasio <approtas@amazon.com>

Signed-off-by: Alan Protasio <approtas@amazon.com>
2022-10-20 11:17:00 +02:00
Björn Rabenstein 00aa85e06e
Merge pull request #11452 from prometheus/beorn7/doc2
web: Mark experimental state of native histograms in tooltips
2022-10-12 15:17:22 +02:00
beorn7 6c0c093e0f web: Mark experimental state of native histograms in tooltips
Signed-off-by: beorn7 <beorn@grafana.com>
2022-10-12 14:45:08 +02:00
Ganesh Vernekar 648be89822
Merge remote-tracking branch 'upstream/main' into fix-conflict
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-10-12 14:20:02 +05:30
Ganesh Vernekar 82925eed4a
Merge pull request #11429 from prometheus/release-2.39
Merge back release branch
2022-10-07 22:37:34 +05:30
Ganesh Vernekar dcd6af9e0d
Cut v2.39.1 (#11428)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-10-07 21:13:46 +05:30
Jesus Vazquez e934d0f011 Merge 'main' into sparsehistogram
Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>
2022-10-05 22:14:49 +02:00
Ganesh Vernekar 73d805cf6c
Merge pull request #11414 from prometheus/release-2.39
Merge release branch into main
2022-10-05 11:38:00 +05:30
Ganesh Vernekar 6d7f26c46f
Cut v2.39.0 (#11407)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
Signed-off-by: Augustin Husson <augustin.husson@amadeus.com>
Co-authored-by: Augustin Husson <augustin.husson@amadeus.com>
2022-10-05 10:19:27 +05:30
Ganesh Vernekar f7a7b18cdc
Merge pull request #11403 from prometheus/release-2.39
Merge release-2.39 into main again
2022-10-03 19:49:34 +05:30
Augustin Husson ffb0ec2ca4
adjust package-json to match the correct version of the modules (#11401)
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2022-10-03 19:16:41 +05:30
Ganesh Vernekar f024d769e7
Add API test for histogram
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-10-03 18:53:57 +05:30
Julien Pivotto 9e220f552f
Merge pull request #11398 from prometheus/release-2.39
Merge back release 2.39
2022-10-03 14:23:43 +02:00
Bryan Boreham 3330d85ba8
Replace sort.Strings and sort.Ints with faster slices.Sort (#11318)
Use new experimental package `golang.org/x/exp/slices`.

slices.Sort works on values that are directly comparable, like ints,
so avoids the overhad of an interface call to `.Less()`.

Left tests unchanged, because they don't need the speed and it may be
a cross-check that slices.Sort gives the same answer.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2022-09-30 20:03:56 +05:30
Ganesh Vernekar 23588fb43a
Bump the UI package to v2.39.0-rc.0 (#11367)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-09-30 13:04:19 +05:30
Marijn Haverbeke 8dbb2eaf0b
Clean up the Lezer grammar output tree (#11333)
Signed-off-by: Marijn Haverbeke <marijn@haverbeke.nl>
2022-09-29 22:26:46 +02:00
Miguel Ángel Ortuño e4b87a7a2a
api: export point marshaling functions (#11323)
Export `marshalTimestamp` and `marshalValue` functions by moving them under their own util package.

Signed-off-by: Miguel Ángel Ortuño <ortuman@gmail.com>
2022-09-29 20:16:48 +05:30
Augustin Husson f67f87c82b
Update npm deps for v2.39 and fix the script called to do it (#11332)
* fix the way to get the list of workspaces

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>

* update UI dependencies

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2022-09-21 23:36:28 +02:00
Jesus Vazquez c1b669bf9b
Add out-of-order sample support to the TSDB (#11075)
* Introduce out-of-order TSDB support

This implementation is based on this design doc:
https://docs.google.com/document/d/1Kppm7qL9C-BJB1j6yb6-9ObG3AbdZnFUBYPNNWwDBYM/edit?usp=sharing

This commit adds support to accept out-of-order ("OOO") sample into the TSDB
up to a configurable time allowance. If OOO is enabled, overlapping querying
are automatically enabled.

Most of the additions have been borrowed from
https://github.com/grafana/mimir-prometheus/
Here is the list ist of the original commits cherry picked
from mimir-prometheus into this branch:
- 4b2198d7ec
- 2836e5513f
- 00b379c3a5
- ff0dc75758
- a632c73352
- c6f3d4ab33
- 5e8406a1d4
- abde1e0ba1
- e70e769889
- df59320886

Co-authored-by: Jesus Vazquez <jesus.vazquez@grafana.com>
Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com>
Co-authored-by: Dieter Plaetinck <dieter@grafana.com>
Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>

* gofumpt files

Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>

* Add license header to missing files

Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>

* Fix OOO tests due to existing chunk disk mapper implementation

Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>

* Fix truncate int overflow

Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>

* Add Sync method to the WAL and update tests

Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>

* remove useless sync

Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>

* Update minOOOTime after truncating Head

* Update minOOOTime after truncating Head

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Fix lint

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Add a unit test

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>

* Load OutOfOrderTimeWindow only once per appender

Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>

* Fix OOO Head LabelValues and PostingsForMatchers

Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>

* Fix replay of OOO mmap chunks

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Remove unnecessary err check

Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>

* Prevent panic with ApplyConfig

Signed-off-by: Ganesh Vernekar 15064823+codesome@users.noreply.github.com
Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>

* Run OOO compaction after restart if there is OOO data from WBL

Signed-off-by: Ganesh Vernekar 15064823+codesome@users.noreply.github.com
Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>

* Apply Bartek's suggestions

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>

* Refactor OOO compaction

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Address comments and TODOs

- Added a comment explaining why we need the allow overlapping
  compaction toggle
- Clarified TSDBConfig OutOfOrderTimeWindow doc
- Added an owner to all the TODOs in the code

Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>

* Run go format

Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>

* Fix remaining review comments

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Fix tests

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Change wbl reference when truncating ooo in TestHeadMinOOOTimeUpdate

Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>

* Fix TestWBLAndMmapReplay test failure on windows

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Address most of the feedback

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Refactor the block meta for out of order

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Fix windows error

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Fix review comments

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
Signed-off-by: Ganesh Vernekar 15064823+codesome@users.noreply.github.com
Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com>
Co-authored-by: Dieter Plaetinck <dieter@grafana.com>
Co-authored-by: Oleg Zaytsev <mail@olegzaytsev.com>
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
2022-09-20 22:35:50 +05:30
Luis Filipe Pessoa 9591103bb9
Allow copying label-value pair to buffer on click (#11229)
* Allow copying label-value pair to buffer on click

Kept similar DOM structure to keep test compatibility.
Using `navigator.clipboard` API since it is used by the current standard browsers.
React hot toast is used to notify that the text was successfully copied into clipboard.

Signed-off-by: lpessoa <luisalmeida@yape.com.pe>

* Using reactstrap for toast notification

Using the bootstrap toast notification provided by reactstrap.
Clipboard handling is managed using React.Context via a shared callback.

Updated css according to CR suggestions.

Signed-off-by: lpessoa <luisalmeida@yape.com.pe>

* Changes from CR comments

Cleaning up renderFormatted method.
Renamed Clipboard to ToastContext.
Updated tests.

Signed-off-by: Luis Pessoa <luisalmeida@yape.com.pe>

Signed-off-by: lpessoa <luisalmeida@yape.com.pe>
Signed-off-by: Luis Pessoa <luisalmeida@yape.com.pe>
2022-09-20 14:30:24 +02:00
Alan Protasio f1a3dbbb6b
GetSeries should Select sorted results only if more than one matcher is requested (#11313)
Signed-off-by: Alan Protasio <approtas@amazon.com>

Signed-off-by: Alan Protasio <approtas@amazon.com>
2022-09-16 09:40:41 +02:00
Julien Pivotto 96d5a32659
Update go to 1.19, set min version to 1.18 (#11279)
* Update go to 1.19, set min version to 1.18

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

* Update golangci-lint

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

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-09-07 11:30:48 +02:00
Cosrider bef6556ca5
delete redundant alias (#11180)
Signed-off-by: Cosrider <cosrider7@gmail.com>

Signed-off-by: Cosrider <cosrider7@gmail.com>
2022-08-31 15:50:38 +02:00
Julius Volz a1fcfe62db Merge branch 'release-2.38' into main
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2022-08-22 15:41:59 +02:00
Nicolas Dumazet 9594fa4dbd
/-/{healthy,ready}/ respond to HEAD (#11160)
Some frameworks issue HEAD requests to determine health.

This resolves prometheus/prometheus#11159

Signed-off-by: Nicolas Dumazet <nicdumz.commits@gmail.com>

Signed-off-by: Nicolas Dumazet <nicdumz.commits@gmail.com>
2022-08-16 21:06:26 +02:00
Julius Volz 818d6e6088
Cut Prometheus v2.38.0 (#11161)
Signed-off-by: Julius Volz <julius.volz@gmail.com>

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2022-08-16 15:19:26 +02:00
beorn7 c9fd3c235d Merge branch 'main' into sparsehistogram 2022-08-10 17:54:37 +02:00
Augustin Husson f486efbb9a
codemirror-promql: add method to fetch flags in prometheus client (#11090)
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2022-08-03 14:15:32 +02:00
Jorge Luis Betancourt 595d134354
web ui: Tweak colors in the dark theme to improve contrast ratio (#11068)
* Tweak colors in the dark theme to improve contrast

Some colors from the dark theme used in the query editor have a very low
contrast ratio with the background.

Signed-off-by: Jorge Luis Betancourt Gonzalez <jorge-luis.betancourt@trivago.com>

* Avoid duplicated function call when in dark mode

Co-authored-by: Julius Volz <julius.volz@gmail.com>
Signed-off-by: Jorge Luis Betancourt Gonzalez <jorge-luis.betancourt@trivago.com>

* Apply styles for the matching bracket when focused in dark mode

Signed-off-by: Jorge Luis Betancourt Gonzalez <jorge-luis.betancourt@trivago.com>

* Improve style of the matching brackets when focused

Signed-off-by: Jorge Luis Betancourt Gonzalez <jorge-luis.betancourt@trivago.com>

Co-authored-by: Julius Volz <julius.volz@gmail.com>
2022-08-01 15:28:09 +02:00
Nidhi Dhamnani d9c650b92e
Fixed typo in UI README.md (#11057)
Signed-off-by: Nidhi Dhamnani <nidhidhamnani@gmail.com>
2022-07-26 09:21:18 +02:00
Julius Volz b8af4632be
Allow formatting PromQL expressions in the UI (#11039)
* Allow formatting PromQL expressions in the UI

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Improve error handling, also catch HTTP errors

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Remove now-unneeded async property

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Disable format button when already formatted

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Disable format button when there are linter errors

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Remove disabling of format button again for linter errors

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2022-07-21 18:05:41 +02:00
Julius Volz b57deb6eb0
Add /api/v1/format_query API endpoint for formatting queries (#11036)
* Add /api/v1/format_query API endpoint for formatting queries

This uses the formatting functionality introduced in
https://github.com/prometheus/prometheus/pull/10544.

I've chosen "query" instead of "expr" in both the endpoint and parameter
names to stay consistent with the existing API endpoints. Otherwise, I
would have preferred to use the term "expr".

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Add docs for /api/v1/format_query endpoint

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Add note that formatting expressions removes comments

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2022-07-20 14:55:09 +02:00
Julien Pivotto 97d7e09e0b
Merge pull request #11022 from prometheus/release-2.37
Merge back release 2.37
2022-07-14 18:30:45 +02:00
Augustin Husson 1ba2bbc5fe
codemirror-promql: fix the way to verify if it's a prometheusClient (#11018)
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2022-07-14 16:28:10 +02:00
Julien Pivotto d0a3d44a45 Release 2.37.0
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-07-14 16:02:48 +02:00
Augustin Husson 8228eb4b73
codemirror-promql: fix the way to verify if it's a prometheusClient (#11019)
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2022-07-14 15:22:44 +02:00
beorn7 53982c3562 Merge branch 'main' into sparsehistogram 2022-07-13 21:27:20 +02:00
Jaseel f8c3b0bd1c
Corrected custom prometheus client docs (#11010)
Signed-off-by: Jaseel <12792882+Spikatrix@users.noreply.github.com>
2022-07-13 10:51:51 +02:00
beorn7 28f028e938 Merge branch 'main' into sparsehistogram 2022-07-12 19:07:13 +02:00