Skip to content

ci(database): upgrade smoke-test for migrations (SQLite + MySQL)#94

Merged
fabiodalez-dev merged 1 commit into
mainfrom
ci/upgrade-smoke-test
Jun 13, 2026
Merged

ci(database): upgrade smoke-test for migrations (SQLite + MySQL)#94
fabiodalez-dev merged 1 commit into
mainfrom
ci/upgrade-smoke-test

Conversation

@fabiodalez-dev

Copy link
Copy Markdown
Owner

Summary

Second updater-parity workstream (ported from Pinakes' ci-upgrade-smoke.yml, extended to dual-DB). A CI safety net that catches the class of bug a per-PR review misses: a migration that doesn't actually apply on a real engine, or that silently regresses against a previous release's schema.

.github/workflows/upgrade-smoke.yml runs on PRs touching database/** or version.json:

  1. Baseline — the latest release's cimaise-*.zip database/schema.<db>.sql when present (a real old-production state), else the branch schema (a fresh install — the migrations then act as an idempotency check against the current structure).
  2. Apply — every branch migrate_*_<db>.sql in semantic-version order via the native sqlite3 / mysql clients (which parse trigger BEGIN...END and DELIMITER blocks themselves, so this is independent of the PHP migration runner). Only idempotent errors (already exists / duplicate) are tolerated; anything else fails the job.
  3. Verify — the objects the migrations introduce: the 1.4.0 collections / collection_images tables, the 1.2.0 analytics indexes, the 1.2.0/1.3.0 marker settings.

Runs as a [sqlite, mysql] matrix. Release URLs and resolved schema paths are passed through env:, never interpolated into run: (no injection surface).

Testing

  • YAML validated; actionlint clean.
  • The SQLite leg was simulated locally end-to-end against database/schema.sqlite.sql + the three branch migrations: all apply cleanly, verify reports collections/collection_images present and the marker settings seeded.
  • The MySQL leg is exercised by this PR's own CI run (the workflow triggers on the workflow-file change).

New .github/workflows/upgrade-smoke.yml (adapted from Pinakes,
extended to dual-DB). On PRs touching database/** or version.json it:

- resolves a baseline schema — the latest release's cimaise-*.zip
  database/schema.<db>.sql when present, else the branch schema;
- applies every branch migrate_*_<db>.sql in semantic-version order
  via the native sqlite3 / mysql clients (which handle trigger and
  DELIMITER blocks themselves — independent of the PHP runner),
  tolerating only idempotent errors (already-exists / duplicate);
- verifies the objects the migrations add (collections tables, the
  1.2.0 analytics indexes, the 1.2.0/1.3.0 marker settings).

Runs as a [sqlite, mysql] matrix. Untrusted-input-free: release URLs
and schema paths are passed via env, not interpolated into run:.
@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@fabiodalez-dev, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 49 minutes and 26 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 94eb7b01-f22d-4375-95f7-25ae33fd8d88

📥 Commits

Reviewing files that changed from the base of the PR and between de47e82 and a228d96.

📒 Files selected for processing (1)
  • .github/workflows/upgrade-smoke.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/upgrade-smoke-test

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@fabiodalez-dev

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@fabiodalez-dev fabiodalez-dev merged commit cc69e05 into main Jun 13, 2026
3 of 4 checks passed
@fabiodalez-dev fabiodalez-dev deleted the ci/upgrade-smoke-test branch June 13, 2026 18:43
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