SEPURI-SAI-KRISHNA commented on issue #73658:
URL: https://github.com/apache/airflow/issues/73658#issuecomment-5818575415

   Tested `apache-airflow-providers-amazon==9.37.0rc1` for [Build deferred AWS 
hooks from the operator's own settings 
(#72171)](https://github.com/apache/airflow/pull/72171). Works as expected, no 
regressions found.
   
   Environment: clean virtualenv on Python 3.11, installed from PyPI, 
`apache-airflow` 3.3.2, `apache-airflow-task-sdk` 1.3.2, `boto3` 1.43.101. No 
AWS account involved, since everything below is observable before the first API 
call.
   
   I ran the same checks against `9.36.0` to confirm they actually depend on 
this change rather than passing either way.
   
   **1. The operator's settings reach the hook the triggerer builds.** Using 
`BedrockKnowledgeBaseActiveSensor` in deferrable mode with 
`region_name="eu-west-3"`, `verify=False` and 
`botocore_config=Config(read_timeout=77, retries={"max_attempts": 9})`, I 
captured the `TaskDeferred` and built the hook from the trigger it carried.
   
   | | 9.36.0 | 9.37.0rc1 |
   | --- | --- | --- |
   | `region_name` on the trigger | absent | `eu-west-3` |
   | `verify` on the trigger | absent | `False` |
   | `botocore_config` on the trigger | absent | passed through |
   | `hook.region_name` | `None` | `eu-west-3` |
   | `hook._verify` | `None` | `False` |
   | `hook._config.read_timeout` | `None` | `77` |
   | `hook._config.retries` | `None` | `{'max_attempts': 9}` |
   
   On `9.36.0` the operator is configured for `eu-west-3` with a custom timeout 
and the deferred half still talks to AWS with boto3 defaults. On the release 
candidate it does not.
   
   **2. The same holds across the provider, not just that one sensor.** I 
walked every `self.defer(trigger=...)` site in the installed wheel and 
confirmed that the deferrals this change covers now hand `region_name`, 
`verify` and `botocore_config` to the trigger. The identical sweep against 
`9.36.0` shows those same sites passing none of them, so the change is load 
bearing and consistent rather than limited to the paths with unit tests.
   
   **3. The import time guard on `AwsBaseWaiterTrigger` is live.** A subclass 
that declares neither `aws_hook_class` nor its own `hook()` is rejected at 
class creation with `Class attribute 'NoHook.aws_hook_class' should be set, or 
NoHook.hook() overridden.`, and one whose `aws_hook_class` is not an 
`AwsGenericHook` subclass is rejected as well. Subclasses that declare either 
are accepted. A trigger that cannot build a hook therefore fails where it is 
defined rather than later in the triggerer, out of sight of the task that 
deferred.
   
   ---
   Drafted-by: Claude Opus 5; reviewed by @SEPURI-SAI-KRISHNA before posting
   


-- 
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]

Reply via email to