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

   ### Apache Airflow version
   
   2.10.5
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   I'm writing a soft-fail sensor with a trigger and want to reschedule in some 
special events.
   My code raise `AirflowRescheduleException` in deferred next method, but the 
task was marked as `SKIPPED`.
   
   
   
   ### What you think should happen instead?
   
   Task should set to UP_TO_RESCHEDULE when AirflowRescheduleException raises.
   
   ### How to reproduce
   
   I found these code may case this issue:
   
[BaseSensorOperator](https://github.com/apache/airflow/blob/b93c3db6b1641b0840bd15ac7d05bc58ff2cccbf/airflow/sensors/base.py#L342C1-L348C18)
   
   
   Maybe these code can be changed to
   ```python
       def resume_execution(self, next_method: str, next_kwargs: dict[str, Any] 
| None, context: Context):
           try:
               return super().resume_execution(next_method, next_kwargs, 
context)
   +       except AirflowRescheduleException:
   +           raise
           except (AirflowException, TaskDeferralError) as e:
               if self.soft_fail:
                   raise AirflowSkipException(str(e)) from e
               raise
   ```
   
   Sorry I can't make a pull request, I cannot push code to Github.com 
currently.
   
   ### Operating System
   
   CentOS 7
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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