You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/07/13 15:25:07 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #25013: Show 'dataset-triggered' as schedule interval for dataset-triggered dags

uranusjr commented on code in PR #25013:
URL: https://github.com/apache/airflow/pull/25013#discussion_r920214965


##########
airflow/models/dag.py:
##########
@@ -2495,11 +2495,15 @@ def bulk_write_to_db(cls, dags: Collection["DAG"], session=NEW_SESSION):
             orm_dag.last_parsed_time = timezone.utcnow()
             orm_dag.default_view = dag.default_view
             orm_dag.description = dag.description
-            orm_dag.schedule_interval = dag.schedule_interval
             orm_dag.max_active_tasks = dag.max_active_tasks
             orm_dag.max_active_runs = dag.max_active_runs
             orm_dag.has_task_concurrency_limits = any(t.max_active_tis_per_dag is not None for t in dag.tasks)
-            orm_dag.timetable_description = dag.timetable.description
+            if dag.schedule_on:
+                orm_dag.schedule_interval = 'dataset-triggered'

Review Comment:
   After AIP-39 we now only use `dag.schedule_interval` for display. (I wonder if it’d be cleaner to create a custom timetable for dataset-triggered DAGs, this would make this part easier to follow and have less special cases.)



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org