Skip to content

Install the Ash SQL helpers in the test database from committed codegen - #23

Merged
palermo-git merged 1 commit into
mainfrom
t/ash-functions-test-db
Oct 28, 2026
Merged

palermo-git merged 1 commit into
mainfrom
t/ash-functions-test-db

Conversation

@palermo-git

Copy link
Copy Markdown
Contributor

The test repo declared ash-functions but the suite never installed them (0 ash_* functions in the test database), and mix ash.codegen --check had 2 pending files. This commits the generated extension migration and snapshot under test/support/priv (outside the package), runs it in test_helper, and adds mix ash.codegen --check to release-checks. Test harness and CI only; no library code changes.

The test repo declares installed_extensions ["ash-functions"], but the
suite never installed them: the test database had no ash_* functions,
while every consumer's repo installs them through its own codegen, and
mix ash.codegen --check reported two pending files nothing ran.
AshPostgres 2.15 emits ash_required/2 in generated SQL, so a path that
needs the helpers would fail for consumers yet pass here.

The generated extension migration and snapshot are committed under
test/support/priv (outside the Hex package); config/test.exs points the
test repo there, and test_helper.exs runs the migration in :auto mode
before the per-test sandbox. CI's release-checks job now runs
mix ash.codegen --check so the output stays current with the lock.

Verification: the test database now has 8 ash_* functions and one
recorded migration (it had 0); the five catalog-inspecting test files
pass 48 tests; mix ash.codegen --check reports nothing pending.
@palermo-git
palermo-git requested a review from corepay as a code owner October 28, 2026 12:56
@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 72d1a6e5-2d9f-45ed-8f90-6ec250beec47
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@palermo-git
palermo-git merged commit aae3179 into main Oct 28, 2026
5 checks passed
@palermo-git
palermo-git deleted the t/ash-functions-test-db branch October 28, 2026 13:46
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