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


##########
task-sdk/src/airflow/sdk/definitions/dag.py:
##########
@@ -590,6 +610,29 @@ def _validate_tags(self, _, tags: Collection[str]):
         if tags and any(len(tag) > TAG_MAX_LEN for tag in tags):
             raise ValueError(f"tag cannot be longer than {TAG_MAX_LEN} 
characters")
 
+    @allowed_run_types.validator
+    def _validate_allowed_run_types(self, _, allowed_run_types):
+        if not allowed_run_types:
+            return
+        from airflow.utils.types import DagRunType

Review Comment:
   We should avoid using imports from `airflow-core` in task sdk going forward. 
It is best to use `airflow.sdk.api.datamodels._generated` as @jason810496 
mentioned.
   
   > However the existing code in this file already imports DagRunType from 
airflow.utils.types 
   
   Regarding this, we plan to get rid of it in these ticket: 
https://github.com/apache/airflow/issues/54713
   
   Switching should not be too hard, just do it here, the other refs can be 
handled in the related ticket



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