From 1a4e027ee9ec5ccff35110c26e6aadc9529df44f Mon Sep 17 00:00:00 2001 From: Paul Cioanca Date: Wed, 14 Aug 2024 11:16:31 +0300 Subject: [PATCH 1/3] chore: don't shim wrappers if project doesn't have wrappers enabled --- .../files/admin_api_scripts/pg_upgrade_scripts/initiate.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh b/ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh index 2923fffd7..f9c35ed16 100755 --- a/ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh +++ b/ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh @@ -174,6 +174,12 @@ EOF function patch_wrappers { local IS_NIX_UPGRADE=$1 + WRAPPERS_ENABLED=$(run_sql -A -t -c "SELECT EXISTS(SELECT 1 FROM pg_extension WHERE extname = 'wrappers');") + if [ "$WRAPPERS_ENABLED" = "f" ]; then + echo "Wrappers extension not enabled. Skipping." + return + fi + # This is a workaround for older versions of wrappers which don't have the expected # naming scheme, containing the version in their library's file name # e.g. wrappers-0.1.16.so, rather than wrappers.so From b9e4808693f27933d30451d2b5f23b7c225b10a8 Mon Sep 17 00:00:00 2001 From: Paul Cioanca Date: Wed, 14 Aug 2024 11:36:32 +0300 Subject: [PATCH 2/3] chore: don't validate GH API response hash when building wrappers --- nix/ext/wrappers/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/nix/ext/wrappers/default.nix b/nix/ext/wrappers/default.nix index af0c15b5d..a1f42c2c0 100644 --- a/nix/ext/wrappers/default.nix +++ b/nix/ext/wrappers/default.nix @@ -13,7 +13,6 @@ let gitTags = builtins.fromJSON (builtins.readFile (builtins.fetchurl { url = "https://api.github.com/repos/supabase/wrappers/tags"; - sha256 = "0am40yspir70wp8pik1c7qmfvbby3nyxza115pi9klp6fyv2s93j"; # Replace with actual hash })); in buildPgrxExtension_0_11_3 rec { From 5d3d6bf5fcae02793f655ebc15a0794a8e48f492 Mon Sep 17 00:00:00 2001 From: Paul Cioanca Date: Wed, 14 Aug 2024 11:41:02 +0300 Subject: [PATCH 3/3] chore: update nix wrappers build input hash --- 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 a1f42c2c0..0411c003c 100644 --- a/nix/ext/wrappers/default.nix +++ b/nix/ext/wrappers/default.nix @@ -13,6 +13,7 @@ let gitTags = builtins.fromJSON (builtins.readFile (builtins.fetchurl { url = "https://api.github.com/repos/supabase/wrappers/tags"; + sha256 = "0pvavn0f8wnaszq4bmvjkadm6xbvf91rbhcmmgjasqajb69vskv9"; # Replace with actual hash })); in buildPgrxExtension_0_11_3 rec {