kapopken commented on a change in pull request #15002:
URL: https://github.com/apache/airflow/pull/15002#discussion_r603106713



##########
File path: tests/providers/microsoft/azure/log/test_wasb_task_handler.py
##########
@@ -98,7 +98,7 @@ def test_wasb_log_exists(self, mock_hook):
 
     @mock.patch("airflow.providers.microsoft.azure.hooks.wasb.WasbHook")
     def test_wasb_read(self, mock_hook):
-        mock_hook.return_value.read_file.return_value = 'Log line'
+        mock_hook.return_value.read_file.return_value = b'Log line'

Review comment:
       I tried to set up a simple example of this scenario and I could not 
repro this. The only way this happens is on my running instance of airflow. 
Here is how I build the image
   
   FROM apache/airflow:2.0.1-python3.8
   COPY ./podtemplates /opt/airflow/templates
   
   USER airflow
   RUN pip install --user Flask-OpenID && \
       pip install --user authlib && \
       pip install --user cryptography && \
       pip install --user apache-airflow[crypto] && \
       pip install --user apache-airflow['wasb'] && \
       pip install --user azure-storage-blob===12.7.1 && \
       pip install --user lib && \
       pip install --user apache-airflow['kubernetes'] 
   
   I have tried all verions of the blob client + 12
   
   I can close this PR unless you can think of something to try. My workaround 
functions and we are running. It is just ugly that I have to overwrite the code 
to get this working like this
   
   COPY hacks/wasb_task_handler.py 
/home/airflow/.local/lib/python3.8/site-packages/airflow/providers/microsoft/azure/log




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to