From 4f9bc89ab2252343fc10ec4a0c6ebcfbad3a6072 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Fri, 8 May 2026 20:26:20 +0200 Subject: [PATCH] nix(loadtest): remove outdated PGRST_DB_URI default This was required for v9 and earlier, but these don't build with the current nix invocation anymore anyway. Even loadtesting against v10 does not work, because `--version` is used in one of the wait scripts and this was only added in v11.2. So no need to pretend we'd support comparing against older versions. --- nix/tools/loadtest.nix | 5 +---- nix/tools/withTools.nix | 16 ++-------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/nix/tools/loadtest.nix b/nix/tools/loadtest.nix index 47b276303..cff943d59 100644 --- a/nix/tools/loadtest.nix +++ b/nix/tools/loadtest.nix @@ -53,13 +53,10 @@ let workingDir = "/"; } '' - # previously required settings to make this work with older branches export PGRST_DB_ANON_ROLE="postgrest_test_anonymous" - export PGRST_DB_URI="postgresql://" - export PGRST_DB_SCHEMAS="test" - export PGRST_DB_CONFIG="false" export PGRST_DB_POOL="1" + export PGRST_DB_SCHEMAS="test" export PGRST_DB_TX_END="rollback-allow-override" export PGRST_LOG_LEVEL="crit" export PGRST_JWT_SECRET="reallyreallyreallyreallyverysafe" diff --git a/nix/tools/withTools.nix b/nix/tools/withTools.nix index 44fe24657..f5518558c 100644 --- a/nix/tools/withTools.nix +++ b/nix/tools/withTools.nix @@ -236,18 +236,6 @@ let ${git}/bin/git worktree remove -f "$tmpdir" > /dev/null ''; - legacyConfig = - writeText "legacy.conf" - '' - # Using this config file to support older postgrest versions for `postgrest-loadtest-against` - db-uri="$(PGRST_DB_URI)" - db-schema="$(PGRST_DB_SCHEMAS)" - db-anon-role="$(PGRST_DB_ANON_ROLE)" - db-pool="$(PGRST_DB_POOL)" - server-unix-socket="$(PGRST_SERVER_UNIX_SOCKET)" - log-level="$(PGRST_LOG_LEVEL)" - ''; - waitForPgrstReady = checkedShellScript { @@ -334,11 +322,11 @@ let printf "done in %ss.\n" "$build_end" fi - ver=$($PGRST_CMD ${legacyConfig} --version) + ver=$($PGRST_CMD --version) echo -n "${commandName}: Starting $ver... " - $PGRST_CMD ${legacyConfig} > "$tmpdir"/run.log 2>&1 & + $PGRST_CMD > "$tmpdir"/run.log 2>&1 & pid=$! # shellcheck disable=SC2329 cleanup() {