Closed vickkhera closed 11 months ago
To help us debug, could you run supabase services
and report the output here?
[Vicks-M1-Air]% npx supabase test db
/bin/bash: line 8: 8637 Done echo
8638 Killed | cpan -T TAP::Parser::SourceHandler::pgTAP &> /dev/null
error executing command
Try rerunning the command with --debug to troubleshoot the error.
[Vicks-M1-Air]% npx supabase services
SERVICE IMAGE │ LOCAL │ LINKED
─────────────────────────┼──────────────────────┼─────────
supabase/postgres │ 15.1.0.117 │ -
supabase/gotrue │ v2.99.0 │ -
postgrest/postgrest │ v11.2.0 │ -
supabase/realtime │ v2.10.1 │ -
supabase/storage-api │ v0.40.4 │ -
supabase/edge-runtime │ v1.22.3 │ -
supabase/studio │ 20231023-7e2cd92 │ -
supabase/postgres-meta │ v0.68.0 │ -
supabase/logflare │ 1.4.0 │ -
bitnami/pgbouncer │ 1.20.1-debian-11-r39 │ -
darthsim/imgproxy │ v3.8.0 │ -
[Vicks-M1-Air]%
On a hunch, I bumped my docker VM's RAM to 4GB and it succeeded. The default was 2GB.
[Vicks-M1-Air]% npx supabase db test
supabase/tests/supabase/auth-users.sql .. ok
All tests successful.
Files=1, Tests=1, 0 wallclock secs ( 0.01 usr 0.00 sys + 0.01 cusr 0.00 csys = 0.02 CPU)
Result: PASS
I was expecting that once the initial install completed I could lower the RAM back to 2GB for the docker VM, but after stopping/reconfiguring/starting when I ran the test it was killed again trying to install the cpan module. The mid-point of 3GB seems to be enough RAM so I will leave it at that for now (my laptop only has 8).
Why does the docker image need to reinstall the pgTAP modules every time we run db test
?
Why does the docker image need to reinstall the pgTAP modules every time we run db test?
This might have been a side effect of db reset which recreates the database container.
I will repurpose this issue to improve the pg_prove installation process. One possible approach is to use a separate pg_prove container for running tests.
I'm not doing a db reset between tests, just stopping and restarting the docker host vm.
Describe the bug Running
supabase test db
dies while installing pgTAP from CPAN.To Reproduce Steps to reproduce the behavior:
npx supabase test db
The test script:
Expected behavior The test should run and pass.
Screenshots
Desktop (please complete the following information):
Additional context
I'm not running Docker Desktop, just plain CLI docker using an Alpine linux VM with
colima
. Everything else works splendidly.The tests used to run just fine. I updated my schema today and wanted to re-run tests and add more before pushing to staging and production, but I ran into this error. It has been a while since I ran the tests so I don't know what version was working before.