You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "pankajastro (via GitHub)" <gi...@apache.org> on 2023/10/03 17:48:53 UTC
[PR] Bump azure-mgmt-containerinstance [airflow]
pankajastro opened a new pull request, #34738:
URL: https://github.com/apache/airflow/pull/34738
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
Thank you for contributing! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
In case of an existing issue, reference it using one of the following:
closes: #ISSUE
related: #ISSUE
How to write a good git commit message:
http://chris.beams.io/posts/git-commit/
-->
<!-- Please keep an empty line above the dashes. -->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Bump azure-mgmt-containerinstance [airflow]
Posted by "strictness (via GitHub)" <gi...@apache.org>.
strictness commented on PR #34738:
URL: https://github.com/apache/airflow/pull/34738#issuecomment-1746553061
Hi, I'm just adding some additional info for you guys that will be relevant once you come to updating the hooks (related issue #34749)
> The hook in container_instance.py should use the azure.identity package instead of azure.common.credentials. [Link to code](https://github.com/apache/airflow/blob/main/airflow/providers/microsoft/azure/hooks/container_instance.py#L25)
>
> Microsoft posted deprecation warnings about using that package since early 2021 - [azure.common](https://learn.microsoft.com/en-us/python/api/azure-common/azure.common.credentials?view=azure-python-previous).
>
> https://github.com/Azure/azure-sdk-for-python/issues/16908#issuecomment-785216591, where the solution is to start using azure.identity instead.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Bump azure-mgmt-containerinstance [airflow]
Posted by "pankajastro (via GitHub)" <gi...@apache.org>.
pankajastro commented on code in PR #34738:
URL: https://github.com/apache/airflow/pull/34738#discussion_r1344678280
##########
airflow/providers/microsoft/azure/operators/container_instances.py:
##########
@@ -90,7 +89,6 @@ class AzureContainerInstancesOperator(BaseOperator):
:param restart_policy: Restart policy for all containers within the container group.
Possible values include: 'Always', 'OnFailure', 'Never'
:param ip_address: The IP address type of the container group.
- :param network_profile: The network profile information for a container group.
Review Comment:
yes, still try a few things, will update the provider.yaml and changelog.rst if needed
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Bump azure-mgmt-containerinstance [airflow]
Posted by "pankajastro (via GitHub)" <gi...@apache.org>.
pankajastro commented on code in PR #34738:
URL: https://github.com/apache/airflow/pull/34738#discussion_r1348370532
##########
tests/providers/microsoft/azure/hooks/test_azure_container_instance.py:
##########
@@ -52,7 +52,10 @@ def setup_test_cases(self, create_mock_connection):
conn_type="azure_container_instances",
login="login",
password="key",
- extra={"tenantId": "tenant_id", "subscriptionId": "subscription_id"},
+ extra={
+ "tenantId": "63e85d06-62e4-11ee-8c99-0242ac120002",
Review Comment:
it is Random. I use https://www.uuidgenerator.net/ to generate it. The new sdk throws a value error if tenantId is not valid uuid
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Bump azure-mgmt-containerinstance [airflow]
Posted by "strictness (via GitHub)" <gi...@apache.org>.
strictness commented on code in PR #34738:
URL: https://github.com/apache/airflow/pull/34738#discussion_r1345553231
##########
airflow/providers/microsoft/azure/hooks/container_instance.py:
##########
@@ -19,7 +19,7 @@
import warnings
from functools import cached_property
-from typing import TYPE_CHECKING, Any
+from typing import TYPE_CHECKING, Any, cast
from azure.common.client_factory import get_client_from_auth_file, get_client_from_json_dict
from azure.common.credentials import ServicePrincipalCredentials
Review Comment:
Package is deprecated and no longer working. Consider using `azure.identity` ([relevant info](https://learn.microsoft.com/en-us/python/api/azure-common/?view=azure-python-previous))
Related issue on [azure-sdk-for-python](https://github.com/Azure/azure-sdk-for-python/issues/16908#issuecomment-785216591)
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Bump azure-mgmt-containerinstance [airflow]
Posted by "pankajastro (via GitHub)" <gi...@apache.org>.
pankajastro commented on code in PR #34738:
URL: https://github.com/apache/airflow/pull/34738#discussion_r1348496811
##########
airflow/providers/microsoft/azure/hooks/container_instance.py:
##########
@@ -19,7 +19,7 @@
import warnings
from functools import cached_property
-from typing import TYPE_CHECKING, Any
+from typing import TYPE_CHECKING, Any, cast
from azure.common.client_factory import get_client_from_auth_file, get_client_from_json_dict
from azure.common.credentials import ServicePrincipalCredentials
Review Comment:
Removed ServicePrincipalCredentials and added ClientSecretCredential from `azure.identity`
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Bump azure-mgmt-containerinstance [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on code in PR #34738:
URL: https://github.com/apache/airflow/pull/34738#discussion_r1344665048
##########
airflow/providers/microsoft/azure/operators/container_instances.py:
##########
@@ -90,7 +89,6 @@ class AzureContainerInstancesOperator(BaseOperator):
:param restart_policy: Restart policy for all containers within the container group.
Possible values include: 'Always', 'OnFailure', 'Never'
:param ip_address: The IP address type of the container group.
- :param network_profile: The network profile information for a container group.
Review Comment:
This is breaking change.
Please set major version on `provider.yaml` we will also need entry in changelog.rst (top of the file) with the things that were broken and how to mitigate them.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Bump azure-mgmt-containerinstance [airflow]
Posted by "Lee-W (via GitHub)" <gi...@apache.org>.
Lee-W commented on code in PR #34738:
URL: https://github.com/apache/airflow/pull/34738#discussion_r1348316175
##########
airflow/providers/microsoft/azure/CHANGELOG.rst:
##########
@@ -27,6 +27,20 @@
Changelog
---------
+8.0.0
+.....
+
+Breaking changes
+~~~~~~~~~~~~~~~~
+
+.. warning::
+ In this version of the provider, we have removed network_profile param from AzureContainerInstancesOperator
+
+* Remove ``network_profile`` param from ``AzureContainerInstancesOperator``
+* Remove deprecated ``extra__azure__tenantId`` from azure_container_instance connection extras
+* Remove deprecated ``extra__azure__subscriptionId`` from azure_container_instance connection extras
Review Comment:
Should we mention the named tuple `Volume` has been removed as well?
##########
tests/providers/microsoft/azure/hooks/test_azure_container_instance.py:
##########
@@ -52,7 +52,10 @@ def setup_test_cases(self, create_mock_connection):
conn_type="azure_container_instances",
login="login",
password="key",
- extra={"tenantId": "tenant_id", "subscriptionId": "subscription_id"},
+ extra={
+ "tenantId": "63e85d06-62e4-11ee-8c99-0242ac120002",
Review Comment:
Is it a valid id? or just some random one?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Bump azure-mgmt-containerinstance [airflow]
Posted by "pankajastro (via GitHub)" <gi...@apache.org>.
pankajastro merged PR #34738:
URL: https://github.com/apache/airflow/pull/34738
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Bump azure-mgmt-containerinstance [airflow]
Posted by "pankajastro (via GitHub)" <gi...@apache.org>.
pankajastro commented on code in PR #34738:
URL: https://github.com/apache/airflow/pull/34738#discussion_r1348505383
##########
airflow/providers/microsoft/azure/operators/container_instances.py:
##########
@@ -90,7 +89,6 @@ class AzureContainerInstancesOperator(BaseOperator):
:param restart_policy: Restart policy for all containers within the container group.
Possible values include: 'Always', 'OnFailure', 'Never'
:param ip_address: The IP address type of the container group.
- :param network_profile: The network profile information for a container group.
Review Comment:
yeah, updated provider.yaml and changelog
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Bump azure-mgmt-containerinstance [airflow]
Posted by "pankajastro (via GitHub)" <gi...@apache.org>.
pankajastro commented on code in PR #34738:
URL: https://github.com/apache/airflow/pull/34738#discussion_r1348495683
##########
airflow/providers/microsoft/azure/CHANGELOG.rst:
##########
@@ -27,6 +27,20 @@
Changelog
---------
+8.0.0
+.....
+
+Breaking changes
+~~~~~~~~~~~~~~~~
+
+.. warning::
+ In this version of the provider, we have removed network_profile param from AzureContainerInstancesOperator
+
+* Remove ``network_profile`` param from ``AzureContainerInstancesOperator``
+* Remove deprecated ``extra__azure__tenantId`` from azure_container_instance connection extras
+* Remove deprecated ``extra__azure__subscriptionId`` from azure_container_instance connection extras
Review Comment:
I have reverted this PTAL
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org