Skip to content

[v3-3-test] Fix Dag run duration stats crash on PostgreSQL 14+ (#70833) - #70964

Open
github-actions[bot] wants to merge 1 commit into
v3-3-testfrom
backport-30006eb-v3-3-test
Open

[v3-3-test] Fix Dag run duration stats crash on PostgreSQL 14+ (#70833)#70964
github-actions[bot] wants to merge 1 commit into
v3-3-testfrom
backport-30006eb-v3-3-test

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

PostgreSQL 14 changed EXTRACT(epoch FROM ...) to return numeric rather than double precision, so DagRun.duration is hydrated as Decimal on Postgres 14+. The duration-stats percentile interpolation then multiplies a Decimal by a float, which Python disallows, so the Dag run stats endpoint raises a TypeError for any Dag that has completed runs.
(cherry picked from commit 30006eb)

Co-authored-by: Pierre Jeambrun pierrejbrun@gmail.com

PostgreSQL 14 changed EXTRACT(epoch FROM ...) to return numeric rather than double precision, so DagRun.duration is hydrated as Decimal on Postgres 14+. The duration-stats percentile interpolation then multiplies a Decimal by a float, which Python disallows, so the Dag run stats endpoint raises a TypeError for any Dag that has completed runs.
(cherry picked from commit 30006eb)

Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
@boring-cyborg boring-cyborg Bot added the area:API Airflow's REST/HTTP API label Aug 3, 2026
@vatsrahul1001
vatsrahul1001 marked this pull request as ready for review August 3, 2026 08:38
@vatsrahul1001 vatsrahul1001 added this to the Airflow 3.3.1 milestone Aug 3, 2026
@vatsrahul1001 vatsrahul1001 added the type:bug-fix Changelog: Bug Fixes label Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants