jedcunningham commented on code in PR #28369:
URL: https://github.com/apache/airflow/pull/28369#discussion_r1049232384


##########
docs/apache-airflow/tutorial/taskflow.rst:
##########
@@ -365,7 +365,11 @@ You can apply the ``@task.sensor`` decorator to convert a 
regular Python functio
 BaseSensorOperator class. The Python function implements the poke logic and 
returns an instance of
 the ``PokeReturnValue`` class as the ``poke()`` method in the 
BaseSensorOperator does. The ``PokeReturnValue`` is
 a new feature in Airflow 2.3 that allows a sensor operator to push an XCom 
value as described in
-section "Having sensors return XOM values" of 
:doc:`apache-airflow-providers:howto/create-update-providers`.
+section "Having sensors return XCOM values" of 
:doc:`apache-airflow-providers:howto/create-update-providers`.
+
+Alternatively in cases where the sensor doesn't need to push XCOM values:  
both ``poke()`` and the wrapped
+function can return a boolean-like value where ``True`` designates the 
sensor's operation as complete and
+``False`` designates the sensor's operation as incomplete.

Review Comment:
   While this may work, I'm not sure this was intended? It isn't typed that way 
at least...
   
   
https://github.com/apache/airflow/blob/fbbd453d27fc9c6ac93f68de9e083ca684bec562/airflow/decorators/sensor.py#L59



##########
docs/apache-airflow/concepts/taskflow.rst:
##########
@@ -182,6 +182,15 @@ for deserialization ensure that ``deserialize(data: dict, 
version: int)`` is spe
 
   Note: Typing of ``__version__`` is required and needs to be ``ClassVar[int]``
 
+
+Sensors and the TaskFlow API
+--------------------------------------
+
+.. versionadded:: 2.5.0
+
+For an example of writing a Sensor using the TaskFlow API, see
+:ref:`Using the TaskFlow API with Sensor operators 
<taskflow/task_sensor_example>`.

Review Comment:
   I feel like we should have some actual content here instead of just linking 
over?



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