josh-fell commented on issue #19409:
URL: https://github.com/apache/airflow/issues/19409#issuecomment-962546489


   Hmm I wasn't sure off the top of my head but I dug into to the SDK a little. 
From what I can gather, if `ContainerClient. create_container()` [fails to 
create a 
container](https://github.com/Azure/azure-sdk-for-python/blob/73d0b36cf9c5ded2c5a642a48e9cf879f06455b5/sdk/storage/azure-storage-blob/azure/storage/blob/_container_client.py#L291-L299)
 (assuming metadata retrieval is OK) the original exception set is  
`HttpResponseError`. Then there is a 
[method](https://github.com/Azure/azure-sdk-for-python/blob/73d0b36cf9c5ded2c5a642a48e9cf879f06455b5/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/response_handlers.py#L86)
 which looks at the error response and tries to raise a more specific error 
based on the response headers. There is a long set of errors that are checked 
but if the error code pulled from the headers doesn't match this exhaustive, 
the `HttpResponseError` is used when raising the exception.
   
   With that said though, I'm unable to reproduce the issue with the steps 
outlined with version 3.2.0 and 3.3.0 of the Azure provider. @zockette Are 
there other details you could add to help reproduce the error?
   
   **Connection**
   
![image](https://user-images.githubusercontent.com/48934154/140631284-d46a5a3c-f82f-456e-8422-b0e05e08684b.png)
   
   **DAG**
   ```python
   from datetime import datetime
   
   from airflow.decorators import dag
   from airflow.providers.microsoft.azure.transfers.local_to_wasb import 
LocalFilesystemToWasbOperator
   
   from datetime import datetime
   
   from airflow.decorators import dag
   from airflow.providers.microsoft.azure.transfers.local_to_wasb import 
LocalFilesystemToWasbOperator
   
   
   @dag(
       dag_id="example_local_to_wasb",
       schedule_interval="@once",
       start_date=datetime(2021, 1, 1),
       catchup=False,
       default_args={"container_name": "mycontainer", "blob_name": "myblob"},
   )
   def local_to_wasb():
       upload = LocalFilesystemToWasbOperator(
           task_id="upload_file",
           container_name="mycontainer",
           blob_name="myblob",
           file_path="include/example-text.txt",
           load_options={"overwrite": True},
       )
   
   
   dag = local_to_wasb()
   ```
   
   **DAG Run Log**
   
![image](https://user-images.githubusercontent.com/48934154/140631362-88b3b09c-fa13-44a2-8fe6-4d760d3225ae.png)
   


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