SIGN IN SIGN UP
apache / airflow UNCLAIMED

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows

0 0 267 Python

Fix Cloud Run deferrable trigger handling of transient 503 (#67219)

The CloudRunJobFinishedTrigger polls the long-running operation via
CloudRunAsyncHook.get_operation in its loop. When that gRPC call fails
with a transient 503 ServiceUnavailable — typical of a regional Cloud
Run API blip while the underlying job is still progressing — the
exception propagates out of the trigger, the triggerer logs the
failure, and the deferred task is failed with TaskDeferralError. The
worker's task-level retry then re-runs the operator from scratch,
which re-submits a brand new Cloud Run execution rather than waiting
on the in-flight one.

Catch ServiceUnavailable inside the polling loop, log a warning, sleep
polling_period_seconds, and continue — mirroring the equivalent fix in
DataflowJobStatusTrigger (#66293). Other exceptions still propagate so
Airflow's task-level retry can take over for genuinely terminal
errors.

Tests cover the new retry behavior (one ServiceUnavailable followed
by a successful poll yields the SUCCESS TriggerEvent) and lock in
that unexpected exceptions are not silently swallowed.

Signed-off-by: Akshet Pandey <argetlam.akshet@gmail.com>
A
Akshet Pandey committed
29ac7c07269cc32ca74c11604f645b441ebeba2e
Parent: 03c71e5
Committed by GitHub <noreply@github.com> on 5/30/2026, 5:57:12 AM