You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "kaxil (via GitHub)" <gi...@apache.org> on 2025/01/11 17:12:22 UTC

[I] Refactor `BaseSensorOperator` to support Reschedule mode with Task SDK [airflow]

kaxil opened a new issue, #45580:
URL: https://github.com/apache/airflow/issues/45580

   `BaseSensorOperator` has some logic to use `max_tries` from Context as well as access DB directly. This won't work with Task SDK and as such DAGs like [`example_sensor_decorator`](https://github.com/apache/airflow/blob/168f76562e617cd8e8a41ec684bfda09db6b5705/airflow/example_dags/example_sensor_decorator.py) will fail.
   
   https://github.com/apache/airflow/blob/6844cce95e1d02b06a2de7159db9eb2ea48ac74b/airflow/sensors/base.py#L219-L243
   
   <img width="1247" alt="Image" src="https://github.com/user-attachments/assets/bea150bd-e08e-4b9b-9eca-e0ac09dc8871" />
   
   <img width="1233" alt="Image" src="https://github.com/user-attachments/assets/4c7bdec0-9222-4ad3-8701-478402b8c972" />
   
   The `max_tries` is easier since we can pass it we can in the following code and re-generate the API client.
   
   https://github.com/apache/airflow/blob/168f76562e617cd8e8a41ec684bfda09db6b5705/airflow/executors/workloads.py#L42-L52
   
   Replacing direct DB access in that `BaseSensorOperator`, on the other hand, needs to be figured out!


-- 
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-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Refactor `BaseSensorOperator` to support Reschedule mode with Task SDK [airflow]

Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil closed issue #45580: Refactor `BaseSensorOperator` to support Reschedule mode with Task SDK
URL: https://github.com/apache/airflow/issues/45580


-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Refactor `BaseSensorOperator` to support Reschedule mode with Task SDK [airflow]

Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil closed issue #45580: Refactor `BaseSensorOperator` to support Reschedule mode with Task SDK
URL: https://github.com/apache/airflow/issues/45580


-- 
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-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org