From 335562dbfe5d2931e430e6dc5f75a44208cd74d3 Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Tue, 5 Jul 2022 13:10:55 +0200 Subject: [PATCH 1/3] Cut v2.37.0-rc.0 (#10971) * Cut v2.37.0-rc.0 Signed-off-by: Julien Pivotto --- CHANGELOG.md | 22 +++++++++++++++++++++- VERSION | 2 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e6c024cc..3d9dd46e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,32 @@ # Changelog +## 2.37.0-rc.0 / 2022-07-05 + +Following data loss by users due to lack of unified buffer cache in OpenBSD, we +will no longer release Prometheus upstream for OpenBSD until a proper solution is +found. #8799 + +* [FEATURE] Nomad SD: New service discovery for Nomad built-in service discovery. #10915 +* [ENHANCEMENT] Kubernetes SD: Allow attaching node labels for endpoint role. #10759 +* [ENHANCEMENT] PromQL: Optimise creation of signature with/without labels. #10667 +* [ENHANCEMENT] TSDB: Memory optimizations. #10873 #10874 +* [ENHANCEMENT] TSDB: Reduce sleep time when reading WAL. #10859 #10878 +* [BUGFIX] Alerting: Fix Alertmanager targets not being updated when alerts were queued. #10948 +* [BUGFIX] Hetzner SD: Make authentication files relative to Prometheus config file. #10813 +* [BUGFIX] Promtool: Fix `promtool check config` not erroring properly on failures. #10952 +* [BUGFIX] Scrape: Keep relabeled scrape interval and timeout on reloads. #10916 +* [BUGFIX] TSDB: Don't increment `prometheus_tsdb_compactions_failed_total` when context is canceled. #10772 +* [BUGFIX] TSDB: Fix panic if series is not found when deleting series. #10907 +* [BUGFIX] TSDB: Increase `prometheus_tsdb_mmap_chunk_corruptions_total` on out of sequence errors. #10406 +* [BUGFIX] Uyuni SD: Make authentication files relative to Prometheus configuration file and fix default configuration values. #10813 + ## 2.36.2 / 2022-06-20 * [BUGFIX] Fix serving of static assets like fonts and favicon. #10888 ## 2.36.1 / 2022-06-09 -* [BUGFIX] promtool: Add --lint-fatal option #10840 +* [BUGFIX] promtool: Add --lint-fatal option. #10840 ## 2.36.0 / 2022-05-30 diff --git a/VERSION b/VERSION index 38bcf609c..1dadcdca6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.36.2 +2.37.0-rc.0 From 7479cd95b0d39df96387958110473a18e1f1ddc3 Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Tue, 5 Jul 2022 15:12:59 +0200 Subject: [PATCH 2/3] Fix UI release script and bump UI release (#10981) Signed-off-by: Julien Pivotto --- scripts/ui_release.sh | 4 ++-- web/ui/module/codemirror-promql/package.json | 4 ++-- web/ui/module/lezer-promql/package.json | 2 +- web/ui/package-lock.json | 14 +++++++------- web/ui/react-app/package.json | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/scripts/ui_release.sh b/scripts/ui_release.sh index abc358386..3693cc718 100755 --- a/scripts/ui_release.sh +++ b/scripts/ui_release.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## /!\ This file must be used at the root of the prometheus project ## This script provides utils method to help to release and verify the readiness of each libs under the folder ui/ @@ -79,7 +79,7 @@ function bumpVersion() { npm version "${version}" --workspaces # upgrade the @prometheus-io/* dependencies on all packages for workspace in ${workspaces}; do - sed -E -i "" "s|(\"@prometheus-io/.+\": )\".+\"|\1\"\^${version}\"|" "${workspace}"/package.json + sed -E -i "s|(\"@prometheus-io/.+\": )\".+\"|\1\"\^${version}\"|" "${workspace}"/package.json done } diff --git a/web/ui/module/codemirror-promql/package.json b/web/ui/module/codemirror-promql/package.json index e4a1cf8f7..e94c7f16d 100644 --- a/web/ui/module/codemirror-promql/package.json +++ b/web/ui/module/codemirror-promql/package.json @@ -1,6 +1,6 @@ { "name": "@prometheus-io/codemirror-promql", - "version": "0.19.0", + "version": "0.37.0-rc.0", "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.23.0", + "@prometheus-io/lezer-promql": "^0.37.0-rc.0", "lru-cache": "^6.0.0" }, "devDependencies": { diff --git a/web/ui/module/lezer-promql/package.json b/web/ui/module/lezer-promql/package.json index 1a4d608d1..dd924f88c 100644 --- a/web/ui/module/lezer-promql/package.json +++ b/web/ui/module/lezer-promql/package.json @@ -1,6 +1,6 @@ { "name": "@prometheus-io/lezer-promql", - "version": "0.23.0", + "version": "0.37.0-rc.0", "description": "lezer-based PromQL grammar", "main": "index.cjs", "type": "module", diff --git a/web/ui/package-lock.json b/web/ui/package-lock.json index c424f2ed8..d247dad13 100644 --- a/web/ui/package-lock.json +++ b/web/ui/package-lock.json @@ -28,10 +28,10 @@ }, "module/codemirror-promql": { "name": "@prometheus-io/codemirror-promql", - "version": "0.19.0", + "version": "0.37.0-rc.0", "license": "Apache-2.0", "dependencies": { - "@prometheus-io/lezer-promql": "0.23.0", + "@prometheus-io/lezer-promql": "^0.37.0-rc.0", "lru-cache": "^6.0.0" }, "devDependencies": { @@ -61,7 +61,7 @@ }, "module/lezer-promql": { "name": "@prometheus-io/lezer-promql", - "version": "0.23.0", + "version": "0.37.0-rc.0", "license": "Apache-2.0", "devDependencies": { "@lezer/generator": "^1.0.0", @@ -17518,7 +17518,7 @@ }, "react-app": { "name": "@prometheus-io/app", - "version": "0.1.0", + "version": "0.37.0-rc.0", "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/commands": "^6.0.0", @@ -17536,7 +17536,7 @@ "@lezer/lr": "^1.0.0", "@nexucis/fuzzy": "^0.4.0", "@nexucis/kvsearch": "^0.7.0", - "@prometheus-io/codemirror-promql": "0.19.0", + "@prometheus-io/codemirror-promql": "^0.37.0-rc.0", "bootstrap": "^4.6.1", "css.escape": "^1.5.1", "downshift": "^6.1.7", @@ -19783,7 +19783,7 @@ "@lezer/lr": "^1.0.0", "@nexucis/fuzzy": "^0.4.0", "@nexucis/kvsearch": "^0.7.0", - "@prometheus-io/codemirror-promql": "0.19.0", + "@prometheus-io/codemirror-promql": "^0.37.0-rc.0", "@testing-library/react-hooks": "^7.0.1", "@types/enzyme": "^3.10.10", "@types/flot": "0.0.32", @@ -19835,7 +19835,7 @@ "@lezer/common": "^1.0.0", "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.0.0", - "@prometheus-io/lezer-promql": "0.23.0", + "@prometheus-io/lezer-promql": "^0.37.0-rc.0", "@types/lru-cache": "^5.1.1", "isomorphic-fetch": "^3.0.0", "lru-cache": "^6.0.0", diff --git a/web/ui/react-app/package.json b/web/ui/react-app/package.json index f9800685f..d3911d900 100644 --- a/web/ui/react-app/package.json +++ b/web/ui/react-app/package.json @@ -1,6 +1,6 @@ { "name": "@prometheus-io/app", - "version": "0.1.0", + "version": "0.37.0-rc.0", "private": true, "dependencies": { "@codemirror/autocomplete": "^6.0.0", @@ -19,7 +19,7 @@ "@lezer/common": "^1.0.0", "@nexucis/fuzzy": "^0.4.0", "@nexucis/kvsearch": "^0.7.0", - "@prometheus-io/codemirror-promql": "0.19.0", + "@prometheus-io/codemirror-promql": "^0.37.0-rc.0", "bootstrap": "^4.6.1", "css.escape": "^1.5.1", "downshift": "^6.1.7", From 2479fb42f0a9bb45c2e82f11efc73c0a75fc492c Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Tue, 5 Jul 2022 15:27:26 +0200 Subject: [PATCH 3/3] Improve notifier queue test to reduce flakiness (#10984) Signed-off-by: Julien Pivotto --- notifier/notifier_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/notifier/notifier_test.go b/notifier/notifier_test.go index f3d7593ec..163e55354 100644 --- a/notifier/notifier_test.go +++ b/notifier/notifier_test.go @@ -590,8 +590,13 @@ func TestHangingNotifier(t *testing.T) { close(done) }() + var calledOnce bool // Setting up a bad server. This server hangs for 2 seconds. badServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if calledOnce { + t.Fatal("hanging server called multiple times") + } + calledOnce = true select { case <-done: case <-time.After(2 * time.Second): @@ -672,8 +677,8 @@ func TestHangingNotifier(t *testing.T) { }() select { - case <-time.After(300 * time.Millisecond): - t.Fatalf("Timeout after 300 milliseconds, targets not synced in time.") + case <-time.After(1 * time.Second): + t.Fatalf("Timeout after 1 second, targets not synced in time.") case <-changed: // The good server has been hit in less than 3 seconds, therefore // targets have been updated before a second call could be made to the