Skip to content

fix(cli): skip empty schema_paths globs in db diff#5702

Merged
avallete merged 4 commits into
supabase:developfrom
7ttp:fix/db-diff-fatal
Jun 26, 2026
Merged

fix(cli): skip empty schema_paths globs in db diff#5702
avallete merged 4 commits into
supabase:developfrom
7ttp:fix/db-diff-fatal

Conversation

@7ttp

@7ttp 7ttp commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

TL;DR

Fixes a regression in supabase db diff where declarative schema_paths entries that currently match no files
would abort the command instead of being skipped

What’s fixed?

loading path now ignores empty schema_paths glob matches while still preserving existing behavior for valid matches, deterministic ordering, deduping, and invalid glob errors

Before:

Projects using declarative schema config like:
would fail if one of those globs matched nothing, with an error like:

no files matched pattern: supabase/schemas/materialized_views/*.sql

That turned a normal incremental-adoption setup into a fatal db diff failure

After:

skips empty schema_paths glob entries and continues diffing with the files that do exist,
matching the expected existing behavior

Ref

@7ttp 7ttp requested a review from a team as a code owner June 25, 2026 23:14

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f825d22e34

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/cli-go/internal/db/diff/diff.go Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8a1b7d41c5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/cli-go/internal/db/diff/diff.go Outdated
@7ttp 7ttp force-pushed the fix/db-diff-fatal branch from 8a1b7d4 to 3bb3111 Compare June 25, 2026 23:31

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3bb3111aac

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/cli-go/internal/db/diff/diff.go Outdated
Comment thread apps/cli-go/internal/db/diff/diff.go Outdated
@7ttp 7ttp force-pushed the fix/db-diff-fatal branch from 3bb3111 to ce69a2a Compare June 25, 2026 23:56
@7ttp 7ttp self-assigned this Jun 26, 2026
Comment thread apps/cli-go/internal/db/diff/diff.go Outdated
@avallete avallete added this pull request to the merge queue Jun 26, 2026
Merged via the queue into supabase:develop with commit 81265b8 Jun 26, 2026
29 checks passed
@7ttp 7ttp deleted the fix/db-diff-fatal branch June 26, 2026 12:54
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.

db diff: empty schema_paths glob is now a fatal error in v2.108.0 (regression from 2.107.0)

2 participants