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

   ### Apache Airflow Provider(s)
   
   samba
   
   ### Versions of Apache Airflow Providers
   
   4.10.2
   
   Reverting to 4.9.2 fixed the issue.
   
   ### Apache Airflow version
   
   2.10.5
   
   ### Operating System
   
   Almalinux 8
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   Helm Chart 1.16.0
   
   ### What happened
   
   After updating the Samba Providers package to 4.10.2 using 
SambaHook.push_from_local() began erroring out with:
   `line 289: with open(local_filepath, "rb") as f, 
self.open_file(destination_filepath, mode="wb") as g:`
   `TypeError: 'NoneType' object does not support the context manager protocol`
   
   The destination_filepath variable is apparently NoneType. This occurs after:
   
   ```
   Running secure negotiate process
   receiving SMB2 Create Response
   sending SMB2 Close Request for file <<destination_path>>
   receiving SMB2 Close Response
   
   ```
   
   The destination file is created on the SMB share but is zerobytes in size 
and empty.
   
   ### What you think should happen instead
   
   The push_from_local() call should transfer the contents of the file too.
   
   ### How to reproduce
   
   Install apache-airflow-providers-samba==4.10.2 in Airflow 2.10.5.
   
   Then use SambaHook.push_from_local(destination_file, src_file, connection)
   
   ### Anything else
   
   This issue was resolved by downgrading to 4.9.2
   
   ### Are you willing to submit PR?
   
   - [x] 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