Use the configured region for deferred Neptune cluster tasks - #71646
Open
SEPURI-SAI-KRISHNA wants to merge 1 commit into
Open
Use the configured region for deferred Neptune cluster tasks#71646SEPURI-SAI-KRISHNA wants to merge 1 commit into
SEPURI-SAI-KRISHNA wants to merge 1 commit into
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.
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.
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