File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
airflow/providers/google/cloud/triggers Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ async def run(self) -> AsyncIterator[TriggerEvent]: # type: ignore[override]
95
95
"message" : "Build completed" ,
96
96
}
97
97
)
98
+ return
98
99
elif cloud_build_instance ._pb .status in (
99
100
Build .Status .WORKING ,
100
101
Build .Status .PENDING ,
@@ -111,14 +112,17 @@ async def run(self) -> AsyncIterator[TriggerEvent]: # type: ignore[override]
111
112
Build .Status .EXPIRED ,
112
113
):
113
114
yield TriggerEvent ({"status" : "error" , "message" : cloud_build_instance .status_detail })
115
+ return
114
116
else :
115
117
yield TriggerEvent (
116
118
{"status" : "error" , "message" : "Unidentified status of Cloud Build instance" }
117
119
)
120
+ return
118
121
119
122
except Exception as e :
120
123
self .log .exception ("Exception occurred while checking for Cloud Build completion" )
121
124
yield TriggerEvent ({"status" : "error" , "message" : str (e )})
125
+ return
122
126
123
127
def _get_async_hook (self ) -> CloudBuildAsyncHook :
124
128
return CloudBuildAsyncHook (gcp_conn_id = self .gcp_conn_id )
You canβt perform that action at this time.
0 commit comments