Merge pull request #107469 from Ma27/bump-prometheus

prometheus: 2.22.2 -> 2.23.0
This commit is contained in:
WilliButz 2020-12-23 21:49:08 +01:00 committed by GitHub
commit f1584ed282
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 744 additions and 684 deletions

View File

@ -36,6 +36,7 @@ in import ./make-test-python.nix {
nodes = {
prometheus = { pkgs, ... }: {
virtualisation.diskSize = 2 * 1024;
virtualisation.memorySize = 2048;
environment.systemPackages = [ pkgs.jq ];
networking.firewall.allowedTCPPorts = [ grpcPort ];
services.prometheus = {
@ -132,6 +133,7 @@ in import ./make-test-python.nix {
store = { pkgs, ... }: {
virtualisation.diskSize = 2 * 1024;
virtualisation.memorySize = 2048;
environment.systemPackages = with pkgs; [ jq thanos ];
services.thanos.store = {
enable = true;

View File

@ -1,13 +1,15 @@
{ stdenv, lib, go, buildGoPackage, fetchFromGitHub, mkYarnPackage, nixosTests }:
{ stdenv, lib, go, buildGoPackage, fetchFromGitHub, mkYarnPackage, nixosTests
, fetchpatch
}:
let
version = "2.22.2";
version = "2.23.0";
src = fetchFromGitHub {
rev = "v${version}";
owner = "prometheus";
repo = "prometheus";
sha256 = "04pf3shdfd25wf8snkan5hzv1gjzazjw06i11xaamnc8gfahnzdv";
sha256 = "sha256-UQ1r8271EiZDU/h2zta6toMRfk2GjXol8GexYL9n+BE=";
};
webui = mkYarnPackage {
@ -29,15 +31,23 @@ in buildGoPackage rec {
goPackagePath = "github.com/prometheus/prometheus";
patches = [
# Fix https://github.com/prometheus/prometheus/issues/8144
(fetchpatch {
url = "https://github.com/prometheus/prometheus/commit/8b64b70fe4a5aa2877c95aa12c6798b12d3ff7ec.patch";
sha256 = "sha256-RuXT5pBXv8z6WoE59KNGh+OXr1KGLGWs/n0Hjf4BuH8=";
})
];
postPatch = ''
ln -s ${webui.node_modules} web/ui/react-app/node_modules
ln -s ${webui} web/ui/static/react
'';
buildFlags = "-tags=builtinassets";
buildFlagsArray = let
t = "${goPackagePath}/vendor/github.com/prometheus/common/version";
in [
"-tags=builtinassets"
''
-ldflags=
-X ${t}.Version=${version}

File diff suppressed because it is too large Load Diff