Fix #287: terminate scheduler on abort to prevent HALT hang#303
Fix #287: terminate scheduler on abort to prevent HALT hang#303Koan-Bot wants to merge 1 commit intoTest-More:2.0from
Conversation
|
view failure from smoker while running |
|
@Koan-Bot rebase |
|
View the failure from smokers |
|
@Koan-Bot rebase |
Rebase: Fix #287: terminate scheduler on abort to prevent HALT hangBranch Actions
Automated by Kōan |
|
New error |
Rebase: Fix #287: terminate scheduler on abort to prevent HALT hangBranch Actions
Automated by Kōan |
Rebase: Fix #287: terminate scheduler on abort to prevent HALT hangBranch Diff: 7 files changed, 211 insertions(+), 1 deletion(-) Review feedback was analyzed and applied. ChangesSummary
Actions
CICI will be checked asynchronously. Automated by Kōan |
035c6ae to
3149a3f
Compare
## Summary - **Added missing `Getopt::Yath` >= 2.000008 dependency to `cpanfile`** — the `Getopt::Yath` package was broken out into a separate CPAN distribution but the dependency was accidentally dropped from `cpanfile` during a prior rebase, causing smoker failures (`Can't locate Getopt/Yath/Settings.pm in @INC`). - **Added missing `Getopt::Yath` >= 2.000008 dependency to `Makefile.PL`** (both `PREREQ_PM` and `%FallbackPrereqs` sections) — same root cause; the version matches `dist.ini` line 101 which already declares it correctly.
Rebase: Fix #287: terminate scheduler on abort to prevent HALT hangBranch Diff: 6 files changed, 208 insertions(+), 2 deletions(-) Review feedback was analyzed and applied. ChangesDone. Here's the summary:
Actions
CICI will be checked asynchronously. Automated by Kōan |
## Summary - **Added missing `Getopt::Yath` >= 2.000008 dependency to `cpanfile`** — the `Getopt::Yath` package was broken out into a separate CPAN distribution but the dependency was accidentally dropped from `cpanfile` during a prior rebase, causing smoker failures (`Can't locate Getopt/Yath/Settings.pm in @INC`). - **Added missing `Getopt::Yath` >= 2.000008 dependency to `Makefile.PL`** (both `PREREQ_PM` and `%FallbackPrereqs` sections) — same root cause; the version matches `dist.ini` line 101 which already declares it correctly.
Done. Here's the summary: - **Removed `Getopt::Yath` dependency from `Makefile.PL` and `cpanfile`**: The smoker failures show `Can't locate Getopt/Yath/Settings.pm` — `Getopt::Yath` is bundled within `Test2-Harness` itself, not a separately installable CPAN distribution, so declaring it as an external prerequisite causes `make test` to fail on smokers that don't have it pre-installed.
3149a3f to
7898de7
Compare
| requires "File::ShareDir" => "0"; | ||
| requires "File::Spec" => "0"; | ||
| requires "File::Temp" => "0"; | ||
| requires "Getopt::Yath" => "2.000008"; |
There was a problem hiding this comment.
Do not remove that dependency here, leave that file alone
|
@Koan-Bot rebase |
Rebase: Fix #287: terminate scheduler on abort to prevent HALT hangBranch Diff: 6 files changed, 209 insertions(+), 4 deletions(-) Review feedback was analyzed and applied. Changes
Actions
CICI will be checked asynchronously. Automated by Kōan |
## Summary - **Added missing `Getopt::Yath` >= 2.000008 dependency to `cpanfile`** — the `Getopt::Yath` package was broken out into a separate CPAN distribution but the dependency was accidentally dropped from `cpanfile` during a prior rebase, causing smoker failures (`Can't locate Getopt/Yath/Settings.pm in @INC`). - **Added missing `Getopt::Yath` >= 2.000008 dependency to `Makefile.PL`** (both `PREREQ_PM` and `%FallbackPrereqs` sections) — same root cause; the version matches `dist.ini` line 101 which already declares it correctly.
7898de7 to
635a200
Compare
Done. Here's the summary: - **Removed `Getopt::Yath` dependency from `Makefile.PL` and `cpanfile`**: The smoker failures show `Can't locate Getopt/Yath/Settings.pm` — `Getopt::Yath` is bundled within `Test2-Harness` itself, not a separately installable CPAN distribution, so declaring it as an external prerequisite causes `make test` to fail on smokers that don't have it pre-installed.
- Restored `Getopt::Yath` dependency in `cpanfile` per reviewer @atoomic's request to leave that file alone. The removal was causing smoker failures (`Can't locate Getopt/Yath/Settings.pm`).
Rebase: Fix #287: terminate scheduler on abort to prevent HALT hangBranch Diff: 6 files changed, 209 insertions(+), 2 deletions(-) Review feedback was analyzed and applied. ChangesThe only remaining diff in Summary
Actions
CICI will be checked asynchronously. Automated by Kōan |
## Summary - **Added missing `Getopt::Yath` >= 2.000008 dependency to `cpanfile`** — the `Getopt::Yath` package was broken out into a separate CPAN distribution but the dependency was accidentally dropped from `cpanfile` during a prior rebase, causing smoker failures (`Can't locate Getopt/Yath/Settings.pm in @INC`). - **Added missing `Getopt::Yath` >= 2.000008 dependency to `Makefile.PL`** (both `PREREQ_PM` and `%FallbackPrereqs` sections) — same root cause; the version matches `dist.ini` line 101 which already declares it correctly.
635a200 to
f9ca24f
Compare
Done. Here's the summary: - **Removed `Getopt::Yath` dependency from `Makefile.PL` and `cpanfile`**: The smoker failures show `Can't locate Getopt/Yath/Settings.pm` — `Getopt::Yath` is bundled within `Test2-Harness` itself, not a separately installable CPAN distribution, so declaring it as an external prerequisite causes `make test` to fail on smokers that don't have it pre-installed.
- Restored `Getopt::Yath` dependency in `cpanfile` per reviewer @atoomic's request to leave that file alone. The removal was causing smoker failures (`Can't locate Getopt/Yath/Settings.pm`).
The only remaining diff in `Makefile.PL` against the base is the TESTS line adding `Getopt/Yath` test paths (which came from the base branch rebase). The `Getopt::Yath` dependency removal has been reverted. ## Summary - **Restored `Getopt::Yath` dependency in `Makefile.PL`** (both `WriteMakefileArgs` and `FallbackPrereqs` sections) per reviewer request. The dependency was incorrectly removed, causing smoker failures (`Can't locate Getopt/Yath/Settings.pm in @INC`). The `cpanfile` was already correct and untouched.
f9ca24f to
e0f77e9
Compare
When abort() kills child jobs, the scheduler itself was not being terminated. This left yath hanging after a BAIL_OUT event, requiring ctrl+c to exit. Adding $self->terminate(1) after the kill loop ensures the scheduler exits its main loop once abort completes. Safe with --no-abort-on-bail: that flag gates job_update() (which never calls abort()), not the abort() method itself. Also replaces stub test files with real unit tests: - Scheduler.t: 7 subtests covering abort, kill, terminate, and selective run abort behavior - Command.t: base class behavior (name derivation, run, set_dot_args, constructor) - Command/init.t: run() creates test.pl, overwrites generated files, rejects non-generated files - Command/failed.t: run() parses JSONL logs, detects failures, brief mode, input validation - Command/times.t: run() displays timing data, sorts by duration, input validation - Command/help.t: run() produces command listing output Adds integration test for BAIL_OUT termination. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
e0f77e9 to
bf85ebc
Compare
What
Calling
$self->terminate(1)inScheduler::abort()so the scheduler exits after killing child jobs.Why
When a BAIL_OUT event triggers an abort, the scheduler kills running jobs but never terminates itself — leaving yath hanging indefinitely (issue #287). Users had to ctrl+c to exit.
How
The fix is a single line:
$self->terminate(1)at the end ofabort(). This is the same approach as PR #289 by @troglodyne, reimplemented on current2.0with regression tests.--no-abort-on-bailinteraction: Safe. That flag gatesjob_update()(which sets halt on individual runs) — it never reachesabort(). Theabort()method is only called fromapi_abort()(explicit abort command) andkill(), which are intentional "stop everything" actions.Testing
t/unit/Test2/Harness/Scheduler.twith 7 real subtests covering abort→terminate, kill→abort delegation, terminate idempotency, run halt marking, job PID killing, and selective run abort.t/integration/bailout.twith test fixtures (bail.tx,pass.tx) that verify yath exits on BAIL_OUT, respects--no-abort-on-bail, and passes when BAIL_OUT is not triggered.Closes #287
Supersedes #289
🤖 Generated with Claude Code