You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "shahar1 (via GitHub)" <gi...@apache.org> on 2026/01/24 13:58:48 UTC
Re: [PR] Make GCP storage transfer trigger wait for job operations [airflow]
shahar1 commented on code in PR #54101:
URL: https://github.com/apache/airflow/pull/54101#discussion_r2724178166
##########
providers/google/src/airflow/providers/google/cloud/triggers/cloud_storage_transfer_service.py:
##########
@@ -112,6 +109,11 @@ async def run(self) -> AsyncIterator[TriggerEvent]:
yield TriggerEvent({"status": "error", "message": str(ex)})
return
+ if not all_operations_found:
+ self.log.info("Not all transfer jobs have associated operations yet. Waiting.")
+ await asyncio.sleep(self.poll_interval)
+ continue
Review Comment:
Could you please add unit test for this block?
##########
providers/google/src/airflow/providers/google/cloud/triggers/cloud_storage_transfer_service.py:
##########
@@ -87,13 +88,9 @@ async def run(self) -> AsyncIterator[TriggerEvent]:
for job, operation in zip(jobs, operations):
if operation is None:
- yield TriggerEvent(
- {
- "status": "error",
- "message": f"Transfer job {job.name} has no latest operation.",
- }
- )
- return
+ self.log.info("Transfer job %s has no latest operation yet, waiting.", job.name)
+ all_operations_found = False
+ continue
Review Comment:
I would also handle timeout internally (even if the API is 100% reliable), because there could be internal connectivity issues, and I want to fail fast with a clear error message rather than silently waiting forever.
--
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