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

   ### Apache Airflow version
   
   main (development)
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   
   In a few places in the code, you have a `return`  statement in a `finally` 
block which would swallow any in-flight exception:
   
   
https://github.com/apache/airflow/blob/be553780e56cf8c34a65aecf2c52a33b82e0e039/providers/src/airflow/providers/amazon/aws/hooks/athena.py#L165
   
   
https://github.com/apache/airflow/blob/be553780e56cf8c34a65aecf2c52a33b82e0e039/providers/src/airflow/providers/amazon/aws/hooks/athena.py#L188
   
   
https://github.com/apache/airflow/blob/be553780e56cf8c34a65aecf2c52a33b82e0e039/providers/src/airflow/providers/amazon/aws/hooks/athena.py#L292
   
   
https://github.com/apache/airflow/blob/be553780e56cf8c34a65aecf2c52a33b82e0e039/providers/src/airflow/providers/amazon/aws/transfers/s3_to_dynamodb.py#L243
   
   This means that if an unhandled exception (like a `BaseException` such as 
`KeyboardInterrupt`) is raised from the `try` body, or any exception is raised 
from an `except`: clause, it will not propagate on as expected.
   
   See also 
https://docs.python.org/3/tutorial/errors.html#defining-clean-up-actions.
   
   ### What you think should happen instead?
   
   _No response_
   
   ### How to reproduce
   
   This is from analysis of the source code.
   
   ### Operating System
   
   All
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Other
   
   ### 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