Skip to content

feat(cli): add db lint --ignore for known errors (CLI-3330) - #7917

Open
7ttp wants to merge 2 commits into
developfrom
7ttp/cli-3330-db-lint-ignore-a-sqlstate-42p01-on-temp-tables
Open

7ttp wants to merge 2 commits into
developfrom
7ttp/cli-3330-db-lint-ignore-a-sqlstate-42p01-on-temp-tables

Conversation

@7ttp

@7ttp 7ttp commented Dec 1, 2026

Copy link
Copy Markdown
Member

TL;DR

adds db lint --ignore <sqlstate>[:<text>] so a known false positive like a runtime temp table no longer fails --fail-on error

whats introduced?

--ignore drops issues with a matching sqlstate, and with :<text> only when the message contains that text as written

dropped issues are not printed and do not count towards --fail-on, so --ignore '42P01:pg_temp.' skips the temp table error while a real missing table still fails the run
with a rule given the check runs with fatal_errors:=false, so an ignored first error no longer hides later errors in the same function

without --ignore the query, output and exit codes stay the same

why?

plpgsql_check cannot see a temp table that a function creates at runtime and reports it as a missing relation at level error
--level cannot drop it, so --fail-on error failed on every such function and ci had to filter the json with jq

ref

@7ttp 7ttp self-assigned this Dec 1, 2026
@7ttp
7ttp requested a review from a team as a code owner December 1, 2026 23:29
@7ttp
7ttp requested a review from Prashansa-K December 1, 2026 23:29
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

CLI benchmark (Lightweight Commands): no changes found

Commit 258c119 against develop at bcc7363 · 10 runs each · report only, never blocks merging

Command Workload Before After Change
supabase --version version 194 ms 190 ms no real change
supabase --help help 205 ms 204 ms no real change
supabase init init 213 ms 217 ms no real change
supabase migration new bench migration-new 233 ms 223 ms no real change
supabase config convert config-convert 221 ms 224 ms no real change
supabase config validate config-validate 232 ms 238 ms no real change
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 236 ms 238 ms no real change
supabase projects list projects-list 229 ms 223 ms no real change
supabase functions list --project-ref replayfixtureprojref functions-list 208 ms 207 ms no real change

API calls: unchanged for all 9 commands.

Binary size: 135.7 MB, up 4.0 KB from 135.7 MB.

Details: timing ranges, API calls per command, slowest phases

Timing ranges

Command Workload Before range After range Change Verdict
supabase --version version 177-198 ms 176-200 ms -4 ms (-2%) within noise
supabase --help help 194-214 ms 177-251 ms -1 ms (0%) within noise
supabase init init 196-227 ms 195-240 ms +4 ms (+2%) within noise
supabase migration new bench migration-new 216-293 ms 211-265 ms -10 ms (-4%) within noise
supabase config convert config-convert 190-241 ms 207-261 ms +3 ms (+1%) within noise
supabase config validate config-validate 216-241 ms 226-244 ms +6 ms (+3%) within noise
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 214-304 ms 233-266 ms +2 ms (+1%) within noise
supabase projects list projects-list 206-250 ms 208-264 ms -6 ms (-3%) within noise
supabase functions list --project-ref replayfixtureprojref functions-list 189-232 ms 195-261 ms -2 ms (-1%) within noise

API calls per command

Command Workload Before After Endpoint changes
supabase --version version 0 0
supabase --help help 0 0
supabase init init 0 0
supabase migration new bench migration-new 0 0
supabase config convert config-convert 0 0
supabase config validate config-validate 0 0
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 2 2
supabase projects list projects-list 1 1
supabase functions list --project-ref replayfixtureprojref functions-list 2 2

Slowest phases

No command moved beyond noise, so there are no phase deltas.

Workflow run

Comment /bench to run the lightweight benchmark (this comment) again on the latest commit, or /bench full to also run the integration-heavy benchmark, which posts in its own comment.

github-actions[bot]

This comment was marked as resolved.

This branch has not been deployed

No deployments
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