Skip to content
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

AzureContainerInstancesOperator is not working due to argument error #18074

Closed
2 tasks done
binhnefits opened this issue Sep 7, 2021 · 5 comments · Fixed by #19668
Closed
2 tasks done

AzureContainerInstancesOperator is not working due to argument error #18074

binhnefits opened this issue Sep 7, 2021 · 5 comments · Fixed by #19668
Assignees
Labels

Comments

@binhnefits
Copy link

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.

self._ci_hook = AzureContainerInstanceHook(self.ci_conn_id)

Should this be?

        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?

  • Yes I am willing to submit a PR!

Code of Conduct

@binhnefits binhnefits added area:providers kind:bug This is a clearly a bug labels Sep 7, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Sep 7, 2021

Thanks for opening your first issue here! Be sure to follow the issue template!

@eladkal
Copy link
Contributor

eladkal commented Sep 8, 2021

@binhnefits assigned to you

@eladkal
Copy link
Contributor

eladkal commented Oct 14, 2021

@binhnefits are you still working on this issue?

@rafaelpierre
Copy link

I can also help with this one.

@eladkal eladkal assigned rafaelpierre and unassigned binhnefits Oct 28, 2021
@chinwobble
Copy link
Contributor

We are facing the same issue.

Would be great if this could be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants