Skip to content

Integration tests: Run the local stack without Docker, on Supabase CLI's new native runtime - #246

Merged
QuintinWillison merged 6 commits into
mainfrom
upgrade-supabase-cli
Dec 2, 2026
Merged

QuintinWillison merged 6 commits into
mainfrom
upgrade-supabase-cli

Conversation

@QuintinWillison

Copy link
Copy Markdown
Member

🤖 Claude's Summary

The local stack behind the integration tests moves to Supabase CLI 3.5.0, takes the configuration format that supabase init now writes and runs on the CLI's native runtime, so neither CI nor a developer's machine needs Docker any more. That stack runs no Kong, so the two tests that asserted Kong's answers are removed. Because the stack now runs directly on macOS as well as Linux, a new scripts/check-all.sh runs the checks and then the integration tests in one go. Each commit below takes one step.

03f441a ./scripts/upgrade-to-latest-supabase-cli.sh

The pinned Supabase CLI moves from 3.3.0 to 3.4.0, with the four checksums from the release's published checksums.txt. From this release supabase init writes supabase/config.jsonc in place of supabase/config.toml.

d5d2174 Convert the integration stack's configuration from TOML to JSONC, leaving out the settings that restate the Supabase CLI's defaults

The stack's configuration moves from config.toml to config.jsonc, with a $schema key that points editors at the CLI's published schema for validation and completion. The CLI still reads config.toml, so this follows its new default rather than fixing a fault.

Three settings only restated defaults that the pinned CLI's config schema declares, and are gone: auth.enabled, auth.site_url and db.major_version. Postgres now runs whichever major version the pinned CLI defaults to, so DEVELOPMENT.md no longer lists it among the pins checked by eye. Every other setting differs from its default and carries over unchanged.

Test failure messages that named config.toml or its section syntax now name config.jsonc and key paths. A comment on the email-change links credited the configuration with turning on secure email change, and now credits the CLI's default. The comment on reading the stack's keys no longer says the configuration keeps Auth on, and loses its references to the Go CLI's status.go and to the CLI repository's tests.

a56210a Run the integration stack on the Supabase CLI's native runtime in place of Docker, on the platforms that runtime supports, and remove the two tests that asserted Kong's answers, since that stack runs no Kong

The stack now runs on the Supabase CLI's stack backend and its native runtime, which runs each service as a process on the host. Neither CI nor a developer's machine needs Docker any more, and the tests run directly on macOS 14 or later on Apple silicon as well as on Linux.

  • config.jsonc turns on experimental.stack and drops the fixed ports, since the stack backend refuses a configured port from 10000 to 19999. The CLI now gives each stack free ports from 20000 to 32767, which stays below Linux's ephemeral range. project_id goes too, because the stack backend identifies a stack by its project directory.
  • scripts/integration-test.sh starts the stack with --runtime native --eager, reads its URL and keys with status --env --output-format text and destroys it on exit, as the stack backend has no stop --no-backup.
  • The native runtime does not run on Intel Macs, so the CLI is no longer pinned for them, and the upgrade script maintains three checksums instead of four. On a platform without a pinned checksum the script stops before downloading anything and points to DEVELOPMENT.md, which lists the platforms the native runtime supports.
  • DEVELOPMENT.md lists the native runtime's platforms where it gives the integration tests' prerequisites, and says how to remove a stack that a killed run leaves behind. The headers of integration-test.sh, check-fast.sh and build-and-test.sh, the CI workflow and the runner-label record in decisions.md no longer mention Docker.

This commit also removes two tests, TestDelimitedIdentifierTableNameSingleDot and TestDelimitedIdentifierTableNameDoubleDot. Both asserted what Kong, the Docker stack's gateway, answers for a table named . or ... The SDK sends those names as %2E and %2E%2E, and Kong resolves both as dot segments before routing (normalization behavior), so neither request reached its table. The second test also required Kong's own no-route message. The native runtime's stack runs no Kong. Its gateway is the CLI's own proxy, which forwards a path as written (HttpProxy.ts), so nothing in either test holds there. Both tables are now read like any other, as two new cases of TestDelimitedIdentifierTableNames. What the SDK does with a body that will not decode, and with an error body that is not PostgREST's, stays covered by the unit tests in postgrest/builder_test.go.

