dstandish commented on code in PR #31808:
URL: https://github.com/apache/airflow/pull/31808#discussion_r1227270054


##########
airflow/triggers/temporal.py:
##########
@@ -68,9 +68,8 @@ async def run(self):
         while self.moment > timezone.utcnow():
             self.log.info("sleeping 1 second...")
             await asyncio.sleep(1)
-        # Send our single event and then we're done
-        self.log.info("yielding event with payload %r", self.moment)
-        yield TriggerEvent(self.moment)
+        self.log.info("Sensor time condition reached; marking task successful 
and exiting")
+        yield TaskSuccessEvent()

Review Comment:
   actually yeah... i think we discussed this a while back and agreed (though 
may not have gotten around to documenting)
   
   our backcompat guarantee for operators is about their behavior, not the 
exact structure of all of their methods. we don't publish them as "frameworks" 
to build upon -- they are end products.
   
   so i think the operators are not a concern, but potentially the trigger 
class itself could be a concern since it now exits the task instead of sending 
back to task.  so at most, if we need to do anything, we would need either to 
create another version of DateTimeTrigger which exits, or make it 
parameterizable.  but we would be free to update the opreators to use this new 
behavior since it does not affect overall behavior, even if it leaves a legacy 
method unused (execute_complete, that is).



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