SHIVANSH-ux-ys opened a new pull request, #72773: URL: https://github.com/apache/airflow/pull/72773
closes: #72769 ### Rationale for this change Fixes #72769. In `AppflowHook.run_flow`, `_log_execution_description` issues a single unpaginated call to `describe_flow_execution_records`. Because `maxResults` defaults to 20 on the AWS AppFlow API, if the execution ID is not present on the first page of results, looking up the execution ID raises a KeyError, failing the task even though AWS AppFlow successfully executed the flow. ### What changes are included in this PR? 1. Updated `AppflowHook._log_execution_description` to loop over paginated `describe_flow_execution_records` calls using `maxResults=100` and `nextToken`. 2. Added fallback logging warning if the execution record is not found across pages, preventing KeyError from crashing a successful flow run. 3. Added unit tests in `test_appflow.py` verifying paginated lookup and missing execution record handling. ### Are these changes tested? Yes. Added unit tests in `providers/amazon/tests/unit/amazon/aws/hooks/test_appflow.py` and verified all 5 tests pass. -- 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]
