Commit a09a027
fix: pipeline hangs when submitting from compute nodes (#450)
When running snakemake from within a SLURM job (e.g., an interactive
session on a compute node), the pipeline would submit jobs but never
detect their completion, hanging forever.
The RemoteExecutor base class starts a status-checking daemon thread in
`__init__` *before* `__post_init__` is called. The SLURM plugin's
`warn_on_jobcontext()` in `__post_init__` would sleep 5 seconds and then
delete SLURM environment variables, but by then the daemon thread had
already started and would silently die after its first polling cycle.
Fix: move the SLURM environment detection and cleanup into `__init__`,
before `super().__init__()` starts the daemon thread. Remove the now
unnecessary `warn_on_jobcontext()` method and its 5-second sleep.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Cleaner SLURM environment detection and immediate cleanup during
executor startup, with an earlier warning when a SLURM job context is
present to improve job submission reliability.
* **Tests**
* Test suite updated to align with the revised executor initialization
and warning behavior; expectations remain unchanged.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Christian Meesters <cmeesters@users.noreply.github.com>1 parent 8ba024b commit a09a027
2 files changed
Lines changed: 24 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
431 | 446 | | |
432 | | - | |
433 | | - | |
434 | 447 | | |
435 | 448 | | |
436 | 449 | | |
| |||
617 | 630 | | |
618 | 631 | | |
619 | 632 | | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | 633 | | |
635 | 634 | | |
636 | 635 | | |
| |||
1451 | 1450 | | |
1452 | 1451 | | |
1453 | 1452 | | |
1454 | | - | |
1455 | | - | |
| 1453 | + | |
1456 | 1454 | | |
1457 | 1455 | | |
1458 | 1456 | | |
1459 | 1457 | | |
1460 | | - | |
1461 | | - | |
| 1458 | + | |
1462 | 1459 | | |
1463 | 1460 | | |
1464 | 1461 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
50 | | - | |
51 | | - | |
52 | | - | |
| 49 | + | |
| 50 | + | |
0 commit comments