mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-10 07:34:04 -08:00
Merge pull request #14051 from prometheus/resolve-conflicts-2.52
Merge `release-2.52` back to main
This commit is contained in:
commit
93be83069e
|
@ -8,6 +8,10 @@
|
|||
* [BUGFIX] OTLP: Don't generate target_info unless at least one identifying label is defined. #13991
|
||||
* [BUGFIX] OTLP: Don't generate target_info unless there are metrics. #13991
|
||||
|
||||
## 2.52.0-rc.1 / 2024-05-03
|
||||
|
||||
* [BUGFIX] API: Fix missing comma during JSON encoding of API results. #14047
|
||||
|
||||
## 2.52.0-rc.0 / 2024-04-22
|
||||
|
||||
* [CHANGE] TSDB: Fix the predicate checking for blocks which are beyond the retention period to include the ones right at the retention boundary. #9633
|
||||
|
|
|
@ -241,8 +241,11 @@ func labelsIsEmpty(ptr unsafe.Pointer) bool {
|
|||
func unsafeMarshalVectorJSON(ptr unsafe.Pointer, stream *jsoniter.Stream) {
|
||||
v := *((*promql.Vector)(ptr))
|
||||
stream.WriteArrayStart()
|
||||
for _, s := range v {
|
||||
for i, s := range v {
|
||||
marshalSampleJSON(s, stream)
|
||||
if i != len(v)-1 {
|
||||
stream.WriteMore()
|
||||
}
|
||||
}
|
||||
stream.WriteArrayEnd()
|
||||
}
|
||||
|
@ -251,8 +254,11 @@ func unsafeMarshalVectorJSON(ptr unsafe.Pointer, stream *jsoniter.Stream) {
|
|||
func unsafeMarshalMatrixJSON(ptr unsafe.Pointer, stream *jsoniter.Stream) {
|
||||
m := *((*promql.Matrix)(ptr))
|
||||
stream.WriteArrayStart()
|
||||
for _, s := range m {
|
||||
for i, s := range m {
|
||||
marshalSeriesJSON(s, stream)
|
||||
if i != len(m)-1 {
|
||||
stream.WriteMore()
|
||||
}
|
||||
}
|
||||
stream.WriteArrayEnd()
|
||||
}
|
||||
|
|
|
@ -29,6 +29,40 @@ func TestJsonCodec_Encode(t *testing.T) {
|
|||
response interface{}
|
||||
expected string
|
||||
}{
|
||||
{
|
||||
response: &QueryData{
|
||||
ResultType: parser.ValueTypeVector,
|
||||
Result: promql.Vector{
|
||||
promql.Sample{
|
||||
Metric: labels.FromStrings("__name__", "foo"),
|
||||
T: 1000,
|
||||
F: 1,
|
||||
},
|
||||
promql.Sample{
|
||||
Metric: labels.FromStrings("__name__", "bar"),
|
||||
T: 2000,
|
||||
F: 2,
|
||||
},
|
||||
},
|
||||
},
|
||||
expected: `{"status":"success","data":{"resultType":"vector","result":[{"metric":{"__name__":"foo"},"value":[1,"1"]},{"metric":{"__name__":"bar"},"value":[2,"2"]}]}}`,
|
||||
},
|
||||
{
|
||||
response: &QueryData{
|
||||
ResultType: parser.ValueTypeMatrix,
|
||||
Result: promql.Matrix{
|
||||
promql.Series{
|
||||
Metric: labels.FromStrings("__name__", "foo"),
|
||||
Floats: []promql.FPoint{{F: 1, T: 1000}},
|
||||
},
|
||||
promql.Series{
|
||||
Metric: labels.FromStrings("__name__", "bar"),
|
||||
Floats: []promql.FPoint{{F: 2, T: 2000}},
|
||||
},
|
||||
},
|
||||
},
|
||||
expected: `{"status":"success","data":{"resultType":"matrix","result":[{"metric":{"__name__":"foo"},"values":[[1,"1"]]},{"metric":{"__name__":"bar"},"values":[[2,"2"]]}]}}`,
|
||||
},
|
||||
{
|
||||
response: &QueryData{
|
||||
ResultType: parser.ValueTypeMatrix,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@prometheus-io/codemirror-promql",
|
||||
"version": "0.52.0-rc.0",
|
||||
"version": "0.52.0-rc.1",
|
||||
"description": "a CodeMirror mode for the PromQL language",
|
||||
"types": "dist/esm/index.d.ts",
|
||||
"module": "dist/esm/index.js",
|
||||
|
@ -29,7 +29,7 @@
|
|||
},
|
||||
"homepage": "https://github.com/prometheus/prometheus/blob/main/web/ui/module/codemirror-promql/README.md",
|
||||
"dependencies": {
|
||||
"@prometheus-io/lezer-promql": "0.52.0-rc.0",
|
||||
"@prometheus-io/lezer-promql": "0.52.0-rc.1",
|
||||
"lru-cache": "^7.18.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@prometheus-io/lezer-promql",
|
||||
"version": "0.52.0-rc.0",
|
||||
"version": "0.52.0-rc.1",
|
||||
"description": "lezer-based PromQL grammar",
|
||||
"main": "dist/index.cjs",
|
||||
"type": "module",
|
||||
|
|
14
web/ui/package-lock.json
generated
14
web/ui/package-lock.json
generated
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "prometheus-io",
|
||||
"version": "0.52.0-rc.0",
|
||||
"version": "0.52.0-rc.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "prometheus-io",
|
||||
"version": "0.52.0-rc.0",
|
||||
"version": "0.52.0-rc.1",
|
||||
"workspaces": [
|
||||
"react-app",
|
||||
"module/*"
|
||||
|
@ -30,10 +30,10 @@
|
|||
},
|
||||
"module/codemirror-promql": {
|
||||
"name": "@prometheus-io/codemirror-promql",
|
||||
"version": "0.52.0-rc.0",
|
||||
"version": "0.52.0-rc.1",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@prometheus-io/lezer-promql": "0.52.0-rc.0",
|
||||
"@prometheus-io/lezer-promql": "0.52.0-rc.1",
|
||||
"lru-cache": "^7.18.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -69,7 +69,7 @@
|
|||
},
|
||||
"module/lezer-promql": {
|
||||
"name": "@prometheus-io/lezer-promql",
|
||||
"version": "0.52.0-rc.0",
|
||||
"version": "0.52.0-rc.1",
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@lezer/generator": "^1.5.1",
|
||||
|
@ -19233,7 +19233,7 @@
|
|||
},
|
||||
"react-app": {
|
||||
"name": "@prometheus-io/app",
|
||||
"version": "0.52.0-rc.0",
|
||||
"version": "0.52.0-rc.1",
|
||||
"dependencies": {
|
||||
"@codemirror/autocomplete": "^6.11.1",
|
||||
"@codemirror/commands": "^6.3.2",
|
||||
|
@ -19251,7 +19251,7 @@
|
|||
"@lezer/lr": "^1.3.14",
|
||||
"@nexucis/fuzzy": "^0.4.1",
|
||||
"@nexucis/kvsearch": "^0.8.1",
|
||||
"@prometheus-io/codemirror-promql": "0.52.0-rc.0",
|
||||
"@prometheus-io/codemirror-promql": "0.52.0-rc.1",
|
||||
"bootstrap": "^4.6.2",
|
||||
"css.escape": "^1.5.1",
|
||||
"downshift": "^7.6.2",
|
||||
|
|
|
@ -28,5 +28,5 @@
|
|||
"ts-jest": "^29.1.1",
|
||||
"typescript": "^4.9.5"
|
||||
},
|
||||
"version": "0.52.0-rc.0"
|
||||
"version": "0.52.0-rc.1"
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@prometheus-io/app",
|
||||
"version": "0.52.0-rc.0",
|
||||
"version": "0.52.0-rc.1",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@codemirror/autocomplete": "^6.11.1",
|
||||
|
@ -19,7 +19,7 @@
|
|||
"@lezer/lr": "^1.3.14",
|
||||
"@nexucis/fuzzy": "^0.4.1",
|
||||
"@nexucis/kvsearch": "^0.8.1",
|
||||
"@prometheus-io/codemirror-promql": "0.52.0-rc.0",
|
||||
"@prometheus-io/codemirror-promql": "0.52.0-rc.1",
|
||||
"bootstrap": "^4.6.2",
|
||||
"css.escape": "^1.5.1",
|
||||
"downshift": "^7.6.2",
|
||||
|
|
Loading…
Reference in a new issue