Repository navigation
Preserve AWS waiter outcomes in trigger events - #72455
Merged
Merged
Conversation
… exhaustion, and allow AWS triggers to customize exception-to-event translation without reimplementing the shared waiter lifecycle.
SameerMesiah97
force-pushed
the
AWS-Trigger-Extension
branch
from
September 3, 2026 16:03
aac4b81 to
2e7417b
Compare
SameerMesiah97
marked this pull request as ready for review
September 3, 2026 20:19
vincbeck
approved these changes
Sep 4, 2026
1 task done
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This change introduces dedicated exceptions for terminal waiter failures and max-attempt exhaustion in the shared AWS waiter utilities.
Both
waitandasync_waitnow preserve these outcomes throughWaiterTerminalFailureandWaiterMaxAttemptsError, while retaining the existingAirflowExceptionhierarchy and existing handling for AWS API errors.WaiterTerminalFailurealso preserves the waiter's last response so consumers can interpret service-specific terminal states.AwsBaseWaiterTriggernow provides an overridable exception-to-event translation method, allowing individual AWS triggers to expose more specific trigger outcomes without reimplementing the shared polling, retry, throttling, credential, and timeout handling.Rationale
AWS triggers may need to distinguish between different waiter outcomes while still relying on the shared and well-tested waiter lifecycle. Previously,
AwsBaseWaiterTriggerflattened all waiter failures into a generic error event, requiring triggers that need richer state information to take ownership of the polling loop.Preserving structured waiter outcomes and providing an explicit translation extension point keeps lifecycle handling centralized while allowing service-specific triggers to interpret terminal states where necessary.
Tests
AwsBaseWaiterTrigger.Backwards Compatibility
The new waiter exceptions subclass
AirflowException, so existing callers handlingAirflowExceptioncontinue to work. The defaultAwsBaseWaiterTriggerbehavior remains unchanged, with unsuccessful waiter outcomes emitted as generic error events unless a trigger explicitly overrides the translation behavior.Was generative AI tooling used to co-author this PR?
Generated-by: [GPT 5.6] following the guidelines