Uh oh!
There was an error while loading. Please reload this page.
Use the configured region for deferred Neptune cluster tasks - #71646
Conversation
The triggers accepted a region_name but never handed it to the base trigger that assigns the attribute, and two of the operator defer sites never passed the hook configuration at all. A deferred start or stop therefore polled the default region, and the task failed only after exhausting its waiter attempts with an error that never mentioned the region.
vincbeck
commented
Aug 17, 2026
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
A reviewer asked for the deferred trigger to be checked in full rather than on region alone, so that any future argument silently dropped on the way to the triggerer fails the suite instead of passing unnoticed.
SEPURI-SAI-KRISHNA
commented
Aug 18, 2026
Thanks @ramitkataria, done in both places. The operator test now asserts the whole serialized trigger payload instead of picking out one field: assertdeferred.value.trigger.serialize()[1] == {
"db_cluster_id": CLUSTER_ID,
"aws_conn_id": "aws_default",
"region_name": REGION_NAME,
"verify": VERIFY,
"botocore_config": BOTOCORE_CONFIG,
"waiter_delay": WAITER_DELAY,
"waiter_max_attempts": WAITER_MAX_ATTEMPTS,
}Exact-dict equality rather than a set of individual asserts, so an argument going missing on the way to the triggerer fails the suite, which is exactly the failure mode this PR is about. The same assertion is now in the trigger test across all three trigger classes. One nuance the wider assertions surfaced, worth recording: of the three arguments the operators now forward, only Verified locally: 31 passed with the change, and exactly the 5 new parametrizations fail with it reverted (26 pre-existing tests unaffected either way). Drafted-by: Claude Code (Opus 5); reviewed by @SEPURI-SAI-KRISHNA before posting |
ramitkataria
commented
Aug 18, 2026
Thanks for the addition! |
Uh oh!
There was an error while loading. Please reload this page.
All three Neptune triggers declare a
region_nameparameter, document it, and readself.region_namewhen building their hook — but never forward it toAwsBaseWaiterTrigger.__init__, which is what actually assigns the attribute:Because
region_nameis an explicit named parameter it is not swept up by the**kwargsforwarding either — it is captured and discarded, so
self.region_nameis alwaysNoneand the deferred waiter polls the account's default region.
The failure is quiet and slow: the waiter simply never finds the cluster in the region it
is looking at, so the task burns through
waiter_max_attemptsand then fails with amessage that does not mention regions at all.
AwsBaseWaiterTrigger.serialize()writesself.region_name, so the wrong value also survives triggerer restarts.There is a second, independent layer in the operators. Two of the four defer sites already
pass the hook configuration; the two in
NeptuneStartDbClusterOperator.executeandNeptuneStopDbClusterOperator.executepass none of it, so fixing only the triggers wouldstill leave those paths on the default region. Both are brought in line with the existing
sites, which is why
verifyandbotocore_configare included alongsideregion_name.Affects
NeptuneClusterAvailableTrigger,NeptuneClusterStoppedTriggerandNeptuneClusterInstancesAvailableTrigger.Tests cover both layers — that the triggers retain and serialize
region_name, and thatthe operators hand it to the trigger they defer with. All five fail without the change.
No newsfragment: this is a provider change, and provider changelogs are regenerated from
git logby the release manager.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5) following the guidelines