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


##########
airflow/providers/google/cloud/operators/translate_speech.py:
##########
@@ -169,7 +169,14 @@ def execute(self, context: Context) -> dict:
             raise AirflowException(
                 f"Wrong response '{recognize_dict}' returned - it should 
contain {key} field"
             )
-
+        if self.audio.uri:
+            FileDetailsLink.persist(
+                context=context,
+                task_instance=self,
+                # Slice from: "gs://{BUCKET_NAME}/{FILE_NAME}" to: 
"{BUCKET_NAME}/{FILE_NAME}"
+                uri=self.audio.uri[5:],
+                project_id=self.project_id or translate_hook.project_id,
+            )

Review Comment:
   Could you please tests for the case that `not self.audio.uri`? (i.e., 
`FileDetailsLink.persist.assert_not_called()`)



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