Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While adding aggregate support to AshSQLite, I felt like I was flying blind. I didn't know what Ash actually supports for aggregates, or how far SQLite was from AshPostgres's existing behaviour. This suite is how I mapped that out. It shows what equivalent SQLite support would need to look like in AshSQLite and AshSQL, and gives both adapters one shared definition of "correct".
Stacked on #3. This PR targets
agent/aggregate-strategies-clear-historyand only adds the conformance suite.What it is
conformance/is a separate Mix project. It runs 146 aggregate scenarios through Ash's public API against AshSQLite and AshPostgres, both built on this AshSQL checkout. Each scenario has one expected answer, written independently of either adapter. Postgres output isn't assumed to be correct.It covers:
no_attributes?.The adapter dependencies stay inside
conformance/. They aren't part of AshSQL's Hex package or its dependencies.What it found
e3c9d26) gives the same results as this branch: 116 supported, 26 known defects.multitenancy: :bypasson an aggregate is ignored;parent(...)raises aKeyError. This one fails on SQLite too.GAPS.mdlists each gap, how it could be implemented, and the questions that need a semantic decision.Baseline
These are scenario counts, not bug counts; several scenarios hit the same underlying gap.
MATRIX.mdhas the per-scenario status.How results are recorded
A gap that starts returning the correct result fails the suite until its status is changed to supported. That way a fix, or an accidental change, can't go unnoticed. A green run means the recorded expectations still hold, not that every feature works.
Run it
Postgres runs need a local PostgreSQL 17. Each adapter runs as a separate CI job. CI also runs the base branch's suite and shows what changed in the job summary.
Not covered
Performance, generated SQL, query counts, schema-based tenancy and libSQL aren't covered. The adapters' own test suites are still needed.
Merge order
The suite pins
wtsnz/ash_sqliteat46a4b86and AshPostgres at945073e4. Once ash-project#232 merges, the SQLite pin needs to point at ash-project.Validation
Validated on Erlang 27.3.4.3, Elixir 1.18.4 and PostgreSQL 17.5:
Open question
Does a conformance project with adapter dependencies belong in this repo? If not, I'm happy to move it elsewhere.