From 2002fc91df4bda1ec7420017ce0bbb5282bd8657 Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Wed, 10 Apr 2024 00:04:08 +0100 Subject: [PATCH] =?UTF-8?q?=20vector:=200.37.0=20=E2=86=92=200.37.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/tools/misc/vector/Cargo.lock | 22 +++++++++++----------- pkgs/tools/misc/vector/default.nix | 11 ++++------- pkgs/tools/misc/vector/vector-lto.patch | 12 ++++++++++++ 3 files changed, 27 insertions(+), 18 deletions(-) create mode 100644 pkgs/tools/misc/vector/vector-lto.patch diff --git a/pkgs/tools/misc/vector/Cargo.lock b/pkgs/tools/misc/vector/Cargo.lock index 155a13828486..d24feb253f2e 100644 --- a/pkgs/tools/misc/vector/Cargo.lock +++ b/pkgs/tools/misc/vector/Cargo.lock @@ -1145,7 +1145,7 @@ dependencies = [ "aws-smithy-types", "bytes 1.5.0", "fastrand 2.0.1", - "h2 0.3.24", + "h2 0.3.26", "http 0.2.9", "http-body 0.4.5", "hyper 0.14.28", @@ -3747,9 +3747,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.24" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes 1.5.0", "fnv", @@ -3766,9 +3766,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ee2dd2e4f378392eeff5d51618cd9a63166a2513846bbc55f21cfacd9199d4" +checksum = "816ec7294445779408f36fe57bc5b7fc1cf59664059096c65f905c1c61f58069" dependencies = [ "bytes 1.5.0", "fnv", @@ -4210,14 +4210,14 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.3.24", + "h2 0.3.26", "http 0.2.9", "http-body 0.4.5", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.6", + "socket2 0.4.10", "tokio", "tower-service", "tracing 0.1.40", @@ -7515,7 +7515,7 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.3.24", + "h2 0.3.26", "http 0.2.9", "http-body 0.4.5", "hyper 0.14.28", @@ -9371,7 +9371,7 @@ dependencies = [ "base64 0.21.7", "bytes 1.5.0", "flate2", - "h2 0.3.24", + "h2 0.3.26", "http 0.2.9", "http-body 0.4.5", "hyper 0.14.28", @@ -10017,7 +10017,7 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "vector" -version = "0.37.0" +version = "0.37.1" dependencies = [ "apache-avro", "approx", @@ -10083,7 +10083,7 @@ dependencies = [ "governor", "greptimedb-client", "grok", - "h2 0.4.3", + "h2 0.4.4", "hash_hasher", "hashbrown 0.14.3", "headers", diff --git a/pkgs/tools/misc/vector/default.nix b/pkgs/tools/misc/vector/default.nix index 84b13c69e040..db6446ec26cf 100644 --- a/pkgs/tools/misc/vector/default.nix +++ b/pkgs/tools/misc/vector/default.nix @@ -37,7 +37,7 @@ let pname = "vector"; - version = "0.37.0"; + version = "0.37.1"; in rustPlatform.buildRustPackage { inherit pname version; @@ -46,16 +46,13 @@ rustPlatform.buildRustPackage { owner = "vectordotdev"; repo = pname; rev = "v${version}"; - hash = "sha256-v93ZsNGoswPpey409V7qKqsBsfRt5pgY5PxGti4MlDg="; + hash = "sha256-wRXwgy+UY2z5fIWpQbDxRti54GE357WMGWXM/xKjz18="; }; patches = [ # Enable LTO to bring down binary size - (fetchpatch { - name = "vector-20034-lto.patch"; - url = "https://patch-diff.githubusercontent.com/raw/vectordotdev/vector/pull/20034.diff"; - hash = "sha256-X6YWnW0x5WpKAgyqIaLjKF1F1/G4JgvmNhAHtozXrPQ="; - }) + # Adapted from https://github.com/vectordotdev/vector/pull/20034 + ./vector-lto.patch ]; cargoLock = { diff --git a/pkgs/tools/misc/vector/vector-lto.patch b/pkgs/tools/misc/vector/vector-lto.patch new file mode 100644 index 000000000000..a795c1f16d25 --- /dev/null +++ b/pkgs/tools/misc/vector/vector-lto.patch @@ -0,0 +1,12 @@ +--- ./Cargo.toml 2024-04-10 00:01:12.033806583 +0100 ++++ ./Cargo.toml 2024-04-10 00:01:48.324228125 +0100 +@@ -45,7 +45,8 @@ path = "tests/e2e/mod.rs" + # This results in roughly a 5% reduction in performance when compiling locally vs when + # compiled via the CI pipeline. + [profile.release] +-debug = false # Do not include debug symbols in the executable. ++lto = true ++codegen-units = 1 + + [profile.bench] + debug = true