bingqin2 opened a new pull request, #72570: URL: https://github.com/apache/airflow/pull/72570
While adding the missing unit tests for `StepFunctionsExecutionCompleteTrigger` (it was listed in `OVERLOOKED_TESTS` in `test_project_structure.py`), the hook-propagation test failed: the trigger takes `region_name`, but only puts it into `serialized_fields` and never passes it to `AwsBaseWaiterTrigger.__init__`, so `self.region_name` stays `None` and `hook()` builds the `StepFunctionHook` without a region. The trigger has done this since it was introduced in #32563. In practice `StepFunctionStartExecutionOperator(deferrable=True)` forwards `region_name` to the trigger, but the triggerer still polls in the boto3 default region. This is the trigger-side variant of the hand-off problem described in #72144. Every other Amazon waiter trigger passes `region_name` through to the base class (`eks.py` does both), so the fix does the same here and drops it from `serialized_fields`, because the base class already serializes `region_name` when it is set. **Changes** - `triggers/step_function.py`: pass `region_name` to the base class instead of only serializing it; document the parameter - `tests/unit/amazon/aws/triggers/test_step_function.py` (new): serialization with and without `verify`/`botocore_config`, hook parameter propagation, and `run()` success and failure events, following the existing Batch and OpenSearch Serverless trigger tests - `test_project_structure.py`: remove the module from `OVERLOOKED_TESTS` **Testing** - `providers/amazon`: `tests/unit/amazon/aws/triggers/test_step_function.py`, `tests/unit/amazon/aws/triggers/test_serialization.py`, `tests/unit/amazon/aws/operators/test_step_function.py` - `airflow-core`: `tests/unit/always/test_project_structure.py` - prek hooks on the changed files related: #72144 --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes (please specify the tool below) Generated-by: Claude Code (Claude Fable 5.1) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions). I reviewed and understand all changes; the tests were run locally as listed above. --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
