Skip to content

Add run_after to TriggerDagRunOperator#62259

Merged
jason810496 merged 14 commits into
apache:mainfrom
arnoldmr01:feature/trigger-dagrun-support-run-after
Apr 29, 2026
Merged

Add run_after to TriggerDagRunOperator#62259
jason810496 merged 14 commits into
apache:mainfrom
arnoldmr01:feature/trigger-dagrun-support-run-after

Conversation

@arnoldmr01
Copy link
Copy Markdown
Contributor

@arnoldmr01 arnoldmr01 commented Feb 20, 2026

Why

To let TriggerDagRunOperator support run_after parameter in order to trigger multiple DagRuns of the same DAG in parallel without being constrained by logical_date.

What does the PR change

  • Add run_after parameter to TriggerDauRunOperator, TriggerDagRun, TriggerDAGRunPayload
  • Changed execute() logic. If run_after is NOTSET, the func will follow the original logic; otherwise, logical_date will be None

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 or {issue_number}.significant.rst, in airflow-core/newsfragments.

@arnoldmr01 arnoldmr01 force-pushed the feature/trigger-dagrun-support-run-after branch 3 times, most recently from a33dfeb to 8e7c84d Compare February 21, 2026 05:45
@arnoldmr01 arnoldmr01 changed the title temp Add run_after to TriggerDagRunOperator Feb 21, 2026
@arnoldmr01 arnoldmr01 force-pushed the feature/trigger-dagrun-support-run-after branch 4 times, most recently from 3d40250 to fedde25 Compare February 24, 2026 06:26
@arnoldmr01 arnoldmr01 marked this pull request as ready for review February 24, 2026 07:41
@arnoldmr01 arnoldmr01 marked this pull request as draft February 24, 2026 16:24
@arnoldmr01 arnoldmr01 marked this pull request as ready for review February 24, 2026 16:24
@jason810496 jason810496 self-requested a review March 2, 2026 14:27
Copy link
Copy Markdown
Member

@jason810496 jason810496 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! LGTM overall.

Comment thread providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py Outdated
Comment thread providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py Outdated
Comment thread providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py Outdated
Comment thread providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py Outdated
Comment thread task-sdk/src/airflow/sdk/api/client.py
@potiuk
Copy link
Copy Markdown
Member

potiuk commented Mar 12, 2026

@arnoldmr01 Converting to draft — this PR doesn't yet meet our Pull Request quality criteria.

  • Other failing CI checks: Failing: Additional PROD image tests / Airflow CTL integration tests with PROD image. Run prek run --from-ref main locally to reproduce. See static checks docs.
  • ⚠️ Unresolved review comments: This PR has 5 unresolved review threads from maintainers. Please review and resolve all inline review comments before requesting another review. You can resolve a conversation by clicking 'Resolve conversation' on each thread after addressing the feedback. See pull request guidelines.

Note: Your branch is 544 commits behind main. Please rebase and push again to get up-to-date CI results.

See the linked criteria for how to fix each item, then mark the PR "Ready for review". This is not a rejection — just an invitation to bring the PR up to standard. No rush.


Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you.

@arnoldmr01 arnoldmr01 force-pushed the feature/trigger-dagrun-support-run-after branch from 4a4a78f to 94c8910 Compare March 13, 2026 00:32
@arnoldmr01 arnoldmr01 marked this pull request as ready for review March 14, 2026 19:47
@arnoldmr01 arnoldmr01 marked this pull request as draft March 14, 2026 20:52
@arnoldmr01 arnoldmr01 force-pushed the feature/trigger-dagrun-support-run-after branch 3 times, most recently from 0cd218e to d598e1e Compare March 18, 2026 07:15
@arnoldmr01 arnoldmr01 marked this pull request as ready for review March 18, 2026 19:33
@arnoldmr01 arnoldmr01 force-pushed the feature/trigger-dagrun-support-run-after branch from d598e1e to 0dbf468 Compare March 18, 2026 22:40
@arnoldmr01 arnoldmr01 marked this pull request as ready for review April 14, 2026 15:31
Copy link
Copy Markdown
Member

