Skip to content

Fix TaskInstance duration calculation with SQLite#68142

Open
henry3260 wants to merge 1 commit into
apache:mainfrom
henry3260:fix-sqlite-task-instance-duration
Open

Fix TaskInstance duration calculation with SQLite#68142
henry3260 wants to merge 1 commit into
apache:mainfrom
henry3260:fix-sqlite-task-instance-duration

Conversation

@henry3260
Copy link
Copy Markdown
Contributor

Why

In SQLite, %s already includes the whole seconds, while %f returns seconds within the current minute including its integer portion. Combining them counts whole seconds twice and can produce incorrect or negative durations when the
timestamps cross a minute boundary.

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@henry3260 henry3260 requested review from XD-DENG and ashb as code owners June 6, 2026 19:48
@henry3260 henry3260 force-pushed the fix-sqlite-task-instance-duration branch from 5a8266b to 45240e0 Compare June 7, 2026 09:18
@henry3260 henry3260 force-pushed the fix-sqlite-task-instance-duration branch from 45240e0 to 00815c3 Compare June 7, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant