Merge pull request #11662 from prometheus/release-2.40

Merge back release-2.40 branch again
pull/10706/merge
Julien Pivotto 2022-12-06 17:30:51 +01:00 committed by GitHub
commit 0b302f8a39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 27 additions and 23 deletions

View File

@ -1,5 +1,9 @@
# Changelog # Changelog
## 2.40.5 / 2022-12-01
* [BUGFIX] TSDB: Fix queries involving native histograms due to improper reset of iterators. #11643
## 2.40.4 / 2022-11-29 ## 2.40.4 / 2022-11-29
* [SECURITY] Fix basic authentication bypass vulnerability (CVE-2022-46146). GHSA-4v48-4q5m-8vx4 * [SECURITY] Fix basic authentication bypass vulnerability (CVE-2022-46146). GHSA-4v48-4q5m-8vx4

View File

@ -1 +1 @@
2.40.4 2.40.5

View File

@ -624,9 +624,9 @@ func (it *histogramIterator) Err() error {
} }
func (it *histogramIterator) Reset(b []byte) { func (it *histogramIterator) Reset(b []byte) {
// The first 2 bytes contain chunk headers. // The first 3 bytes contain chunk headers.
// We skip that for actual samples. // We skip that for actual samples.
it.br = newBReader(b[2:]) it.br = newBReader(b[3:])
it.numTotal = binary.BigEndian.Uint16(b) it.numTotal = binary.BigEndian.Uint16(b)
it.numRead = 0 it.numRead = 0

View File

@ -84,14 +84,14 @@ func TestHistogramChunkSameBuckets(t *testing.T) {
require.Equal(t, exp, act) require.Equal(t, exp, act)
// 2. Expand second iterator while reusing first one. // 2. Expand second iterator while reusing first one.
// it2 := c.Iterator(it1) it2 := c.Iterator(it)
// var res2 []pair var res2 []res
// for it2.Next() { for it2.Next() == ValHistogram {
// ts, v := it2.At() ts, h := it2.AtHistogram()
// res2 = append(res2, pair{t: ts, v: v}) res2 = append(res2, res{t: ts, h: h})
// } }
// require.NoError(t, it2.Err()) require.NoError(t, it2.Err())
// require.Equal(t, exp, res2) require.Equal(t, exp, res2)
// 3. Test iterator Seek. // 3. Test iterator Seek.
// mid := len(exp) / 2 // mid := len(exp) / 2

View File

@ -1,6 +1,6 @@
{ {
"name": "@prometheus-io/codemirror-promql", "name": "@prometheus-io/codemirror-promql",
"version": "0.40.4", "version": "0.40.5",
"description": "a CodeMirror mode for the PromQL language", "description": "a CodeMirror mode for the PromQL language",
"types": "dist/esm/index.d.ts", "types": "dist/esm/index.d.ts",
"module": "dist/esm/index.js", "module": "dist/esm/index.js",
@ -29,7 +29,7 @@
}, },
"homepage": "https://github.com/prometheus/prometheus/blob/main/web/ui/module/codemirror-promql/README.md", "homepage": "https://github.com/prometheus/prometheus/blob/main/web/ui/module/codemirror-promql/README.md",
"dependencies": { "dependencies": {
"@prometheus-io/lezer-promql": "^0.40.4", "@prometheus-io/lezer-promql": "^0.40.5",
"lru-cache": "^6.0.0" "lru-cache": "^6.0.0"
}, },
"devDependencies": { "devDependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@prometheus-io/lezer-promql", "name": "@prometheus-io/lezer-promql",
"version": "0.40.4", "version": "0.40.5",
"description": "lezer-based PromQL grammar", "description": "lezer-based PromQL grammar",
"main": "index.cjs", "main": "index.cjs",
"type": "module", "type": "module",

View File

@ -28,10 +28,10 @@
}, },
"module/codemirror-promql": { "module/codemirror-promql": {
"name": "@prometheus-io/codemirror-promql", "name": "@prometheus-io/codemirror-promql",
"version": "0.40.4", "version": "0.40.5",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@prometheus-io/lezer-promql": "^0.40.4", "@prometheus-io/lezer-promql": "^0.40.5",
"lru-cache": "^6.0.0" "lru-cache": "^6.0.0"
}, },
"devDependencies": { "devDependencies": {
@ -61,7 +61,7 @@
}, },
"module/lezer-promql": { "module/lezer-promql": {
"name": "@prometheus-io/lezer-promql", "name": "@prometheus-io/lezer-promql",
"version": "0.40.4", "version": "0.40.5",
"license": "Apache-2.0", "license": "Apache-2.0",
"devDependencies": { "devDependencies": {
"@lezer/generator": "^1.1.1", "@lezer/generator": "^1.1.1",
@ -20674,7 +20674,7 @@
}, },
"react-app": { "react-app": {
"name": "@prometheus-io/app", "name": "@prometheus-io/app",
"version": "0.40.4", "version": "0.40.5",
"dependencies": { "dependencies": {
"@codemirror/autocomplete": "^6.2.0", "@codemirror/autocomplete": "^6.2.0",
"@codemirror/commands": "^6.1.2", "@codemirror/commands": "^6.1.2",
@ -20692,7 +20692,7 @@
"@lezer/lr": "^1.2.3", "@lezer/lr": "^1.2.3",
"@nexucis/fuzzy": "^0.4.1", "@nexucis/fuzzy": "^0.4.1",
"@nexucis/kvsearch": "^0.8.1", "@nexucis/kvsearch": "^0.8.1",
"@prometheus-io/codemirror-promql": "^0.40.4", "@prometheus-io/codemirror-promql": "^0.40.5",
"bootstrap": "^4.6.2", "bootstrap": "^4.6.2",
"css.escape": "^1.5.1", "css.escape": "^1.5.1",
"downshift": "^7.0.1", "downshift": "^7.0.1",
@ -23321,7 +23321,7 @@
"@lezer/lr": "^1.2.3", "@lezer/lr": "^1.2.3",
"@nexucis/fuzzy": "^0.4.1", "@nexucis/fuzzy": "^0.4.1",
"@nexucis/kvsearch": "^0.8.1", "@nexucis/kvsearch": "^0.8.1",
"@prometheus-io/codemirror-promql": "^0.40.4", "@prometheus-io/codemirror-promql": "^0.40.5",
"@testing-library/react-hooks": "^7.0.2", "@testing-library/react-hooks": "^7.0.2",
"@types/enzyme": "^3.10.12", "@types/enzyme": "^3.10.12",
"@types/flot": "0.0.32", "@types/flot": "0.0.32",
@ -23372,7 +23372,7 @@
"@lezer/common": "^1.0.1", "@lezer/common": "^1.0.1",
"@lezer/highlight": "^1.1.2", "@lezer/highlight": "^1.1.2",
"@lezer/lr": "^1.2.3", "@lezer/lr": "^1.2.3",
"@prometheus-io/lezer-promql": "^0.40.4", "@prometheus-io/lezer-promql": "^0.40.5",
"@types/lru-cache": "^5.1.1", "@types/lru-cache": "^5.1.1",
"isomorphic-fetch": "^3.0.0", "isomorphic-fetch": "^3.0.0",
"lru-cache": "^6.0.0", "lru-cache": "^6.0.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "@prometheus-io/app", "name": "@prometheus-io/app",
"version": "0.40.4", "version": "0.40.5",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@codemirror/autocomplete": "^6.2.0", "@codemirror/autocomplete": "^6.2.0",
@ -19,7 +19,7 @@
"@lezer/common": "^1.0.1", "@lezer/common": "^1.0.1",
"@nexucis/fuzzy": "^0.4.1", "@nexucis/fuzzy": "^0.4.1",
"@nexucis/kvsearch": "^0.8.1", "@nexucis/kvsearch": "^0.8.1",
"@prometheus-io/codemirror-promql": "^0.40.4", "@prometheus-io/codemirror-promql": "^0.40.5",
"bootstrap": "^4.6.2", "bootstrap": "^4.6.2",
"css.escape": "^1.5.1", "css.escape": "^1.5.1",
"downshift": "^7.0.1", "downshift": "^7.0.1",