binhnefits opened a new issue #18074:
URL: https://github.com/apache/airflow/issues/18074


   ### Apache Airflow Provider(s)
   
   microsoft-azure
   
   ### Versions of Apache Airflow Providers
   
   3.1.0
   
   ### Apache Airflow version
   
   2.1.3 (latest released)
   
   ### Operating System
   
   Ubuntu
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   I'm getting this error when trying to run AzureContainerInstancesOperator. I 
believe its due to AzureContainerInstanceHook initialization when passing 
self.ci_conn_id as a positional argument.
   
   
https://github.com/apache/airflow/blob/79d85573591f641db4b5f89a12213e799ec6dea1/airflow/providers/microsoft/azure/operators/azure_container_instances.py#L202
   
   Should this be?
   ```py
           self._ci_hook = AzureContainerInstanceHook(conn_id=self.ci_conn_id)
   ```
   
   Error:
   ```
   Traceback (most recent call last):
     File 
"/home/airflow/.local/lib/python3.8/site-packages/airflow/models/taskinstance.py",
 line 1164, in _run_raw_task
       self._prepare_and_execute_task_with_callbacks(context, task)
     File 
"/home/airflow/.local/lib/python3.8/site-packages/airflow/models/taskinstance.py",
 line 1282, in _prepare_and_execute_task_with_callbacks
       result = self._execute_task(context, task_copy)
     File 
"/home/airflow/.local/lib/python3.8/site-packages/airflow/models/taskinstance.py",
 line 1312, in _execute_task
       result = task_copy.execute(context=context)
     File 
"/home/airflow/.local/lib/python3.8/site-packages/airflow/providers/microsoft/azure/operators/azure_container_instances.py",
 line 202, in execute
       self._ci_hook = AzureContainerInstanceHook(self.ci_conn_id)
     File 
"/home/airflow/.local/lib/python3.8/site-packages/airflow/providers/microsoft/azure/hooks/azure_container_instance.py",
 line 45, in __init__
       super().__init__(sdk_client=ContainerInstanceManagementClient, *args, 
**kwargs)
   TypeError: __init__() got multiple values for argument 'sdk_client'
   ```
   
   
   
   
   ### What you expected to happen
   
   _No response_
   
   ### How to reproduce
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### 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