-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FTPHook doesn't not allow to change port #39308
Comments
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval. |
@Lee-W I could investigate it first, please feel free to assign it to me. |
Sure! Just assigned to you. |
Hello, I am Velmira and I am a new member. I think I've fixed this bug already. I just need to run tests for the change. If you're still not making progress, I can create a pull request and solve the problem. |
Hi @VelmiraPetkova sure, please go for it |
Thanks, @VelmiraPetkova, for offering the help, and @josix, for the quick confirmation! I'll assign this to @VelmiraPetkova instead |
I have this issue fixed in my local setup too. If you need any help, I can guide you @VelmiraPetkova |
Apache Airflow Provider(s)
ftp
Versions of Apache Airflow Providers
3.8.0
Apache Airflow version
2.6.3
Operating System
Ubuntu 20.04
Deployment
Official Apache Airflow Helm Chart
Deployment details
Irrelevant as it is in source code
What happened
When setting up an FTP connection with a custom port (different from 21), the FTP Hook does not read it at all and simply passes the hostname and uses the default port set by FTP_PORT in ftplib.FTP_PORT (used by ftplib.FTP.port), thus preventing any modification of default port 21.
PS: The 'connect' function of the FTP class reads port from the self.port attribute;
What you think should happen instead
The FTP Hook should be able to read the port (if set) and pass it to the FTP object created
How to reproduce
Set up any FTP connection with and test it on Airflow UI.
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: