ninsbl opened a new pull request, #77667:
URL: https://github.com/apache/airflow/pull/77667
<!-- SPDX-License-Identifier: Apache-2.0
https://www.apache.org/licenses/LICENSE-2.0 -->
Larger backfill operations blocking scheduled DagRuns from starting has been
a concern in Airflow. See, for example, #9176.
For manually triggered backfills of scheduled DAGs, this has been addressed
by assigning a lower scheduling priority to backfill runs. However, when
backfill runs emit asset events, the resulting asset-triggered Dag runs are
still treated as normal runs and can fill the queue of downstream DAGs, so Dag
runs triggered by recent may have to wait for Dag runs triggered from backfill.
This PR addresses that issue by allowing users to optionally propagate the
reduced backfill priority to downstream asset-triggered Dag runs. When enabled,
Dag runs created from asset events originating from a backfill will also
receive lower scheduling priority, allowing Dag runs created from recent asset
events to be scheduled first.
With the proposed changes, users can:
- tick the _Also deprioritize downstream asset-triggered runs_ in the
Backfill UI
- use the _--propagate-priority_ flag in the CLI
- set _"propagate_priority": true_ in the REST API
When enabled, asset-triggered Dag runs originating from backfill activity
are marked accordingly and receive lower priority during Dag run scheduling
decisions.
* related: #9176 See also #43969
I have also prepared example DAGs if they would be useful for documentation.
The feature does not require any changes to DAG code though, so I was not sure
if example DAGs are the right addition... Just let me know, and I add them...
##### Was generative AI tooling used to co-author this PR?
<!--
If generative AI tooling has been used in the process of authoring this PR,
please
change below checkbox to `[X]` followed by the name of the tool, uncomment
the "Generated-by".
-->
- [X] Yes (please specify the tool below)
Generated-by: [Copilot, Claude Sonnet] following [the
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]