Skip to content

Branching executor doubles seed.sql path (looks for supabase/supabase/seed.sql) #4793

@austinmw

Description

@austinmw

Bug Report

Describe the bug

When using Supabase Branching via the GitHub integration, the branching executor looks for supabase/supabase/seed.sql instead of supabase/seed.sql. The path is being doubled.

To Reproduce

  1. Set up a project with Supabase Branching via GitHub integration
  2. Configure config.toml with:
    [db.seed]
    enabled = true
    sql_paths = ["./seed.sql"]
  3. Place seed file at supabase/seed.sql
  4. Create a PR to trigger a preview branch
  5. Check branch-action logs

Expected behavior

The executor should look for supabase/seed.sql (the configured path relative to the supabase directory).

Actual behavior

The executor looks for supabase/supabase/seed.sql and logs:

WARN: no files matched pattern: supabase/supabase/seed.sql

Workaround

Create a symlink at supabase/supabase/seed.sql pointing to ../seed.sql:

mkdir -p supabase/supabase
cd supabase/supabase
ln -s ../seed.sql seed.sql

This symlink is tracked by git and resolves correctly when the repo is cloned.

Environment

  • Using Supabase Branching via GitHub integration
  • Standard project structure with supabase/ directory at repo root
  • config.toml in supabase/config.toml

Additional context

According to the seeding documentation, "The base folder for the pattern matching is supabase" - so ./seed.sql should resolve to supabase/seed.sql, not supabase/supabase/seed.sql.

This issue appears to be specific to the branching executor (GitHub integration), not local development with supabase db reset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions