Skip to content

Conversation

@stefanbinoj
Copy link
Contributor

@stefanbinoj stefanbinoj commented Nov 7, 2025

ref #1064

Problem

  • pnpm supabase start used to pull multiple images (12 in total), 6 of which are not actually needed for the E2E test suite. (Code usage here)
  • Running pnpm supabase db reset is unnecessary because each time a GitHub Action is triggered, it pulls a fresh Supabase/Postgres image with an empty database. Therefore, there’s no need to reset it. This step is useful only in local development. Removing it saves approximately 40 seconds. (Code usage here)
  • On a side note, the latest versions of the Supabase CLI (v2.x and above) pulls images from the GitHub Container Registry (GHCR) rather from public AWS ECR registry. This helps reduce Docker pull rate-limiting, improves image caching across CI/CD runners.

Screenshots

Before After
Screenshot 2025-11-07 at 11 55 17 AM Screenshot 2025-11-07 at 12 51 47 PM

Links to CI

Before After
View Before View After

Proofs

Before -- Pulls 12 images

Screen.Recording.2025-11-09.at.10.32.17.PM.mov

After -- Pulls 6 images

Screen.Recording.2025-11-09.at.10.36.04.PM.mov
  • This change could save aproximately 1.30 - 3 minutes.

AI Usage

  • GPT-5 Medium via VS Code : was used for understanding the internals of how supabase start works.
  • GPT (free) via chat.openai.com was used for formatting and fixing typos in the PR description.

Self Review

  • All code was written by me, and I have thoroughly reviewed it.

Live Stream Disclosure

  • Watched all Antiwork live streams and followed all provided guidelines.

shell: bash
run: |
pnpm run with-test-env pnpm supabase start -x=realtime,logflare,postgres-meta,mailpit,edge-runtime,studio,vector

Copy link
Contributor Author

@stefanbinoj stefanbinoj Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • The -x= flag is used to exclude unnecessary Supabase images that increase pull time.
  • The following list explains which Supabase images are required and which are not:

✅ Required Images

  • postgres – Database storing all application data (conversations, users, messages, settings)
  • storage-api – File storage for image attachments in e2e tests
  • gotrue – Authentication service for user login in auth.setup.ts
  • postgrest – REST API layer used by the app to communicate with the database
  • kong – API gateway that routes requests between services

❌ Not Required (excluded in CI)

  • realtime – Real-time subscriptions for conversation updates (not needed for e2e tests)
  • logflare – Logging and analytics service not used in tests
  • vector – Vector database for embeddings (not invoked in the e2e test suite)
  • mailpit – Email testing server (e2e tests don't verify emails)
  • postgres-meta – Database metadata admin utility not needed for tests
  • edge-runtime – Edge functions service (no edge functions in this project)
  • studio – Supabase UI dashboard (not required for headless tests)

NOTE : realtime image is pulled even after excluding it as in the video, My guess is that realtime is a dependency of kong or postgrest image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant