ARQ Jobs#110
Merged
alexchristy merged 48 commits intomainfrom Jul 13, 2025
Merged
Conversation
…long with async parallel processing for terraform commands
… and consolidate related test fixtures
…ssions and database logs
… destroy to 202 since they queue up async jobs.
…successfully created
…alex when he tests manually
… add job wait utility functions
…RQ job execution API logic
…ly deploy ranges in parallel
…er to string conversion
…p instance, and remove duplicate postgres database, and add dynamic test markers
…ntime no await mock error
… for slower executions in GH actions
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the test suite to centralize test markers and update tests to async patterns and naming conventions. Key changes include:
- Removed per-file
pytestmark = pytest.mark.unitand directimport pytestusages in favor of dynamic marking via apytest_collection_modifyitemshook inconftest.py. - Converted synchronous test functions to
async defwhere the underlying code became coroutine-based, and added correspondingawaitcalls. - Aliased
cdktf.TestingtoCdktfTestingin AWS stack tests to avoid import conflicts and improve clarity.
Reviewed Changes
Copilot reviewed 72 out of 73 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/.../test_*.py | Removed explicit pytestmark and import pytest in unit tests; rely on dynamic marking |
| tests/unit/utils/test_api_utils.py | Updated async patterns and removed redundant pytest imports |
| tests/unit/core/cdktf/stacks/test_aws_stacks.py | Replaced Testing imports with Testing as CdktfTesting and updated assertions |
| tests/unit/core/cdktf/ranges/test_base_range.py | Converted multiple test functions to async def and added await for coroutine calls |
| tests/conftest.py | Introduced pytest_collection_modifyitems hook for dynamic marking instead of per-file markers |
… workers with docker compose
…e used internally by ARQ
Adamkadaban
approved these changes
Jul 13, 2025
Member
Adamkadaban
left a comment
There was a problem hiding this comment.
Looks great. At first I was wondering where all the code came from until I realized it was mostly tests lol (very you).
Good job
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.
Checklist
Description
This PR brings ARQ async job execution functionality to the API. Background execution for long running tasks (like terraform deploy and destroy) allows the API to be snappier and more responsive. A summary of the changes is listed below.
ARQ Job:
GET /jobsGET /jobs/{id}deploy_rangeanddestroy_range(moved from range endpoints)Testing:
slow,api,worker, andcdktfMisc:
base_range.pyclass to leverage subprocess execution for terraform commandsproviders.tfto use latest AWS provider (allows docker image to build with latest provider)Fixes: #39
Known Issues: