Skip to content

Commit 8e0548c

Browse files
authored
[services, hailtop] shift supported python versions from 3.10-13 to 3.12-14 (#15603)
## Change Description Updates the default python version to 3.12 and shifts the list of supported versions to 3.12, 3.13, 3.14 to realign with the numpy's supported versions. Update: 3.11 will NOT continue to be supported. EMR has been shown to work ok with 3.12 and numpy support has already expired on 3.11. ## Security Assessment Delete all except the correct answer: - This change potentially impacts the Hail Batch instance as deployed by Broad Institute in GCP ### Impact Rating - This change has a low security impact ### Impact Description Python version updates in services and client libraries. ### Appsec Review - [x] Required: The impact has been assessed and approved by appsec
1 parent 7588963 commit 8e0548c

47 files changed

Lines changed: 254 additions & 549 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/pip-npm-bump.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
- uses: actions/setup-python@v5
2222
with:
23-
python-version: '3.10'
23+
python-version: '3.12'
2424

2525
- uses: actions/setup-node@v4
2626
with:

‎.github/workflows/static-and-unit-tests.yml‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
- uses: actions/setup-python@v5
2424
with:
25-
python-version: '3.10'
25+
python-version: '3.12'
2626
cache: pip
2727
cache-dependency-path: '**/pinned-requirements.txt'
2828

@@ -48,7 +48,7 @@ jobs:
4848

4949
- uses: actions/setup-python@v5
5050
with:
51-
python-version: '3.11'
51+
python-version: '3.12'
5252
cache: pip
5353
cache-dependency-path: '**/pinned-requirements.txt'
5454

@@ -79,7 +79,7 @@ jobs:
7979

8080
- uses: actions/setup-python@v5
8181
with:
82-
python-version: '3.11'
82+
python-version: '3.12'
8383
cache: pip
8484
cache-dependency-path: '**/pinned-requirements.txt'
8585

@@ -111,7 +111,7 @@ jobs:
111111

112112
- uses: actions/setup-python@v5
113113
with:
114-
python-version: '3.11'
114+
python-version: '3.12'
115115

116116
- name: Install pyyaml
117117
run: pip install pyyaml
@@ -138,7 +138,7 @@ jobs:
138138

139139
- uses: actions/setup-python@v5
140140
with:
141-
python-version: '3.11'
141+
python-version: '3.12'
142142
cache: pip
143143
cache-dependency-path: '**/pinned-requirements.txt'
144144

@@ -186,7 +186,7 @@ jobs:
186186

187187
- uses: actions/setup-python@v5
188188
with:
189-
python-version: '3.11'
189+
python-version: '3.12'
190190
cache: pip
191191
cache-dependency-path: '**/pinned-requirements.txt'
192192

@@ -231,7 +231,7 @@ jobs:
231231

232232
- uses: actions/setup-python@v5
233233
with:
234-
python-version: '3.11'
234+
python-version: '3.12'
235235
cache: pip
236236
cache-dependency-path: '**/pinned-requirements.txt'
237237

@@ -299,7 +299,7 @@ jobs:
299299

300300
- uses: actions/setup-python@v5
301301
with:
302-
python-version: '3.11'
302+
python-version: '3.12'
303303
cache: pip
304304
cache-dependency-path: '**/pinned-requirements.txt'
305305

‎.github/workflows/validate-build-yaml.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
- uses: actions/setup-python@v5
2121
with:
22-
python-version: '3.10'
22+
python-version: '3.12'
2323

2424
- name: Install PyYAML
2525
run: pip install pyyaml

‎Makefile‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ update-gateways-envoy:
131131
generate-pip-lockfiles:
132132
./generate-pip-lockfile.sh hail/python/hailtop
133133
./generate-pip-lockfile.sh hail/python
134-
uv pip compile --python-version 3.10 --python-platform linux --upgrade hail/python/requirements.txt --output-file=hail/python/pinned-requirements-py310.txt
135134
./generate-pip-lockfile.sh hail/python/dev
136135
./generate-pip-lockfile.sh gear
137136
./generate-pip-lockfile.sh web_common

‎auth/auth/driver/__main__.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88

99
from .driver import async_main
1010

11-
loop = asyncio.get_event_loop()
11+
loop = asyncio.new_event_loop()
12+
asyncio.set_event_loop(loop)
1213
loop.run_until_complete(async_main())

‎batch/batch/driver/main.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2163,6 +2163,8 @@ def log(self, request, response, time):
21632163

21642164

21652165
async def on_startup(app):
2166+
asyncio.get_running_loop().add_signal_handler(signal.SIGUSR1, dump_all_stacktraces)
2167+
21662168
exit_stack = AsyncExitStack()
21672169
app['exit_stack'] = exit_stack
21682170

@@ -2264,8 +2266,6 @@ def run():
22642266
app.on_startup.append(on_startup)
22652267
app.on_cleanup.append(on_cleanup)
22662268

2267-
asyncio.get_event_loop().add_signal_handler(signal.SIGUSR1, dump_all_stacktraces)
2268-
22692269
web.run_app(
22702270
deploy_config.prefix_application(app, 'batch-driver', client_max_size=HTTP_CLIENT_MAX_SIZE),
22712271
host='0.0.0.0',

‎batch/batch/front_end/front_end.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3782,6 +3782,8 @@ class AppKeys(CommonAiohttpAppKeys):
37823782

37833783

37843784
async def on_startup(app):
3785+
asyncio.get_running_loop().add_signal_handler(signal.SIGUSR1, dump_all_stacktraces)
3786+
37853787
exit_stack = AsyncExitStack()
37863788
app['exit_stack'] = exit_stack
37873789

@@ -3894,8 +3896,6 @@ def run():
38943896
app.on_startup.append(on_startup)
38953897
app.on_cleanup.append(on_cleanup)
38963898

3897-
asyncio.get_event_loop().add_signal_handler(signal.SIGUSR1, dump_all_stacktraces)
3898-
38993899
web.run_app(
39003900
deploy_config.prefix_application(app, 'batch', client_max_size=HTTP_CLIENT_MAX_SIZE),
39013901
host='0.0.0.0',

‎batch/batch/worker/worker.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3598,7 +3598,7 @@ async def async_main():
35983598
cleanup.push_async_callback(worker.shutdown)
35993599
await worker.run()
36003600
finally:
3601-
asyncio.get_event_loop().set_debug(True)
3601+
asyncio.get_running_loop().set_debug(True)
36023602
other_tasks = [t for t in asyncio.all_tasks() if t != asyncio.current_task()]
36033603
if other_tasks:
36043604
log.warning('Tasks immediately after docker close')
@@ -3610,7 +3610,8 @@ async def async_main():
36103610
t.cancel()
36113611

36123612

3613-
loop = asyncio.get_event_loop()
3613+
loop = asyncio.new_event_loop()
3614+
asyncio.set_event_loop(loop)
36143615
loop.add_signal_handler(signal.SIGUSR1, dump_all_stacktraces)
36153616
loop.run_until_complete(async_main())
36163617
log.info('closing loop')

‎batch/pinned-requirements.txt‎

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎batch/test/test_worker_image_security.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def _copyfail2_command(variant: str) -> str:
7979
def test_no_af_alg_socket(client: BatchClient):
8080
"""CVE-2026-31431: AF_ALG socket creation must be blocked on worker nodes."""
8181
b = create_batch(client)
82-
j = b.create_job('python:3.11-slim', ['/bin/sh', '-c', _AF_ALG_CHECK])
82+
j = b.create_job('python:3.12-slim', ['/bin/sh', '-c', _AF_ALG_CHECK])
8383
b.submit()
8484
status = j.wait()
8585
assert status['state'] == 'Success', str((status, b.debug_info()))

0 commit comments

Comments
 (0)