Distinguish ancestor OOM-kill from genuine test failure in merge-to-integration.sh - #131
Open
laird wants to merge 1 commit into
Open
Distinguish ancestor OOM-kill from genuine test failure in merge-to-integration.sh#131laird wants to merge 1 commit into
laird wants to merge 1 commit into
Conversation
…re in merge-to-integration.sh merge-to-integration.sh's own `bash -c "$TEST_CMD"` invocation can be an ancestor of the vitest subshell that #1250 already knows how to detect an OOM-kill for. When the kernel OOM-killer hits this ancestor process instead of the subshell, the in-process detection never runs and the script reports the generic "tests fail after integrating" message -- indistinguishable from a real regression. Capture the exit code explicitly and treat >=128 (killed by signal) as an infra kill, matching the messaging style already used by athena2's scripts/run-changed-tests-gate.sh for the subshell case. Cross-repo issue: ey-org/athena2#1540
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
scripts/run-changed-tests-gate.shin the athena2 app repo (fixed by its own#1250/#1534) already distinguishes a SIGKILL'd vitest subshell from a genuine
test failure. That detection lives inside the subshell that owns the log
file — it cannot fire if the kernel OOM-killer instead hits an ancestor:
merge-to-integration.sh's ownbash -c "$TEST_CMD"invocation. In thatcase the process just returns a nonzero/signal exit status and this script
reported the generic "tests fail after integrating" message, indistinguishable
from a real regression.
Surfaced while triaging athena2 issue ey-org/athena2#1540 (1 of 6 observed
merge attempts died silently mid-run with no error message, consistent with
an ancestor OOM-kill).
Fix
Capture
bash -c "$TEST_CMD"'s exit status explicitly instead of branching onit directly, and treat an exit code >=128 (killed by signal) as an infra
kill — printing a distinct
::error::message that says so, matching themessaging style athena2 already uses for the subshell case. A genuine
(non-signal) test failure still gets the original generic message.
Testing
tests/test_merge_to_integration_oom.sh: builds a real throwaway gitrepo and drives the script with a self-SIGKILLing
--test-cmd, assertingthe ancestor-kill message appears and the generic message does not (and
the inverse for a genuine
exit 1failure).bash tests/run-shell-suite.sh— 26/26 passing.bash -n plugins/autocoder/scripts/*.sh && python3 -m py_compile plugins/autocoder/scripts/*.py— clean.