You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/04/19 06:14:19 UTC

[GitHub] [airflow] mai-nakagawa opened a new pull request, #23070: Add `endpoint_id` arg to `google.cloud.operators.vertex_ai.CreateEndpointOperator`

mai-nakagawa opened a new pull request, #23070:
URL: https://github.com/apache/airflow/pull/23070

   <!--
   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 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/
   -->
   
   ---
   **^ 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 change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+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 [UPDATING.md](https://github.com/apache/airflow/blob/main/UPDATING.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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] lwyszomi commented on a diff in pull request #23070: Add `endpoint_id` arg to `vertex_ai.CreateEndpointOperator`

Posted by GitBox <gi...@apache.org>.
lwyszomi commented on code in PR #23070:
URL: https://github.com/apache/airflow/pull/23070#discussion_r853767694


##########
airflow/providers/google/cloud/operators/vertex_ai/endpoint_service.py:
##########
@@ -55,6 +55,7 @@ class CreateEndpointOperator(BaseOperator):
     :param project_id: Required. The ID of the Google Cloud project that the service belongs to.
     :param region: Required. The ID of the Google Cloud region that the service belongs to.
     :param endpoint: Required. The Endpoint to create.
+    :param endpoint_id: The ID of Endpoint. If not provided, Vertex AI will generate a value for this ID.

Review Comment:
   same here



##########
airflow/providers/google/cloud/hooks/vertex_ai/endpoint_service.py:
##########
@@ -91,6 +92,7 @@ def create_endpoint(
         :param project_id: Required. The ID of the Google Cloud project that the service belongs to.
         :param region: Required. The ID of the Google Cloud region that the service belongs to.
         :param endpoint: Required. The Endpoint to create.
+        :param endpoint_id: The ID of Endpoint. If not provided, Vertex AI will generate a value for this ID.

Review Comment:
   Maybe we should add info about the format of this param? 



-- 
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 merged pull request #23070: Add `endpoint_id` arg to `vertex_ai.CreateEndpointOperator`

Posted by GitBox <gi...@apache.org>.
potiuk merged PR #23070:
URL: https://github.com/apache/airflow/pull/23070


-- 
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] mai-nakagawa commented on a diff in pull request #23070: Add `endpoint_id` arg to `vertex_ai.CreateEndpointOperator`

Posted by GitBox <gi...@apache.org>.
mai-nakagawa commented on code in PR #23070:
URL: https://github.com/apache/airflow/pull/23070#discussion_r853643241


##########
airflow/providers/google/cloud/operators/vertex_ai/endpoint_service.py:
##########
@@ -81,6 +81,7 @@ def __init__(
         region: str,
         project_id: str,
         endpoint: Union[Endpoint, Dict],
+        endpoint_id: Optional[str] = None,

Review Comment:
   Thanks for your review! Added the new param to the docstring: https://github.com/apache/airflow/pull/23070/commits/60bc79439a060e5148670b74046a075ab61c23ad



-- 
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] mai-nakagawa commented on a diff in pull request #23070: Add `endpoint_id` arg to `vertex_ai.CreateEndpointOperator`

Posted by GitBox <gi...@apache.org>.
mai-nakagawa commented on code in PR #23070:
URL: https://github.com/apache/airflow/pull/23070#discussion_r853817977


##########
airflow/providers/google/cloud/hooks/vertex_ai/endpoint_service.py:
##########
@@ -91,6 +92,7 @@ def create_endpoint(
         :param project_id: Required. The ID of the Google Cloud project that the service belongs to.
         :param region: Required. The ID of the Google Cloud region that the service belongs to.
         :param endpoint: Required. The Endpoint to create.
+        :param endpoint_id: The ID of Endpoint. If not provided, Vertex AI will generate a value for this ID.

Review Comment:
   Agree. Added the format by https://github.com/apache/airflow/pull/23070/commits/cc985e22e971454f33906006b57d699e4b1ad931. Thanks!



-- 
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] mai-nakagawa commented on a diff in pull request #23070: Add `endpoint_id` arg to `vertex_ai.CreateEndpointOperator`

Posted by GitBox <gi...@apache.org>.
mai-nakagawa commented on code in PR #23070:
URL: https://github.com/apache/airflow/pull/23070#discussion_r853817977


##########
airflow/providers/google/cloud/hooks/vertex_ai/endpoint_service.py:
##########
@@ -91,6 +92,7 @@ def create_endpoint(
         :param project_id: Required. The ID of the Google Cloud project that the service belongs to.
         :param region: Required. The ID of the Google Cloud region that the service belongs to.
         :param endpoint: Required. The Endpoint to create.
+        :param endpoint_id: The ID of Endpoint. If not provided, Vertex AI will generate a value for this ID.

Review Comment:
   Agree. Add the format by https://github.com/apache/airflow/pull/23070/commits/cc985e22e971454f33906006b57d699e4b1ad931. Thanks!



-- 
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] josh-fell commented on a diff in pull request #23070: Add `endpoint_id` arg to `vertex_ai.CreateEndpointOperator`

Posted by GitBox <gi...@apache.org>.
josh-fell commented on code in PR #23070:
URL: https://github.com/apache/airflow/pull/23070#discussion_r853314329


##########
airflow/providers/google/cloud/operators/vertex_ai/endpoint_service.py:
##########
@@ -81,6 +81,7 @@ def __init__(
         region: str,
         project_id: str,
         endpoint: Union[Endpoint, Dict],
+        endpoint_id: Optional[str] = None,

Review Comment:
   Do you think this new parameter should be added to `template_fields` for the operator? I'm not sure if this would be useful or what kinds of values are typical for `endpoint_id`. Just sharing the idea.



##########
airflow/providers/google/cloud/operators/vertex_ai/endpoint_service.py:
##########
@@ -81,6 +81,7 @@ def __init__(
         region: str,
         project_id: str,
         endpoint: Union[Endpoint, Dict],
+        endpoint_id: Optional[str] = None,

Review Comment:
   Also, this new parameter should be added to the operator's docstring so it can be included in the Python API docs.



-- 
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] mai-nakagawa commented on a diff in pull request #23070: Add `endpoint_id` arg to `vertex_ai.CreateEndpointOperator`

Posted by GitBox <gi...@apache.org>.
mai-nakagawa commented on code in PR #23070:
URL: https://github.com/apache/airflow/pull/23070#discussion_r853647862


##########
airflow/providers/google/cloud/operators/vertex_ai/endpoint_service.py:
##########
@@ -81,6 +81,7 @@ def __init__(
         region: str,
         project_id: str,
         endpoint: Union[Endpoint, Dict],
+        endpoint_id: Optional[str] = None,

Review Comment:
   > Do you think this new parameter should be added to `template_fields` for the operator? I'm not sure if this would be useful or what kinds of values are typical for `endpoint_id`. Just sharing the idea.
   
   Thanks for your suggestion! I don't think `endpoint_id` should be added to `template_fields`. I think the optional param `endpoint_id` is used only when users would like to create a Vertex Endpoint with a specified ID. I don't imagine an use case to specify the ID dynamically 😃 



-- 
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] mai-nakagawa commented on a diff in pull request #23070: Add `endpoint_id` arg to `vertex_ai.CreateEndpointOperator`

Posted by GitBox <gi...@apache.org>.
mai-nakagawa commented on code in PR #23070:
URL: https://github.com/apache/airflow/pull/23070#discussion_r853819551


##########
airflow/providers/google/cloud/hooks/vertex_ai/endpoint_service.py:
##########
@@ -91,6 +92,7 @@ def create_endpoint(
         :param project_id: Required. The ID of the Google Cloud project that the service belongs to.
         :param region: Required. The ID of the Google Cloud region that the service belongs to.
         :param endpoint: Required. The Endpoint to create.
+        :param endpoint_id: The ID of Endpoint. If not provided, Vertex AI will generate a value for this ID.

Review Comment:
   Also updated with valid `TEST_ENDPOINT_ID` value by https://github.com/apache/airflow/pull/23070/commits/58dfa78f1dadf66e6095eff852b5a3557103e88a



-- 
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] mai-nakagawa commented on a diff in pull request #23070: Add `endpoint_id` arg to `vertex_ai.CreateEndpointOperator`

Posted by GitBox <gi...@apache.org>.
mai-nakagawa commented on code in PR #23070:
URL: https://github.com/apache/airflow/pull/23070#discussion_r853818290


##########
airflow/providers/google/cloud/operators/vertex_ai/endpoint_service.py:
##########
@@ -55,6 +55,7 @@ class CreateEndpointOperator(BaseOperator):
     :param project_id: Required. The ID of the Google Cloud project that the service belongs to.
     :param region: Required. The ID of the Google Cloud region that the service belongs to.
     :param endpoint: Required. The Endpoint to create.
+    :param endpoint_id: The ID of Endpoint. If not provided, Vertex AI will generate a value for this ID.

Review Comment:
   ditto: https://github.com/apache/airflow/pull/23070/commits/cc985e22e971454f33906006b57d699e4b1ad931



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