guan404ming commented on code in PR #61833:
URL: https://github.com/apache/airflow/pull/61833#discussion_r2815353632


##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -1810,6 +1810,18 @@ def _create_dagruns_for_partitioned_asset_dags(self, 
session: Session) -> set[st
                 self.log.error("Dag '%s' not found in serialized_dag table", 
apdr.target_dag_id)
                 continue
 
+            dag_model = session.scalar(select(DagModel).where(DagModel.dag_id 
== apdr.target_dag_id).limit(1))
+            if (
+                dag_model
+                and dag_model.allowed_run_types is not None
+                and DagRunType.ASSET_TRIGGERED.value not in 
dag_model.allowed_run_types
+            ):
+                self.log.warning(
+                    "Dag does not allow asset-triggered runs; skipping",
+                    dag_id=apdr.target_dag_id,
+                )
+                continue

Review Comment:
   This check has been removed. Parse-time validation `in 
_validate_allowed_run_types` already raises a ValueError if an asset-scheduled 
dag doesn't include `ASSET_TRIGGERED` in `allowed_run_types`, so the runtime 
check was redundant.



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