Implement async - #69
Merged
Merged
Conversation
* Remove fire response scenario * add placeholder markdown files. * Add pull_requests scenarios to default.yaml * Add pull_requests flag to test run command * add a separate config file for pull requests
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements comprehensive async/await support throughout the OpenUTM verification codebase, converting all synchronous I/O operations to asynchronous ones. The changes enable better concurrency and scalability by replacing blocking operations with non-blocking async equivalents, particularly for HTTP requests, OAuth token acquisition, and scenario execution.
Key changes include:
- Conversion of all HTTP clients from
httpx.Clienttohttpx.AsyncClientwith corresponding async context managers - Migration of all scenario functions, step decorators, and client methods to async/await pattern
- Update of dependency injection and execution frameworks to support async context managers and coroutines
- Introduction of
asyncio.run()in CLI entry point to orchestrate async execution
Reviewed changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/conftest.py | Added anyio backend fixture for async test support |
| tests/test_scenarios.py | New comprehensive async test suite for all scenario functions |
| tests/test_flight_blender_base_client.py | Converted sync tests to async with AsyncMock |
| tests/test_client_steps.py | New async test suite for client step methods |
| src/openutm_verification/scenarios/*.py | Converted all scenario functions to async with proper await usage |
| src/openutm_verification/core/clients/*/base_client.py | Migrated HTTP clients to AsyncClient and async context managers |
| src/openutm_verification/core/clients/*/client.py | Converted all client methods to async with proper await keywords |
| src/openutm_verification/core/execution/scenario_runner.py | Updated scenario_step decorator to enforce and handle async functions |
| src/openutm_verification/core/execution/execution.py | Made run_verification_scenarios async |
| src/openutm_verification/core/execution/dependency_resolution.py | Migrated to AsyncExitStack and async context managers |
| src/openutm_verification/core/execution/dependencies.py | Converted dependency providers to async generators |
| src/openutm_verification/auth/oauth2.py | Made OAuth2 token acquisition async |
| src/openutm_verification/cli/init.py | Added asyncio.run() to orchestrate async execution |
| src/openutm_verification/simulator/test.py | Removed test file (cleanup) |
| src/openutm_verification/importers/submit_signed_telemetry.py | Removed unused importer file |
| src/openutm_verification/importers/*.py | Split long comment lines for readability |
| src/openutm_verification/drip/import_drip_decoder.py | Split long documentation lines |
| src/openutm_verification/core/reporting/reporting.py | Fixed string quote consistency |
Comments suppressed due to low confidence (1)
src/openutm_verification/core/execution/scenario_runner.py:7
- Import of 'CoroutineType' is not used.
from types import CoroutineType
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ender_client.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ender_client.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enables further progress on #61