shahar1 commented on code in PR #69853:
URL: https://github.com/apache/airflow/pull/69853#discussion_r3603760948


##########
airflow-core/newsfragments/69853.feature.rst:
##########
@@ -0,0 +1 @@
+Add deferrable support for CloudFunctionInvokeFunctionOperator to invoke 
Google Cloud Functions asynchronously without blocking workers.

Review Comment:
   Please remove this file - we don't use newsfragments in providers



##########
providers/google/src/airflow/providers/google/cloud/operators/functions.py:
##########
@@ -474,12 +481,48 @@ def extra_links_params(self) -> dict[str, Any]:
             "function_name": self.function_id,
         }
 
+    def execute_complete(self, context: Context, event: dict):

Review Comment:
   Please add type annotation for returned value



##########
providers/google/src/airflow/providers/google/cloud/operators/functions.py:
##########
@@ -474,12 +481,48 @@ def extra_links_params(self) -> dict[str, Any]:
             "function_name": self.function_id,
         }
 
+    def execute_complete(self, context: Context, event: dict):
+        """Handle trigger completion and process the result."""
+        if event["status"] == "error":
+            raise AirflowException(event["message"])

Review Comment:
   Please use a native Python/custom exception instead



##########
providers/google/src/airflow/providers/google/cloud/operators/functions.py:
##########
@@ -25,13 +25,17 @@
 
 from googleapiclient.errors import HttpError
 
+from airflow.configuration import conf

Review Comment:
   Provider code must import via compat SDK



##########
providers/google/src/airflow/providers/google/get_provider_info.py:
##########
@@ -1100,6 +1100,10 @@ def get_provider_info():
                 "integration-name": "Google Cloud Build",
                 "python-modules": 
["airflow.providers.google.cloud.triggers.cloud_build"],
             },
+            {
+                "integration-name": "Google Cloud Functions",
+                "python-modules": 
["airflow.providers.google.cloud.triggers.cloud_functions"],
+            },

Review Comment:
   This file shouldn't be changed manually - it seems as not in sync with 
pre-commit hook (let the pre-commit make the modification for you, if necessary)



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to