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


##########
task-sdk/src/airflow/sdk/execution_time/schema/__init__.py:
##########
@@ -91,12 +91,15 @@ def registered_models_by_name() -> dict[str, 
type[BaseModel]]:
     single head class, so a name clash is a programmer error that must
     surface immediately rather than silently picking a winner.
     """
-    from airflow.dag_processing.processor import ToDagProcessor, ToManager
+    from airflow.dag_processing.lang_sdk_processor import DagFileParseRequest 
as LangSDKDagFileParseRequest
+    from airflow.dag_processing.processor import DagFileParseRequest, 
ToDagProcessor, ToManager
     from airflow.sdk.execution_time.comms import ToSupervisor, ToTask
 
     by_name: dict[str, type[BaseModel]] = {}
     for source in (ToTask, ToSupervisor, ToManager, ToDagProcessor):
-        for model in _iter_model_types(source):
+        for member in _iter_model_types(source):
+            # The wire registry describes language runtimes, not the Python 
parser's request.
+            model = LangSDKDagFileParseRequest if member is 
DagFileParseRequest else member

Review Comment:
   There should be a better way to do this. This loop should not contain 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to