VladaZakharova commented on code in PR #57861:
URL: https://github.com/apache/airflow/pull/57861#discussion_r2494498643
##########
providers/google/src/airflow/providers/google/cloud/triggers/cloud_run.py:
##########
@@ -116,10 +116,25 @@ async def run(self) -> AsyncIterator[TriggerEvent]:
}
)
else:
+ # Parse the Execution object from operation.response to
get execution details
+ from google.cloud.run_v2.types import Execution
Review Comment:
can you please move this import to the top of the file?
##########
providers/google/src/airflow/providers/google/cloud/triggers/cloud_run.py:
##########
@@ -116,10 +116,25 @@ async def run(self) -> AsyncIterator[TriggerEvent]:
}
)
else:
+ # Parse the Execution object from operation.response to
get execution details
+ from google.cloud.run_v2.types import Execution
+
+ execution = Execution()
+ if not operation.response.Unpack(execution):
+ error_msg = (
+ f"Failed to unpack Execution from operation
response. "
+ f"Operation: {self.operation_name}, Job:
{self.job_name}"
+ )
+ self.log.error(error_msg)
Review Comment:
I am not sure we need to output this error twice: in logs and in raised
exception. you can leave only one
--
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]