fix(supabase): R5.5 gate round 1, final errors, four attempts, keys off argv, runbook
This commit is contained in:
1 parent
a481af52c7
commit
56593af25c
10 files changed
+330
-17
No files matched your search
@@ -15,7 +15,7 @@ SEED=supabase/seed/anatomical-sheets/equine/draft
|
||||
BIN=target/release/upload-sheet-assets
|
||||
FAIL=0
|
||||
|
||||
cargo build --release --locked -q -p faunosteo-core --features upload --bin upload-sheet-assets || exit 2
|
||||
env -u SUPABASE_SERVICE_ROLE_KEY cargo build --release --locked -q -p faunosteo-core --features upload --bin upload-sheet-assets || exit 2
|
||||
STATUS=$(bash scripts/supabase.sh status -o json 2>/dev/null) || { echo "stack not running (pnpm db:start)"; exit 2; }
|
||||
field() { printf '%s' "$STATUS" | python3 -c "import json,sys;print(json.load(sys.stdin)['$1'])"; }
|
||||
SERVICE=$(field SERVICE_ROLE_KEY)
|
||||
@@ -26,9 +26,10 @@ LOCAL=http://127.0.0.1:54321
|
||||
expect() {
|
||||
local name=$1 want=$2 url=$3 key=$4; shift 4
|
||||
local out rc
|
||||
out=$(env -i PATH="$PATH" SUPABASE_URL="$url" SUPABASE_SERVICE_ROLE_KEY="$key" "$BIN" "$@" 2>&1); rc=$?
|
||||
# Keys go through the environment of the binary and grep's pattern file, never on an argv.
|
||||
out=$(unset FAUNOSTEO_DEV_HOST; SUPABASE_URL="$url" SUPABASE_SERVICE_ROLE_KEY="$key" "$BIN" "$@" 2>&1); rc=$?
|
||||
LAST=$out
|
||||
if [ "$rc" -eq "$want" ] && ! grep -qF -e "$key" -e "$SERVICE" -e "$ANON" <<<"$out"; then
|
||||
if [ "$rc" -eq "$want" ] && ! grep -qF -f <(printf '%s\n' "$key" "$SERVICE" "$ANON") <<<"$out"; then
|
||||
echo "PASS $name (exit $rc)"
|
||||
else
|
||||
echo "FAIL $name (exit $rc, wanted $want)"; FAIL=1
|
||||
|
||||
Reference in new issue
Block a user