@jason810496 jason810496 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update, LGTM!
Please resolve the conflict when you have a moment, then we can merge the PR.

@potiuk potiuk marked this pull request as draft April 23, 2026 00:42
@potiuk
Copy link
Copy Markdown
Member

potiuk commented Apr 23, 2026

@arnoldmr01 Converting to draft — this PR doesn't yet meet our Pull Request quality criteria.

  • Merge conflicts: this branch has conflicts with main and cannot be merged as-is. Rebase: git fetch upstream main && git rebase upstream/main, resolve, force-push.
  • Unresolved review comments (1 thread (from maintainers)): please walk through each unresolved review thread. Even if a suggestion looks incorrect or irrelevant — and some of them will be, especially any comments left by automated reviewers like GitHub Copilot — it is still the author's responsibility to respond: apply the fix, reply in-thread with a brief explanation of why the suggestion does not apply, or resolve the thread if the feedback is no longer relevant. Once you believe a thread is resolved — whether by pushing a fix or by explaining why the suggestion doesn't apply — please mark it as resolved yourself by clicking the 'Resolve conversation' button at the bottom of each thread. Reviewers don't auto-close their own threads, so an addressed-but-unresolved thread reads as 'still waiting on the author' and keeps the PR from moving forward.

See the linked criteria for how to fix each item, then mark the PR "Ready for review". This is not a rejection — just an invitation to bring the PR up to standard. No rush.


Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you.

@arnoldmr01 arnoldmr01 force-pushed the feature/trigger-dagrun-support-run-after branch from bb362a1 to 90d68b7 Compare April 23, 2026 17:06
@arnoldmr01 arnoldmr01 force-pushed the feature/trigger-dagrun-support-run-after branch from bb5760a to 13d03d4 Compare April 25, 2026 00:37
@arnoldmr01 arnoldmr01 force-pushed the feature/trigger-dagrun-support-run-after branch from 13d03d4 to c5f640a Compare April 25, 2026 19:12
@arnoldmr01 arnoldmr01 marked this pull request as ready for review April 25, 2026 21:35
@arnoldmr01
Copy link
Copy Markdown
Contributor Author

Might be unrelated CI failure

@ZhaoMJ
Copy link
Copy Markdown
Contributor

ZhaoMJ commented Apr 26, 2026

@arnoldmr01 Sorry, I just realized this PR already existed — I independently implemented the same run_after threading as part of #65856 (commit 82c130f). Besides Airflow 2 compat, there are mainly some differences in default value handling. Would you mind taking a look?

@potiuk
Copy link
Copy Markdown
Member

potiuk commented Apr 27, 2026

@arnoldmr01 — There are 1 unresolved review thread on this PR from @jason810496. Could you either push a fix or reply in each thread explaining why the feedback doesn't apply? Once you believe the feedback is addressed, mark the thread as resolved so the reviewer isn't re-pinged needlessly. Thanks!


Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you.

@jason810496 jason810496 merged commit 1300e56 into apache:main Apr 29, 2026
140 checks passed
@jason810496
Copy link
Copy Markdown
Member

Thanks @arnoldmr01 for focusing on this. Nice feature.

seruman pushed a commit to seruman/airflow that referenced this pull request Apr 30, 2026
* feat: add run_after to DagRunTriggerException

* feat: add support to TriggerDagRunOperator

feat: add support to TriggerDagRunOperator

* feat: add run_after to TriggerDagRunPayload

* feat: add run_after support to task_runner and supervisor

* feat: Add _validate_datetime_param

* feat: Add _parse_datetime_param

* feat: add versioning for TriggerDagRunPayload

* fix: add overload to _parse and _validate def

* test: update unit test

* fix: import is_arg_set

* chore: typo modification

* fix: fix unit test

* fix: fix static check

* feat: Add comment for unsupported attrs in AF2

---------

Co-authored-by: Arnold Lin <arnoldmr01@Arnolds-MacBook-Air.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants