Repository navigation
Preserve OpenSearch Serverless hook configuration when deferring - #72472
Conversation
SameerMesiah97
left a comment
There was a problem hiding this comment.
Just one minor comment. Looks good otherwise.
potiuk
left a comment
There was a problem hiding this comment.
Correct and minimal fix: the three hook-configuration values now survive the sensor → trigger → hook path for OpenSearchServerlessCollectionActiveSensor, and each of the new tests fails without the change.
Verified against the code that AwsBaseWaiterTrigger already stores and serializes region_name/verify/botocore_config, that AwsBaseHook accepts config= as a dict, and that the restructured test_serialization keeps the both_provided_fails case intact in test_both_collection_name_and_id_raise.
Smaller observations
- One optional
autospecnit inline; I'll push a fixup for it so this can merge without another round-trip. - Not for this PR: the same
return XHook(aws_conn_id=self.aws_conn_id)pattern is still present in the Bedrock, Comprehend, Glue Data Quality and EMR waiter triggers; a follow-up sweep would close the class of bug that #72280 reported.
This review was drafted by an AI-assisted tool and
confirmed by an Apache Airflow maintainer. The maintainer
approving this PR has read the findings and signed off. If
something feels off, please reply on the PR and a maintainer
will follow up.More on how Apache Airflow handles maintainer review:
contributing-docs/05_pull_requests.rst.
e759ea9 to
abe6d65
Compare
Review nit: with autospec=True a kwarg-name typo in hook() would fail at the call instead of being swallowed by the mock. Generated-by: Claude Opus 5
Closes: #72280
This preserves the AWS hook configuration when OpenSearchServerlessCollectionActiveSensor switches to its deferrable trigger.
The change:
Local validation:
Was generative AI tooling used to co-author this PR?
OpenAI Codex was used for limited implementation and testing assistance. All changes were reviewed and validated by me.