Skip to content

Commit b5fab82

Browse files
committed
chore: update stable-1.0 CI to run py312
Update CI for stable/1.0 branch to run against py312. Also include changes to dependencies for tests to be able to run with py312 and an asyncio bug that was not being hit prior to py312.
1 parent f37283d commit b5fab82

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858
- "3.9"
5959
- "3.10"
6060
- "3.11"
61+
- "3.12"
6162

6263
steps:
6364
- name: Checkout

.github/workflows/scheduled.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
- "3.9"
4646
- "3.10"
4747
- "3.11"
48+
- "3.12"
4849

4950
steps:
5051
- name: Checkout

ansible_rulebook/engine.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,12 @@ async def run_rulesets(
334334
should_reload = True
335335

336336
logger.debug("Waiting on gather")
337-
asyncio.gather(*ruleset_tasks, return_exceptions=True)
337+
await asyncio.gather(*ruleset_tasks, return_exceptions=True)
338+
# Ensure drools async task completes cleanup
339+
try:
340+
await async_task
341+
except asyncio.CancelledError:
342+
pass
338343
logger.debug("Returning from run_rulesets")
339344
if send_heartbeat_task:
340345
send_heartbeat_task.cancel()

requirements_test.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@ docopt
33
psutil
44
requests
55
ansible
6-
ansible-core
6+
ansible-core>=2.15,<2.17
77
ansible-runner
88
jmespath
99

10+
setuptools
1011
pytest
1112
pytest-asyncio
1213
pytest-timeout
1314
pytest-xdist
1415
pytest-cov
1516
pytest-check
17+
marshmallow==3.26.1
1618
pytest-jira
1719
dynaconf==3.1.11
1820
freezegun

0 commit comments

Comments
 (0)