ephraimbuddy commented on code in PR #35316:
URL: https://github.com/apache/airflow/pull/35316#discussion_r1378466063


##########
airflow/models/dag.py:
##########
@@ -746,6 +747,17 @@ def validate_setup_teardown(self):
                         raise ValueError("Setup tasks must be followed with 
trigger rule ALL_SUCCESS.")
             FailStopDagInvalidTriggerRule.check(dag=self, 
trigger_rule=task.trigger_rule)
 
+    def _validate_tasks_not_empty(self):
+        """
+        Validate that this DAG has something in `tasks`.
+
+        Somehow in the wild we've encountered a state where the root taskgroup 
shows a task,
+        but the `tasks` property doesn't. This shouldn't be possible, but when 
it does happen,
+        the scheduler crashes.
+        """
+        if self.task_group.children and not self.tasks:

Review Comment:
   Maybe we should warn and let it pass but then make the scheduler not to crash



-- 
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]

Reply via email to