Skip to content

Preserve OpenSearch Serverless hook configuration when deferring - #72472

Merged
potiuk merged 3 commits into
apache:mainfrom
LE0-Lin:fix/opensearch-serverless-trigger-config
Sep 20, 2026
Merged

potiuk merged 3 commits into
apache:mainfrom
LE0-Lin:fix/opensearch-serverless-trigger-config

Conversation

@LE0-Lin

@LE0-Lin LE0-Lin commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Closes: #72280

This preserves the AWS hook configuration when OpenSearchServerlessCollectionActiveSensor switches to its deferrable trigger.

The change:

  • forwards region_name, verify, and botocore_config from the sensor to the trigger;
  • carries those values through AwsBaseWaiterTrigger serialization;
  • uses them when constructing OpenSearchServerlessHook;
  • adds regression coverage for the sensor defer payload, hook construction, and serialization/reconstruction with both collection ID and collection name.

Local validation:

  • Ruff formatting and linting pass for all four changed files.
  • The trigger constructor/serialization consistency check passes.
  • The targeted Breeze tests could not start because Docker Desktop failed to initialize on this Windows host; the same targeted tests are covered by this PR's Linux CI.

Was generative AI tooling used to co-author this PR?
  • Yes (OpenAI Codex)

OpenAI Codex was used for limited implementation and testing assistance. All changes were reviewed and validated by me.

@LE0-Lin
LE0-Lin requested a review from o-nikolas as a code owner September 3, 2026 10:20
@boring-cyborg boring-cyborg Bot added area:providers provider:amazon AWS/Amazon - related issues labels Sep 3, 2026

@SameerMesiah97 SameerMesiah97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one minor comment. Looks good otherwise.

@o-nikolas o-nikolas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the face of #72171 not being done yet, this looks good to me.

@potiuk potiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 autospec nit 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.

@potiuk
potiuk force-pushed the fix/opensearch-serverless-trigger-config branch from e759ea9 to abe6d65 Compare September 20, 2026 14:23
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
@potiuk
potiuk merged commit 0a41e28 into apache:main Sep 20, 2026
83 checks passed
kaxil added a commit that referenced this pull request Sep 21, 2026
…tion test (#73502)

#72472 made the OpenSearch Serverless sensor pass its hook configuration to
the trigger, and #72171 then merged with an allowlist that still marked those
call sites as pending. The test asserts that every allowlist entry is still
needed, so main fails until the two entries go.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Forward hook config to OpenSearchServerlessCollectionActiveTrigger

5 participants