The stack backend is experimental. The CLI stays checksum-pinned, so its flags and output change only with a deliberate bump, and the upgrade procedure in DEVELOPMENT.md now says to check them.

5e375fa ./scripts/upgrade-to-latest-supabase-cli.sh

The pinned Supabase CLI moves from 3.4.0 to 3.5.0, with the three checksums from the release's published checksums.txt. The stack's Postgres moves from 17.12.0.002 to 17.12.0.006 and its Auth from v2.198.0 to v2.199.0, while PostgREST stays at v16.6. The stack commands the script runs, and the output it reads, are unchanged.

ee0c108 Give the current reasons the integration schema lives in migrations, and say its files are edited in place

decisions.md said the integration schema lives in migrations/ because the Supabase CLI ran a seed file as a single prepared batch, so DDL could not share a file with the inserts that depend on it. CLI 3 runs seed statements one at a time, so that reason no longer holds. The entry now gives the reasons that do: Supabase's seeding guidance keeps seed files to data, and declarative schema files under supabase/schemas/ would only be turned into more migration files.

DEVELOPMENT.md now says how to change the schema: edit the statement that creates an object, since every run starts from an empty database, and add a file only for a new concern. A comment in 0_schema.sql no longer says practice_logs is applied after the file that creates it.

da64e03 Rename check-fast.sh to check-all-except-integration-tests.sh and add check-all.sh, which runs it and then integration-test.sh

check-fast.sh takes longer to run than integration-test.sh, so its name no longer fits. It is now check-all-except-integration-tests.sh, which says what it leaves out. The new check-all.sh runs it and then integration-test.sh, stopping at the first that fails, so one command covers both before a push. comment-check.sh probes live websites and stays outside both, as it stayed outside check-fast.sh.

All three scripts print the date and time as they start and as they finish, with the real time they ran for, through a helper in scripts/common.sh. A failed run prints its finish line too, and the last line of a check-all.sh run gives the time both scripts took together. Where DEVELOPMENT.md, decisions.md, the CI workflow's comments and one test's comment said "the fast tier", they now name the script that does the work.

QuintinWillison and others added 6 commits December 1, 2026 13:49
…ving out the settings that restate the Supabase CLI's defaults.

Co-Authored-By: Claude <noreply@anthropic.com>
…ce of Docker, on the platforms that runtime supports, and remove the two tests that asserted Kong's answers, since that stack runs no Kong.

`TestDelimitedIdentifierTableNameSingleDot` and `TestDelimitedIdentifierTableNameDoubleDot` asserted what Kong answers for tables named `.` and `..`, which it resolves as dot segments before routing. The native runtime's gateway is the CLI's own proxy, which forwards both names to PostgREST as written, so the two tables are now read as cases of `TestDelimitedIdentifierTableNames`.

Co-Authored-By: Claude <noreply@anthropic.com>
…and say its files are edited in place.

Co-Authored-By: Claude <noreply@anthropic.com>
… add `check-all.sh`, which runs it and then `integration-test.sh`.

Co-Authored-By: Claude <noreply@anthropic.com>
@QuintinWillison QuintinWillison self-assigned this Dec 2, 2026
@QuintinWillison
QuintinWillison marked this pull request as ready for review December 2, 2026 11:01
@QuintinWillison
QuintinWillison removed this pull request from stack #242 December 2, 2026 11:02
Base automatically changed from writing-secure-code-skill to main December 2, 2026 11:04
@QuintinWillison
QuintinWillison merged commit 41c37b9 into main Dec 2, 2026
12 checks passed
@QuintinWillison
QuintinWillison deleted the upgrade-supabase-cli branch December 2, 2026 11:06
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