uranusjr commented on code in PR #51326: URL: https://github.com/apache/airflow/pull/51326#discussion_r2122570473
########## task-sdk/src/airflow/sdk/definitions/deadline.py: ########## @@ -58,9 +126,9 @@ class DeadlineReference: from airflow.models.deadline import ReferenceModels Review Comment: There are a few possible approaches. One is to go through serialisation so an sdk thing is serisalised-deserialised into a core thing that implements scheduler logic. This is usually used by scheduler and webapp related components. Another is to keep the evaluation logic in sdk, but only import core things inside the evaluation functions. This means the dependency to core is only needed when it’s actually used. Yet another is to use a manager pattern. Instead of each reference implementing evaluation logic inside the class, a manager class implements all logic for each of them and use `singledispatch` to map class to the correct logic. This is the best approach if user should not be able to subclass and override evaluation logic. Asset and XCom use this pattern. -- 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-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org