You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Lee-W (via GitHub)" <gi...@apache.org> on 2023/08/28 11:12:07 UTC

[GitHub] [airflow] Lee-W opened a new pull request, #33822: feat(providers/microsoft): add DefaultAzureCredential support to AzureContainerVolumeHook

Lee-W opened a new pull request, #33822:
URL: https://github.com/apache/airflow/pull/33822

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


[GitHub] [airflow] Lee-W commented on pull request #33822: feat(providers/microsoft): add DefaultAzureCredential support to AzureContainerVolumeHook

Posted by "Lee-W (via GitHub)" <gi...@apache.org>.
Lee-W commented on PR #33822:
URL: https://github.com/apache/airflow/pull/33822#issuecomment-1698797957

   Thanks! I couldn't reproduce it locally yesterday and thus feel a bit confused. I'll take a deeper look next time.


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


[GitHub] [airflow] pankajastro merged pull request #33822: feat(providers/microsoft): add DefaultAzureCredential support to AzureContainerVolumeHook

Posted by "pankajastro (via GitHub)" <gi...@apache.org>.
pankajastro merged PR #33822:
URL: https://github.com/apache/airflow/pull/33822


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


[GitHub] [airflow] Lee-W commented on a diff in pull request #33822: feat(providers/microsoft): add DefaultAzureCredential support to AzureContainerVolumeHook

Posted by "Lee-W (via GitHub)" <gi...@apache.org>.
Lee-W commented on code in PR #33822:
URL: https://github.com/apache/airflow/pull/33822#discussion_r1308280844


##########
airflow/providers/microsoft/azure/hooks/container_volume.py:
##########
@@ -54,14 +56,22 @@ def _get_field(self, extras, name):
     @staticmethod
     def get_connection_form_widgets() -> dict[str, Any]:
         """Returns connection widgets to add to connection form."""
-        from flask_appbuilder.fieldwidgets import BS3PasswordFieldWidget
+        from flask_appbuilder.fieldwidgets import BS3PasswordFieldWidget, BS3TextFieldWidget
         from flask_babel import lazy_gettext
-        from wtforms import PasswordField
+        from wtforms import PasswordField, StringField
 
         return {
             "connection_string": PasswordField(
                 lazy_gettext("Blob Storage Connection String (optional)"), widget=BS3PasswordFieldWidget()
             ),
+            "subscription_id": StringField(
+                lazy_gettext("Subscription ID (optional)"),
+                widget=BS3TextFieldWidget(),
+            ),
+            "resource_group": StringField(
+                lazy_gettext("Resource group name (optional)"),
+                widget=BS3TextFieldWidget(),
+            ),

Review Comment:
   Sure! Just updated these 2 fields



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


[GitHub] [airflow] Taragolis commented on a diff in pull request #33822: feat(providers/microsoft): add DefaultAzureCredential support to AzureContainerVolumeHook

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on code in PR #33822:
URL: https://github.com/apache/airflow/pull/33822#discussion_r1307714248


##########
airflow/providers/microsoft/azure/hooks/container_volume.py:
##########
@@ -54,14 +56,22 @@ def _get_field(self, extras, name):
     @staticmethod
     def get_connection_form_widgets() -> dict[str, Any]:
         """Returns connection widgets to add to connection form."""
-        from flask_appbuilder.fieldwidgets import BS3PasswordFieldWidget
+        from flask_appbuilder.fieldwidgets import BS3PasswordFieldWidget, BS3TextFieldWidget
         from flask_babel import lazy_gettext
-        from wtforms import PasswordField
+        from wtforms import PasswordField, StringField
 
         return {
             "connection_string": PasswordField(
                 lazy_gettext("Blob Storage Connection String (optional)"), widget=BS3PasswordFieldWidget()
             ),
+            "subscription_id": StringField(
+                lazy_gettext("Subscription ID (optional)"),
+                widget=BS3TextFieldWidget(),
+            ),
+            "resource_group": StringField(
+                lazy_gettext("Resource group name (optional)"),
+                widget=BS3TextFieldWidget(),
+            ),

Review Comment:
   Would be nice to have information about this extra fields into the documentation 
   
   https://github.com/apache/airflow/blob/b82ce61285f3f4f0c7eccb2c3effaef53c9fb84e/docs/apache-airflow-providers-microsoft-azure/connections/azure_container_volume.rst?plain=1#L60-L64



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


[GitHub] [airflow] potiuk commented on pull request #33822: feat(providers/microsoft): add DefaultAzureCredential support to AzureContainerVolumeHook

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #33822:
URL: https://github.com/apache/airflow/pull/33822#issuecomment-1697308505

   This is because your PR generally changes dependencies and it means that it triggers eager upgrade - which means that we had to resolve and find new set of dependencies that your new dependencies and Airflow in general sees as consistent set of dependencies.
   
   Generally follow the advice and attempt to fix it:
   
   ![image](https://github.com/apache/airflow/assets/595491/781911ed-4977-4c2c-9a39-363db512d582)
   
   The thing is that another dependency that is being upgraded adds extra information or changes the definition of the other thing that causes mypy to see it as an issue.
   
   The best way to fix it is to figure out how to fix it and submit a separate PR to fix it and then rebase your PR. Or you can wait until someone else fixes it. This what happens now with main builds (canary builds) - see here:
   
   https://github.com/apache/airflow/actions/runs/6011017073/job/16304198261
   
   Whoever fixes it - fixes it for the other as well. The fastest way to deal with it is to fix it yourself.
   


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


[GitHub] [airflow] potiuk commented on pull request #33822: feat(providers/microsoft): add DefaultAzureCredential support to AzureContainerVolumeHook

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #33822:
URL: https://github.com/apache/airflow/pull/33822#issuecomment-1697328970

   Looks like @Taragolis was the first one to fix it https://github.com/apache/airflow/pull/33881


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


[GitHub] [airflow] Lee-W commented on pull request #33822: feat(providers/microsoft): add DefaultAzureCredential support to AzureContainerVolumeHook

Posted by "Lee-W (via GitHub)" <gi...@apache.org>.
Lee-W commented on PR #33822:
URL: https://github.com/apache/airflow/pull/33822#issuecomment-1697159968

   There's a mypy error on `airflow/providers/amazon/aws/hooks/appflow.py:27`, which is not changed in this PR. Is there I can do for fixing this?


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