Skip to content

ENG-2476 Run the schema-versus-migrations check in CI - #1616

Merged
maparent merged 1 commit into
mainfrom
eng-2476-run-the-schema-versus-migrations-check-in-ci
Nov 12, 2026
Merged

maparent merged 1 commit into
mainfrom
eng-2476-run-the-schema-versus-migrations-check-in-ci

Conversation

@maparent

@maparent maparent commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Reviewer brief

  • Stacked on #1615 (ENG-2477): check-schema fails on main until that migration lands.
  • Review focus: the sqruff install step. lintSchemas.ts passes silently when sqruff is missing, so without it CI would skip the lint. The version is hard-coded on purpose; pinning it in one place is out of scope (see the comment on ENG-2476).

Verification

  • pnpm run check-schema on this branch, locally: passes in about 7 seconds.
  • Passing run, with a harmless change under packages/database to trigger the workflow. The new steps take about 61 seconds, mostly pulling the Postgres image. "Setup database" then reuses that image and drops from 102 to 76 seconds compared with the run on #1615, so the job is about 35 seconds longer.
  • Drift run, with a schema-only COMMENT ON and no migration: fails with "The schema files differ from the migrations."
  • Lint run, with a sqruff violation in account.sql: fails on LT01 in about a second; dbdiff doesn't run.
  • The test commits were dropped before review.

Loom video

https://www.loom.com/share/e6c88dd042be43a78ba5d0f88f6c0f14

Scope check

  • Ran $scope-check against ENG-2476 and the final diff.
  • Scope beyond Done When: None.

Standards check

  • Ran $dg-pr-adherence-check against the final diff and PR metadata.

Local delegated full review

  • Ran a comprehensive review of the entire final diff in a subagent with a fresh context. Use $dg-delegated-full-review when no other full-review workflow is available.

https://linear.app/discourse-graphs/issue/ENG-2476/run-the-schema-versus-migrations-check-in-ci


Devin Review

@vercel

vercel Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
discourse-graph Ready Ready Preview Nov 12, 2026 3:10pm UTC

Request Review

@linear-code

linear-code Bot commented Nov 11, 2026

Copy link
Copy Markdown

ENG-2476

@supabase

supabase Bot commented Nov 11, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project zytfjzqyijgagqxrzbmz because there are no changes detected in packages/database/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Devin Review

Comment on lines +39 to +41
- name: Check schema files against migrations
working-directory: ./packages/database
run: pnpm run check-schema

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Workflow-only changes skip the schema check

When a PR changes only the workflow, check-schema never runs. The pull_request.paths filter excludes workflow files, leaving changes to this check untested.

Learn more

This workflow runs only when a pull request changes a file under packages/database/**. The new schema check is added solely to the workflow, so the current PR does not trigger the database job. Later changes confined to the check also skip it.

Example: A PR edits only the Install sqruff step. GitHub skips Database tests, so the modified installation and schema check receive no CI run.

Recommended fix: Add the workflow itself to pull_request.paths so CI runs when its configuration changes, as well as when database files change.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think that workflow changes need not trigger a lint run.

Comment thread packages/database/supabase/config.toml Resolved
Base automatically changed from eng-2477-restore-the-my_accounts-migration-lost-in-the-eng to main November 12, 2026 15:08
@maparent
maparent force-pushed the eng-2476-run-the-schema-versus-migrations-check-in-ci branch from cbf1ffe to 3d803bf Compare November 12, 2026 15:09
@maparent
maparent merged commit 1ae4c00 into main Nov 12, 2026
5 of 6 checks passed
@maparent
maparent deleted the eng-2476-run-the-schema-versus-migrations-check-in-ci branch November 12, 2026 15:09

This branch was successfully deployed

1 active deployment
Preview — 3d803bf8 Deployed Nov 12, 2026 by vercel[bot]
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.

2 participants