sundeep8967 commented on PR #72286:
URL: https://github.com/apache/airflow/pull/72286#issuecomment-5719764500

   Thanks for the review @shahar1!
   
   You are completely right regarding backward compatibility. I have updated 
the implementation:
   1. Preserved `get_records` as a synchronous method with an 
`AirflowProviderDeprecationWarning` pointing callers to `aget_records` so 
external sync callers do not break.
   2. Introduced native `async def aget_records` following Airflow's standard 
async naming convention.
   3. Added `yield_frequency: int = 1000` parameter (can be set to `0` to 
disable yielding) so the batch size is configurable rather than a magic number.
   4. Updated Google BigQuery triggers to call `await hook.aget_records(...)`.
   5. Added unit tests for the deprecation warning on `get_records`, output 
parity on `aget_records`, and verified the `asyncio.sleep(0)` yield counts 
using `AsyncMock`.


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