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/27 15:14:40 UTC

[GitHub] [airflow] josh-fell commented on a diff in pull request #23263: `CloudBuildCreateBuildOperator`: Remove deprecated `body` parameter

josh-fell commented on code in PR #23263:
URL: https://github.com/apache/airflow/pull/23263#discussion_r859921620


##########
airflow/providers/google/cloud/operators/cloud_build.py:
##########
@@ -113,10 +112,9 @@ class CloudBuildCreateBuildOperator(BaseOperator):
         For more information on how to use this operator, take a look at the guide:
         :ref:`howto/operator:CloudBuildCreateBuildOperator`
 
-    :param build: Optional, the build resource to create. If a dict is provided, it must be of
+    :param build: The build resource to create. If a dict is provided, it must be of
         the same form as the protobuf message `google.cloud.devtools.cloudbuild_v1.types.Build`.
         Only either build or body should be passed.
-    :param body: (Deprecated) The build resource to create.
         This parameter has been deprecated. You should pass the build parameter instead.

Review Comment:
   ```suggestion
   ```
   Same here.



##########
airflow/providers/google/cloud/operators/cloud_build.py:
##########
@@ -144,8 +142,7 @@ class CloudBuildCreateBuildOperator(BaseOperator):
     def __init__(
         self,
         *,
-        build: Optional[Union[Dict, Build]] = None,
-        body: Optional[Dict] = None,

Review Comment:
   `body` should be removed from `template_fields` as well.



##########
airflow/providers/google/cloud/operators/cloud_build.py:
##########
@@ -113,10 +112,9 @@ class CloudBuildCreateBuildOperator(BaseOperator):
         For more information on how to use this operator, take a look at the guide:
         :ref:`howto/operator:CloudBuildCreateBuildOperator`
 
-    :param build: Optional, the build resource to create. If a dict is provided, it must be of
+    :param build: The build resource to create. If a dict is provided, it must be of
         the same form as the protobuf message `google.cloud.devtools.cloudbuild_v1.types.Build`.
         Only either build or body should be passed.

Review Comment:
   ```suggestion
   ```
   Seems unnecessary now. WDYT?



##########
airflow/providers/google/cloud/operators/cloud_build.py:
##########
@@ -113,10 +112,9 @@ class CloudBuildCreateBuildOperator(BaseOperator):
         For more information on how to use this operator, take a look at the guide:
         :ref:`howto/operator:CloudBuildCreateBuildOperator`
 
-    :param build: Optional, the build resource to create. If a dict is provided, it must be of
+    :param build: The build resource to create. If a dict is provided, it must be of

Review Comment:
   Looking the `prepare_template()` method, it seems like this value could be also be a path to YAML or JSON file. Is it worth including that in the parameter description too?



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