Commit 3e9b632
authored
Fix shutdown on Cntrl+c for
According to the docs `ProcessPoolExecutor.shutdown` :
> Any futures that are completed or running won’t be cancelled, regardless of the value of cancel_futures
ref: https://docs.python.org/3.13/library/concurrent.futures.html#concurrent.futures.Executor.shutdown
Which causes long-running pytest invocation to continue running.
This PR switches to using `multiprocessing.pool.Pool` instead.
## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/NeMo-Agent-Toolkit/blob/develop/docs/source/resources/contributing/index.md).
- We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
- Any contribution which contains commits that are not Signed-Off will not be accepted.
- When the PR is ready for review, new or existing tests cover these changes.
- When the PR is ready for review, the documentation is up to date with these changes.
## Summary by CodeRabbit
* **Refactor**
* Improved internal test runner to process tasks in submission order for more predictable results.
* Simplified shutdown behavior to terminate and join worker processes, improving reliability on interrupt.
* Ensured early-exit stops remaining work when configured to exit first.
* Enhanced shutdown messaging to provide clearer exit information and restore prior interrupt handling.
Authors:
- David Gardner (https://github.com/dagardner-nv)
Approvers:
- Will Killian (https://github.com/willkill07)
URL: #1886ci/scripts/run_tests.py (#1886)1 parent 4b778e7 commit 3e9b632
1 file changed
+37
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
| |||
245 | 244 | | |
246 | 245 | | |
247 | 246 | | |
248 | | - | |
249 | | - | |
| 247 | + | |
250 | 248 | | |
251 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
252 | 257 | | |
| 258 | + | |
| 259 | + | |
253 | 260 | | |
254 | | - | |
255 | | - | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
256 | 267 | | |
257 | | - | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
258 | 272 | | |
259 | | - | |
| 273 | + | |
260 | 274 | | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
271 | 285 | | |
272 | 286 | | |
273 | | - | |
274 | | - | |
| 287 | + | |
| 288 | + | |
275 | 289 | | |
276 | 290 | | |
277 | 291 | | |
278 | 292 | | |
279 | 293 | | |
280 | 294 | | |
281 | | - | |
| 295 | + | |
282 | 296 | | |
283 | 297 | | |
| 298 | + | |
284 | 299 | | |
285 | 300 | | |
286 | 301 | | |
| |||
0 commit comments