uranusjr commented on code in PR #58543:
URL: https://github.com/apache/airflow/pull/58543#discussion_r3500671606
##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -2768,6 +2770,55 @@ def _update_state(dag: SerializedDAG, dag_run: DagRun):
dag_run.run_id,
)
continue
+ # For AssetAndTimeSchedule, defer starting until all required
assets are queued.
+ # Only gate scheduled runs; manual and backfill runs should start
immediately.
+ if isinstance(dag.timetable, AssetAndTimeSchedule) and
dag_run.run_type == DagRunType.SCHEDULED:
Review Comment:
I don’t think it is a good idea to handle timetables by special-casing the
type like this. Timetables are designed to provide encapsulation around
scheduling to begin with, and this kind of code structuring defeats the
purpose. Please think about implementation at a higher level to make the
interface more modular, similar to how various timetables implement time-based
scheduling differently, and how asset partitioning uses additional abstraction
to handle assets differently agasint different configurations.
--
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]