We're running Airflow against CockroachDB (which is designed to be "compatible" with PostgresSQL https://www.cockroachlabs.com/blog/why-postgres/), but with a few subtle differences https://www.cockroachlabs.com/docs/stable/porting-postgres.html).
It's been fairly painless so far (we've got a few minor tweaks of SQL grammar in our fork, especially around DB migrations), but we've come across something we think is worth merging back to Airflow trunk. It's both not quite correct behaviour in normal operation anyway, and it's a 4 character fix.
When a task has failed, we get this error writing to the task_fail table in (taskfail.py):
This is because total_seconds() returns a decimal, but it's assigned to the variable duration, bound to an integer database column here:
A fix looks like:
which means we're no longer reliant on the database to truncate and cast this correctly,
The flipside of this argument is documented here:
https://email@example.com - postgres made a conscious decision to not throw errors in this situation. I'll ping a copy of this ticket over to Cockroach labs too, to see if they have any thoughts (it's not listed as a current incompatibility, but probably should be).
From the stacktrace:
I'll attach a PR to this ticket in a sec.