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/05/30 03:44:01 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #23248: Push Cloud Function response to xcom

uranusjr commented on code in PR #23248:
URL: https://github.com/apache/airflow/pull/23248#discussion_r884397081


##########
airflow/providers/google/cloud/operators/functions.py:
##########
@@ -459,4 +459,8 @@ def execute(self, context: 'Context'):
         )
         self.log.info('Function called successfully. Execution id %s', result.get('executionId'))
         self.xcom_push(context=context, key='execution_id', value=result.get('executionId'))
+
+        # HTTP function returns a JSON response, making it available in xcom
+        if 'result' in result:
+            self.xcom_push(context=context, key='function_response', value=result.get('result'))

Review Comment:
   ```suggestion
               self.xcom_push(context=context, key='function_response', value=result['result'])
   ```



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