The Wire · Showcase
SQLITE TEST FLAKES FIXED, DATETIME CASTING BREAKING CHANGE LANDS
By RepoJournal · Filed · About Elixir & Phoenix
Phoenix killed a long-standing SQLite test flakey that has haunted generated apps since day one, while Ecto ships a backward-incompatible DateTime normalization that tightens UTC handling.
Phoenix fixed a critical issue where generated error test files hardcoded `async: true` for SQLite apps, causing intermittent "Database busy" failures during `mix test` [1]. The root cause: ConnCase's setup block calls DataCase.setup_sandbox on Ecto-enabled apps, which SQLite cannot handle under concurrent test execution. The fix disables async mode only for SQLite with Ecto, leaving Postgres and no-Ecto apps running tests in parallel [2]. In parallel work, Ecto merged a backward-incompatible change that normalizes all DateTime casts to UTC before storing in naive datetime or date fields [3], addressing edge cases where non-UTC DateTime structs would silently corrupt data. This should not affect Phoenix-generated CRUD pages, but apps that deliberately pass timezone-aware datetimes to date fields will break. On the template front, Elixir cleaned up trailing whitespace and double newlines in files generated by `mix new` [4] [5], preventing Git from flagging formatting errors under strict whitespace configuration. Dependabot bumped jsdom to 30.0.1 and eslint to 10.8.0 across the Phoenix stack [6] [7].
One email a day. Unsubscribe in one click.
Keep up with Elixir & Phoenix in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Regenerate test files if you maintain a generated Phoenix+SQLite app, or cherry-pick the async fix from #6783 phoenixframework/phoenix [plan]
- → Audit datetime fields before upgrading Ecto if you pass non-UTC DateTime structs to naive datetime columns elixir-ecto/ecto [plan]
- → Run `mix new` on fresh projects to get clean template formatting elixir-lang/elixir [monitor]
References
- [1] Only use `async: true` for ConnCase error tests on Postgres/no-Ecto ↗ phoenixframework/phoenix
- [2] Only use async: true for ConnCase error tests on Postgres and no-Ecto apps (#6783) phoenixframework/phoenix
- [3] Normalize DateTime casts to UTC ↗ elixir-ecto/ecto
- [4] Ensure no double newlines in files generated by "mix new" ↗ elixir-lang/elixir
- [5] Fix trailing whitespace in files generated by "mix new" ↗ elixir-lang/elixir
- [6] Bump jsdom from 29.1.1 to 30.0.1 ↗ phoenixframework/phoenix
- [7] Bump the minor-and-patch group with 2 updates ↗ phoenixframework/phoenix