From f98031841dc7aba72deffe6eccd4cf87b768e459 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Sat, 20 Jul 2024 10:37:38 -0400 Subject: [PATCH 1/2] fix: flake check was broken/coul not start postgres --- flake.nix | 25 ++++++++++++++++--------- nix/tests/util/pgsodium_getkey_arb.sh | 1 + 2 files changed, 17 insertions(+), 9 deletions(-) create mode 100755 nix/tests/util/pgsodium_getkey_arb.sh diff --git a/flake.nix b/flake.nix index 4a2c85b95..1ced4ab06 100644 --- a/flake.nix +++ b/flake.nix @@ -505,23 +505,30 @@ export PGDATA=/tmp/pgdata mkdir -p $PGDATA initdb --locale=C - substitute ${./nix/tests/postgresql.conf.in} $PGDATA/postgresql.conf \ - --subst-var-by PGSODIUM_GETKEY_SCRIPT "${./nix/tests/util/pgsodium_getkey.sh}" - - postgres -k /tmp >logfile 2>&1 & - sleep 2 - + --subst-var-by PGSODIUM_GETKEY_SCRIPT "${./nix/tests/util/pgsodium_getkey_arb.sh}" + echo "listen_addresses = '*'" >> $PGDATA/postgresql.conf + echo "port = 5432" >> $PGDATA/postgresql.conf + echo "host all all 127.0.0.1/32 trust" >> $PGDATA/pg_hba.conf + postgres -k /tmp -h localhost >logfile 2>&1 & + for i in {1..30}; do + if pg_isready -h localhost; then + break + fi + sleep 1 + if [ $i -eq 30 ]; then + echo "PostgreSQL is not ready after 30 seconds" + cat logfile + exit 1 + fi + done createdb -h localhost testing - psql -h localhost -d testing -Xaf ${./nix/tests/prime.sql} pg_prove -h localhost -d testing ${sqlTests}/*.sql - pkill postgres mv logfile $out echo ${pgpkg} ''; - in rec { # The list of all packages that can be built with 'nix build'. The list diff --git a/nix/tests/util/pgsodium_getkey_arb.sh b/nix/tests/util/pgsodium_getkey_arb.sh new file mode 100755 index 000000000..446dbba2f --- /dev/null +++ b/nix/tests/util/pgsodium_getkey_arb.sh @@ -0,0 +1 @@ +echo -n 8359dafbba5c05568799c1c24eb6c2fbff497654bc6aa5e9a791c666768875a1 \ No newline at end of file From b811e6b689f5d8367f5e922b55cc01c87724716e Mon Sep 17 00:00:00 2001 From: samrose Date: Sat, 20 Jul 2024 11:24:26 -0400 Subject: [PATCH 2/2] fix: buildFeature missing at least auth0_fdw (#1064) Co-authored-by: Sam Rose --- nix/ext/wrappers/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix/ext/wrappers/default.nix b/nix/ext/wrappers/default.nix index c68641659..f934f9c00 100644 --- a/nix/ext/wrappers/default.nix +++ b/nix/ext/wrappers/default.nix @@ -54,6 +54,7 @@ buildPgrxExtension_0_11_3 rec { "s3_fdw" "airtable_fdw" "logflare_fdw" + "auth0_fdw" ]; # FIXME (aseipp): disable the tests since they try to install .control