Jonghyun-An opened a new pull request, #74145:
URL: https://github.com/apache/airflow/pull/74145

   FTP and FTPS sensors configured with `fail_on_transient_errors=False` fail 
on temporary replies such as `450` instead of waiting for the next poke. When a 
server closes the control connection after `421`, cleanup can also raise 
`EOFError` and hide the sensor's result or the original FTP error.
   
   Handle `ftplib.error_temp` with the existing reply-code policy. The shared 
FTP/FTPS hooks now release disconnected connections without letting `EOFError`, 
`OSError` or `421` during logout replace the result. This also applies to other 
hook users. Other logout errors still propagate after the connection is 
released. Closing an unopened or already-closed hook is a no-op. The sensor's 
default failure policy, unknown reply codes and `550` handling remain the same.
   
   ### Testing
   
   I tested this change in a Breeze container with Python 3.10. I ran `pytest 
providers/ftp/tests/unit/ftp -q`, which reported 79 passed. The FTP-to-S3 and 
S3-to-FTP suites reported 24 passed.
   
   I also checked 64 before/after scenarios over 92 connections with a local 
loopback FTP/FTPS server. This included 46 TLS sessions with certificate and 
hostname verification.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — OpenAI Codex (GPT-6)
   
   Generated-by: OpenAI Codex (GPT-6) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   
   ---
   


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