Repository navigation
Conversation
Merge supabase-secure-email-change, supabase-eddsa and supabase-ecdsa into one minimal project, supabase-variants. Each variant is now one supabase-variants/<name>.env file with its test filter, an optional setup command, and SUPABASE_* overrides, which the CLI reads as config overrides on both the Docker and the native stack. scripts/test-integration.sh runs the main suite and every variant, goes on after a failure, and prints a summary. CI calls the script instead of repeating each start, export, run and stop step. A .variant(...) trait enables a variant's tests only in its run, so the main run needs no --skip list.
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Coverage Report for CI Build 47329990324Warning No base build found for commit Coverage: 96.396%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #1931. Restructures how integration test variants run: one shared project, one
.envfile per variant, and a.variant(...)trait instead of a--skiplist.Chosen design: A + B + D below, one CI job per OS.
Local run (macOS, native stack)
ES384 fails as on #1931, until an Auth release with supabase/auth#2989 ships. It no longer hides
the later variants.
Design note
Problem
Each test that needs a different Auth setup adds:
config.toml(three copies today, which differ in 1–2 lines),scripts/test-integration.sh,--skipin the main run, in two places (script and CI), which must stay in sync,DEVELOPMENT.md.Also, the variant steps run in sequence in one CI job. Today a failure in the main suite or in
one variant skips every later variant (ES384 is placed last on purpose to work around this).
What the Supabase CLI supports (checked, not guessed)
CLI 3.5.0, source in
supabase/cliapps/cli/src/config/cli-config-keys.tsandcommands/start/SIDE_EFFECTS.md:SUPABASE_+ the upper-snake path, for exampleauth.email.enable_confirmations→SUPABASE_AUTH_EMAIL_ENABLE_CONFIRMATIONS. Precedence isflag > shell env > project
.env*> config > default, on both backends (legacy Docker andthe experimental stack). Only the
[local]section has no override.supabase start --stack <name>(experimental stack only) runs several named stacks of oneproject, each on its own ports.
Probed locally with one minimal project:
SUPABASE_AUTH_SIGNING_KEYS_PATH(ES512 set)supabase/)SUPABASE_AUTH_EMAIL_ENABLE_CONFIRMATIONS=falseovertruein configmailer_autoconfirm: trueSo the three variant projects can collapse into one.
Options
A. One shared variant project + env overrides (fewer projects)
Replace
supabase-secure-email-change,supabase-eddsa, andsupabase-ecdsawith one minimalAuth-only project,
Tests/IntegrationTests/supabase-variants. A variant sets only what differs,as
SUPABASE_*env vars.its own project. That is not the case for any variant today.
B. A manifest that drives the script and CI
One file per variant, for example
Tests/IntegrationTests/variants/es512.env:scripts/test-integration.shruns the main suite, then loops overvariants/*.env. CI calls thesame script, so a new variant is one file plus its tests, with no CI or script edit.
::group::per variant and a pass/fail table in$GITHUB_STEP_SUMMARY.C. A CI matrix job per variant
several minutes and the most expensive runner, for a test that runs in seconds. 6 variants × 2
OSes = 12 jobs instead of 2. The Linux sticky disk is keyed per job name, so it either fans out
into 6 disks or races on one.
D. Test selection: a variant trait instead of a
--skiplistA small Swift Testing trait, for example
.variant("es512"), enables a test only whenSUPABASE_TEST_VARIANTmatches. The main run sets no variant, so it needs no--skiplist. Thevariant run sets
SUPABASE_TEST_VARIANTand--filters to its tests. A forgotten skip can nolonger break the main suite, and a variant test can no longer run against the wrong stack by
accident.
(Swift Testing tags alone do not help here:
swift testhas no tag filter on the command line,and tags cannot read the environment.)
Recommendation
A + B + D, in one job per OS (not C).
supabase-variantsproject, overridden per variant by env vars.variants/<name>.envfile per variant;scripts/test-integration.shis the only runner,and CI calls it.
non-zero at the end. ES384 then fails on its own and the others still report, with no ordering
trick.
.variant(...)trait replaces the--skiplist.DEVELOPMENT.mdgets one "Adding an integration test variant" section; the per-projectsections go away.
Adding a variant after this: one
.envfile, the tests with.variant("name"), and (if needed)a setup script. No CI, script, config, or doc edits.
Not in scope: running variants in parallel with
--stackon macOS (Docker uses fixed ports, soLinux cannot), and moving the main suite onto the manifest.
Also seen
Tests/IntegrationTests/supabase-ecdsa/supabase/supabase.lockis committed in feat(auth): verify ES384 and ES512 JWTs locally in claims #1931, while theother projects do not commit one. With
CIset, an existing lock implies--frozen, so itpins that project's service versions. It goes away with option A; if A is not chosen, it is
likely start-up churn worth removing in feat(auth): verify ES384 and ES512 JWTs locally in claims #1931.