Unexplained rollback after 2.21 upgrade

Not quite following you here. Change references testing mode, but in test env we load the db from a structure file which is based on public, so it wouldn’t have caught a migration issue specific to a tenant, as this was.

the original error should bubble up after retry attempts are exhausted.

If this is the case, then it wouldn’t have caused our issue at least. But in preliminary testing, it seems that in specific conditions this does not happen (inside Multi transaction): Addresses nested transaction losing error information by tfwright · Pull Request #1432 · oban-bg/oban · GitHub

What seems to be happening there is the expected Postgrex error (with specific message about error condition) mutates into a DBConnection error (without context)