You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "AMOOOMA (via GitHub)" <gi...@apache.org> on 2026/04/21 18:17:18 UTC

[PR] Add option to use asyncio for AsyncWrapper [beam]

AMOOOMA opened a new pull request, #38262:
URL: https://github.com/apache/beam/pull/38262

   Add option to use asyncio for AsyncWrapper to increase parallelism remote RPC calls.
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
   
    - [ ] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment `fixes #<ISSUE NUMBER>` instead.
    - [ ] Update `CHANGES.md` with noteworthy changes.
    - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://github.com/apache/beam/blob/master/CONTRIBUTING.md#make-the-reviewers-job-easier).
   
   To check the build health, please visit [https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
   
   GitHub Actions Tests Status (on master branch)
   ------------------------------------------------------------------------------------------------
   [![Build python source distribution and wheels](https://github.com/apache/beam/actions/workflows/build_wheels.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
   [![Python tests](https://github.com/apache/beam/actions/workflows/python_tests.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Java tests](https://github.com/apache/beam/actions/workflows/java_tests.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Go tests](https://github.com/apache/beam/actions/workflows/go_tests.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Go+tests%22+branch%3Amaster+event%3Aschedule)
   
   See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI or the [workflows README](https://github.com/apache/beam/blob/master/.github/workflows/README.md) to see a list of phrases to trigger workflows.
   


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add option to use asyncio for AsyncWrapper [beam]

Posted by "AMOOOMA (via GitHub)" <gi...@apache.org>.
AMOOOMA commented on code in PR #38262:
URL: https://github.com/apache/beam/pull/38262#discussion_r3157227855


##########
sdks/python/apache_beam/transforms/async_dofn.py:
##########
@@ -104,6 +113,8 @@ def __init__(
         schedule an item.  Used in testing to ensure timeouts are met.
       id_fn: A function that returns a hashable object from an element. This
         will be used to track items instead of the element's default hash.
+      use_asyncio: If true, use asyncio and coroutines to process items. If
+        false, use ThreadPoolExecutor.

Review Comment:
   I think mostly in cases of where we want to run CPU intensive work on threads the default will be better since we only have 1 main event loop in async mode. But yeah definitely would need to add some more info. Done.



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add option to use asyncio for AsyncWrapper [beam]

Posted by "damccorm (via GitHub)" <gi...@apache.org>.
damccorm commented on PR #38262:
URL: https://github.com/apache/beam/pull/38262#issuecomment-4338990560

   /gemini review


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add option to use asyncio for AsyncWrapper [beam]

Posted by "damccorm (via GitHub)" <gi...@apache.org>.
damccorm commented on code in PR #38262:
URL: https://github.com/apache/beam/pull/38262#discussion_r3157051308


##########
sdks/python/apache_beam/transforms/async_dofn.py:
##########
@@ -190,6 +228,52 @@ def sync_fn_process(self, element, *args, **kwargs):
 
     return to_return
 
+  async def async_fn_process(self, element, *args, **kwargs):
+    """Makes the call to the wrapped dofn's start_bundle, process
+    and finish_bundle methods for asynchronous DoFns.
+
+    Args:
+      element: The element to process.
+      *args: Any additional arguments to pass to the wrapped dofn's process
+        method.
+      **kwargs: Any additional keyword arguments to pass to the wrapped dofn's
+        process method.
+
+    Returns:
+      A list of elements produced by the input element.
+    """
+    self._sync_fn.start_bundle()
+    process_result = self._sync_fn.process(element, *args, **kwargs)
+    bundle_result = self._sync_fn.finish_bundle()
+
+    if not process_result:

Review Comment:
   Optional nit: thoughts on wrapping this in a small local function so that we just need to call something like:
   
   ```
   process_result = gather_async_results(process_result)
   bundle_result = gather_async_results(bundle_result)
   ```



##########
sdks/python/apache_beam/transforms/async_dofn.py:
##########
@@ -190,6 +228,52 @@ def sync_fn_process(self, element, *args, **kwargs):
 
     return to_return
 
+  async def async_fn_process(self, element, *args, **kwargs):
+    """Makes the call to the wrapped dofn's start_bundle, process
+    and finish_bundle methods for asynchronous DoFns.
+
+    Args:
+      element: The element to process.
+      *args: Any additional arguments to pass to the wrapped dofn's process
+        method.
+      **kwargs: Any additional keyword arguments to pass to the wrapped dofn's
+        process method.
+
+    Returns:
+      A list of elements produced by the input element.
+    """
+    self._sync_fn.start_bundle()
+    process_result = self._sync_fn.process(element, *args, **kwargs)
+    bundle_result = self._sync_fn.finish_bundle()
+
+    if not process_result:
+      process_result = []
+    elif isinstance(process_result, AsyncIterable):
+      temp = []
+      async for item in process_result:
+        temp.append(item)
+      process_result = temp
+    elif not isinstance(process_result, (GeneratorType, Iterable)):
+      process_result = [process_result]
+
+    if not bundle_result:
+      bundle_result = []
+    elif isinstance(bundle_result, AsyncIterable):
+      temp = []
+      async for item in bundle_result:
+        temp.append(item)
+      bundle_result = temp
+    elif not isinstance(bundle_result, (GeneratorType, Iterable)):
+      bundle_result = [bundle_result]
+
+    to_return = []
+    for x in process_result:
+      to_return.append(x)
+    for x in bundle_result:
+      to_return.append(x)
+
+    return to_return

Review Comment:
   Nit, this can be simplified since both of these are lists:
   
   ```suggestion
       return process_result + bundle_result
   ```



##########
sdks/python/apache_beam/transforms/async_dofn.py:
##########
@@ -104,6 +113,8 @@ def __init__(
         schedule an item.  Used in testing to ensure timeouts are met.
       id_fn: A function that returns a hashable object from an element. This
         will be used to track items instead of the element's default hash.
+      use_asyncio: If true, use asyncio and coroutines to process items. If
+        false, use ThreadPoolExecutor.

Review Comment:
   Regardless, this doc should have info on why a user would choose one vs the other (or if its almost always one then we should just make this a kwarg)



##########
sdks/python/apache_beam/transforms/async_dofn_test.py:
##########
@@ -86,7 +86,9 @@ def set(self, time):
     self.time = time
 
 
-class AsyncTest(unittest.TestCase):
+class _AsyncTestBase:

Review Comment:
   https://stackoverflow.com/questions/38729007/parametrize-class-tests-with-pytest is probably the more pythonic way to do this



##########
sdks/python/apache_beam/transforms/async_dofn.py:
##########
@@ -104,6 +113,8 @@ def __init__(
         schedule an item.  Used in testing to ensure timeouts are met.
       id_fn: A function that returns a hashable object from an element. This
         will be used to track items instead of the element's default hash.
+      use_asyncio: If true, use asyncio and coroutines to process items. If
+        false, use ThreadPoolExecutor.

Review Comment:
   In our tests, has asyncio generally performed better? Are there reasons to default it off?



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add option to use asyncio for AsyncWrapper [beam]

Posted by "gemini-code-assist[bot] (via GitHub)" <gi...@apache.org>.
gemini-code-assist[bot] commented on code in PR #38262:
URL: https://github.com/apache/beam/pull/38262#discussion_r3157175725


##########
sdks/python/apache_beam/transforms/async_dofn.py:
##########
@@ -126,8 +138,28 @@ def __init__(
   def initialize_pool(parallelism):
     return lambda: ThreadPoolExecutor(max_workers=parallelism)
 
+  @staticmethod
+  def _run_event_loop():
+    """Sets up and runs the asyncio event loop in a background thread."""
+    loop = asyncio.new_event_loop()
+    asyncio.set_event_loop(loop)
+    AsyncWrapper._event_loop = loop
+    AsyncWrapper._loop_started.set()
+    loop.run_forever()
+    loop.close()
+
   @staticmethod
   def reset_state():
+    if AsyncWrapper._event_loop:
+      AsyncWrapper._event_loop.call_soon_threadsafe(
+          AsyncWrapper._event_loop.stop)
+    if AsyncWrapper._event_loop_thread:
+      AsyncWrapper._event_loop_thread.join()
+
+    AsyncWrapper._event_loop = None
+    AsyncWrapper._event_loop_thread = None
+    AsyncWrapper._loop_started.clear()
+
     for pool in AsyncWrapper._pool.values():
       pool.acquire(AsyncWrapper.initialize_pool(1)).shutdown(
           wait=True, cancel_futures=True)

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   The `reset_state` method modifies and accesses class-level variables (`_event_loop`, `_event_loop_thread`, `_loop_started`) that are also used in the `setup` method. To prevent race conditions, especially in multi-threaded environments or during test execution, this method should acquire `AsyncWrapper._lock` before modifying these shared resources.
   
   ```suggestion
     @staticmethod
     def reset_state():
       with AsyncWrapper._lock:
         if AsyncWrapper._event_loop:
           AsyncWrapper._event_loop.call_soon_threadsafe(
               AsyncWrapper._event_loop.stop)
         if AsyncWrapper._event_loop_thread:
           AsyncWrapper._event_loop_thread.join()
   
         AsyncWrapper._event_loop = None
         AsyncWrapper._event_loop_thread = None
         AsyncWrapper._loop_started.clear()
   
         for pool in AsyncWrapper._pool.values():
           pool.acquire(AsyncWrapper.initialize_pool(1)).shutdown(
               wait=True, cancel_futures=True)
   ```



##########
sdks/python/apache_beam/transforms/async_dofn.py:
##########
@@ -190,6 +228,52 @@ def sync_fn_process(self, element, *args, **kwargs):
 
     return to_return
 
+  async def async_fn_process(self, element, *args, **kwargs):
+    """Makes the call to the wrapped dofn's start_bundle, process
+    and finish_bundle methods for asynchronous DoFns.
+
+    Args:
+      element: The element to process.
+      *args: Any additional arguments to pass to the wrapped dofn's process
+        method.
+      **kwargs: Any additional keyword arguments to pass to the wrapped dofn's
+        process method.
+
+    Returns:
+      A list of elements produced by the input element.
+    """
+    self._sync_fn.start_bundle()
+    process_result = self._sync_fn.process(element, *args, **kwargs)
+    bundle_result = self._sync_fn.finish_bundle()
+
+    if not process_result:
+      process_result = []
+    elif isinstance(process_result, AsyncIterable):
+      temp = []
+      async for item in process_result:
+        temp.append(item)
+      process_result = temp
+    elif not isinstance(process_result, (GeneratorType, Iterable)):
+      process_result = [process_result]
+
+    if not bundle_result:
+      bundle_result = []
+    elif isinstance(bundle_result, AsyncIterable):
+      temp = []
+      async for item in bundle_result:
+        temp.append(item)
+      bundle_result = temp
+    elif not isinstance(bundle_result, (GeneratorType, Iterable)):
+      bundle_result = [bundle_result]
+
+    to_return = []
+    for x in process_result:
+      to_return.append(x)
+    for x in bundle_result:
+      to_return.append(x)
+
+    return to_return

Review Comment:
   ![high](https://www.gstatic.com/codereviewagent/high-priority.svg)
   
   The current implementation of `async_fn_process` has two significant issues:
   
   1. **Missing `await` for Coroutines**: If the wrapped DoFn methods (`process`, `finish_bundle`) are defined as `async def`, they return coroutine objects. These are currently not being awaited, meaning the coroutines themselves (rather than their results) will be returned, which is incorrect.
   2. **Blocking the Event Loop**: If the wrapped DoFn is synchronous and performs blocking I/O, calling it directly on the event loop thread will block the entire loop, serializing all processing and defeating the purpose of using `asyncio` for parallelism.
   
   The suggested refactoring handles awaitables and async iterables, and simplifies the result collection logic.
   
   ```python
     async def async_fn_process(self, element, *args, **kwargs):
       """Makes the call to the wrapped dofn's start_bundle, process
       and finish_bundle methods for asynchronous DoFns.
   
       Args:
         element: The element to process.
         *args: Any additional arguments to pass to the wrapped dofn's process
           method.
         **kwargs: Any additional keyword arguments to pass to the wrapped dofn's
           process method.
   
       Returns:
         A list of elements produced by the input element.
       """
       async def _collect(result):
         if result is None:
           return []
         if asyncio.iscoroutine(result):
           result = await result
         if isinstance(result, AsyncIterable):
           return [item async for item in result]
         if isinstance(result, (GeneratorType, Iterable)) and not isinstance(
             result, (str, bytes)):
           return list(result)
         return [result]
   
       start_res = self._sync_fn.start_bundle()
       if asyncio.iscoroutine(start_res):
         await start_res
   
       process_result = await _collect(
           self._sync_fn.process(element, *args, **kwargs))
       bundle_result = await _collect(self._sync_fn.finish_bundle())
   
       return process_result + bundle_result
   ```



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add option to use asyncio for AsyncWrapper [beam]

Posted by "gemini-code-assist[bot] (via GitHub)" <gi...@apache.org>.
gemini-code-assist[bot] commented on PR #38262:
URL: https://github.com/apache/beam/pull/38262#issuecomment-4290818022

   ## Summary of Changes
   
   Hello, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
   
   This pull request introduces an optional asyncio-based execution mode for the AsyncWrapper in Apache Beam's Python SDK. By allowing the use of coroutines instead of relying solely on ThreadPoolExecutor, this change aims to enhance the efficiency and parallelism of remote RPC calls within asynchronous DoFns. The implementation includes robust management of a background event loop and comprehensive updates to the test suite to validate the new functionality.
   
   ### Highlights
   
   * **Asyncio Support**: Added an option to use asyncio for AsyncWrapper to improve parallelism for remote RPC calls.
   * **Background Event Loop**: Implemented a background thread to manage the asyncio event loop, ensuring it can be used alongside existing thread-based processing.
   * **Test Coverage**: Updated existing tests to support both ThreadPoolExecutor and asyncio modes, ensuring parity and stability across both execution strategies.
   
   🧠 **New Feature in Public Preview:** You can now enable **Memory** to help **Gemini Code Assist** learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. **Click [here](https://codeassist.google/code-review/login) to enable Memory in your admin console.**
   
   <details>
   <summary><b>Using Gemini Code Assist</b></summary>
   <br>
   
   The full guide for Gemini Code Assist can be found on our [documentation page](https://developers.google.com/gemini-code-assist/docs/review-github-code), here are some quick tips.
   
   <b>Invoking Gemini</b>
   
   You can request assistance from Gemini at any point by creating a comment using either `/gemini <command>` or `@gemini-code-assist <command>`. Below is a summary of the supported commands on the current page.
   
   Feature | Command | Description
   --- | --- | ---
   Code Review | `/gemini review` | Performs a code review for the current pull request in its current state.
   Pull Request Summary | `/gemini summary` | Provides a summary of the current pull request in its current state.
   Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in pull request comments and review comments.
   Help | `/gemini help` | Displays a list of available commands.
   
   <b>Customization</b>
   
   To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a `.gemini/` folder in the base of the repository. Detailed instructions can be found [here](https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github).
   
   <b>Limitations & Feedback</b>
   
   Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up [here](https://google.qualtrics.com/jfe/form/SV_2cyuGuTWsEw84yG).
   </details>
   
   
   [^1]: Review the [Privacy Notices](https://policies.google.com/privacy), [Generative AI Prohibited Use Policy](https://policies.google.com/terms/generative-ai/use-policy), [Terms of Service](https://policies.google.com/terms), and learn how to configure Gemini Code Assist in GitHub [here](https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github). Gemini can make mistakes, so double check it and [use code with caution](https://support.google.com/legal/answer/13505487).
   


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add option to use asyncio for AsyncWrapper [beam]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #38262:
URL: https://github.com/apache/beam/pull/38262#issuecomment-4291539318

   Assigning reviewers:
   
   R: @tvalentyn for label python.
   
   
   Note: If you would like to opt out of this review, comment `assign to next reviewer`.
   
   Available commands:
   - `stop reviewer notifications` - opt out of the automated review tooling
   - `remind me after tests pass` - tag the comment author after tests pass
   - `waiting on author` - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)
   
   The PR bot will only process comments in the main thread (not review comments).


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add option to use asyncio for AsyncWrapper [beam]

Posted by "AMOOOMA (via GitHub)" <gi...@apache.org>.
AMOOOMA commented on code in PR #38262:
URL: https://github.com/apache/beam/pull/38262#discussion_r3157407360


##########
sdks/python/apache_beam/transforms/async_dofn.py:
##########
@@ -190,6 +228,52 @@ def sync_fn_process(self, element, *args, **kwargs):
 
     return to_return
 
+  async def async_fn_process(self, element, *args, **kwargs):
+    """Makes the call to the wrapped dofn's start_bundle, process
+    and finish_bundle methods for asynchronous DoFns.
+
+    Args:
+      element: The element to process.
+      *args: Any additional arguments to pass to the wrapped dofn's process
+        method.
+      **kwargs: Any additional keyword arguments to pass to the wrapped dofn's
+        process method.
+
+    Returns:
+      A list of elements produced by the input element.
+    """
+    self._sync_fn.start_bundle()
+    process_result = self._sync_fn.process(element, *args, **kwargs)
+    bundle_result = self._sync_fn.finish_bundle()
+
+    if not process_result:
+      process_result = []
+    elif isinstance(process_result, AsyncIterable):
+      temp = []
+      async for item in process_result:
+        temp.append(item)
+      process_result = temp
+    elif not isinstance(process_result, (GeneratorType, Iterable)):
+      process_result = [process_result]
+
+    if not bundle_result:
+      bundle_result = []
+    elif isinstance(bundle_result, AsyncIterable):
+      temp = []
+      async for item in bundle_result:
+        temp.append(item)
+      bundle_result = temp
+    elif not isinstance(bundle_result, (GeneratorType, Iterable)):
+      bundle_result = [bundle_result]
+
+    to_return = []
+    for x in process_result:
+      to_return.append(x)
+    for x in bundle_result:
+      to_return.append(x)
+
+    return to_return

Review Comment:
   Updated as well.



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add option to use asyncio for AsyncWrapper [beam]

Posted by "AMOOOMA (via GitHub)" <gi...@apache.org>.
AMOOOMA commented on code in PR #38262:
URL: https://github.com/apache/beam/pull/38262#discussion_r3157247319


##########
sdks/python/apache_beam/transforms/async_dofn.py:
##########
@@ -190,6 +228,52 @@ def sync_fn_process(self, element, *args, **kwargs):
 
     return to_return
 
+  async def async_fn_process(self, element, *args, **kwargs):
+    """Makes the call to the wrapped dofn's start_bundle, process
+    and finish_bundle methods for asynchronous DoFns.
+
+    Args:
+      element: The element to process.
+      *args: Any additional arguments to pass to the wrapped dofn's process
+        method.
+      **kwargs: Any additional keyword arguments to pass to the wrapped dofn's
+        process method.
+
+    Returns:
+      A list of elements produced by the input element.
+    """
+    self._sync_fn.start_bundle()
+    process_result = self._sync_fn.process(element, *args, **kwargs)
+    bundle_result = self._sync_fn.finish_bundle()
+
+    if not process_result:

Review Comment:
   Done.



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add option to use asyncio for AsyncWrapper [beam]

Posted by "AMOOOMA (via GitHub)" <gi...@apache.org>.
AMOOOMA commented on PR #38262:
URL: https://github.com/apache/beam/pull/38262#issuecomment-4338464602

   R: @damccorm


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add option to use asyncio for AsyncWrapper [beam]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #38262:
URL: https://github.com/apache/beam/pull/38262#issuecomment-4338471662

   Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment `assign set of reviewers`


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add option to use asyncio for AsyncWrapper [beam]

Posted by "AMOOOMA (via GitHub)" <gi...@apache.org>.
AMOOOMA commented on code in PR #38262:
URL: https://github.com/apache/beam/pull/38262#discussion_r3157329871


##########
sdks/python/apache_beam/transforms/async_dofn_test.py:
##########
@@ -86,7 +86,9 @@ def set(self, time):
     self.time = time
 
 
-class AsyncTest(unittest.TestCase):
+class _AsyncTestBase:

Review Comment:
   Done. Turns out to use parameterized class instead of the pytest one since it seems like other test files in beam uses the parameterized one.



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add option to use asyncio for AsyncWrapper [beam]

Posted by "damccorm (via GitHub)" <gi...@apache.org>.
damccorm merged PR #38262:
URL: https://github.com/apache/beam/pull/38262


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org