Unique run_id across manually triggered Dags with schedules#59477
Merged
pierrejeambrun merged 2 commits intoapache:mainfrom Jan 13, 2026
Merged
Unique run_id across manually triggered Dags with schedules#59477pierrejeambrun merged 2 commits intoapache:mainfrom
pierrejeambrun merged 2 commits intoapache:mainfrom
Conversation
2 tasks
b530a1a to
a2f862b
Compare
Member
pierrejeambrun
left a comment
There was a problem hiding this comment.
LGTM, just a question.
github-actions bot
pushed a commit
to aws-mwaa/upstream-to-airflow
that referenced
this pull request
Jan 13, 2026
…es (apache#59477) * run id no longer collides in manual runs * ruff format; (cherry picked from commit 13f3e26) Co-authored-by: Steve Ahn <steveahnahn@g.ucla.edu>
jason810496
pushed a commit
to jason810496/airflow
that referenced
this pull request
Jan 22, 2026
…9477) * run id no longer collides in manual runs * ruff format;
jhgoebbert
pushed a commit
to jhgoebbert/airflow_Owen-CH-Leung
that referenced
this pull request
Feb 8, 2026
…9477) * run id no longer collides in manual runs * ruff format;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Manual triggers of scheduled Dags could generate the same run_id repeatedly (often aligned to the schedule boundary). Triggering the same Dag twice would then fail with a 409 Conflict due to a duplicate run_id
Solution
When a manual trigger provides a logical_date, Airflow still infers the correct data_interval for the run, but it no longer rewrites run_after to the scheduled data_interval.end. This keeps manual trigger run_ids based on the actual trigger time making them unique across repeated manual triggers.
Manual testing in breeze triggering a daily scheduled dag via manual trigger runids:
scheduled__2025-12-15T00:00:00+00:00
manual__2025-12-15T04:16:39.584387+00:00
manual__2025-12-15T04:16:50.627593+00:00
manual__2025-12-15T04:18:07.769612+00:00
Related
Fixes #59342