vincbeck commented on PR #36523: URL: https://github.com/apache/airflow/pull/36523#issuecomment-1875470814
> > If the condition is already met and the task is deferred, what happens? My understanding is the task gets executed successfully. So the gain here is just time? Instead of deferring the task for nothing (because the condition is already met), we return it directly. Unless there is a very good reason to do so I am not really in favor of this change because it basically duplicates what the trigger is already doing but in the operator itself. > > Yes, I think the main gain here is time as we avoid unnecessary serialization and deserialization. Another thing is for consistency. We already have this behavior for some of the operators > > https://github.com/apache/airflow/blob/223a98420bbdfd0256e58f4e9aa3a06bda914c8a/airflow/providers/amazon/aws/sensors/emr.py#L647-L658 > > https://github.com/apache/airflow/blob/223a98420bbdfd0256e58f4e9aa3a06bda914c8a/airflow/providers/amazon/aws/operators/emr.py#L578-L597 > > > If we go down that path, I guess this logic can apply to any deferrable operator, and as such, such logic should be copied over to all deferrable operators > > Yes, I think that's something we should do eventually I see, I dont necessarily agree but I'll wait others to comment, I might be the only grumpy one here :) -- 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