Preserve subprocess output on timeout#122
Merged
saintstack merged 2 commits intoFoundationDB:mainfrom Dec 5, 2025
Merged
Conversation
Use TimeoutExpired.stdout to capture partial output before timeout. Generate fallback XML if no output captured (hung containers). Prevents empty output for timed-out tests.
jzhou77
previously approved these changes
Dec 5, 2025
Contributor
jzhou77
left a comment
There was a problem hiding this comment.
LGTM. Only a nit on formatting
k8s/agent-scaler/agent-scaler.yaml
Outdated
| spec: | ||
| containers: | ||
| - env: | ||
| - env: |
Contributor
Author
There was a problem hiding this comment.
Good catch. Done. Good thing I didn't restart the agent-scalers after deploy.
jzhou77
approved these changes
Dec 5, 2025
johscheuer
approved these changes
Dec 5, 2025
Member
johscheuer
left a comment
There was a problem hiding this comment.
Changes LGTM, only one comment (nothing blocking).
| break | ||
| if timeout_time and time.time() > timeout_time: | ||
| log("<timed out>") | ||
| process.kill() |
Member
There was a problem hiding this comment.
I don't have a strong opinion here, but should we first try to terminate() the process (sends SIGTERM) and then send the kill() (sends SIGKILL) if it doesn't terminate after a fixed amount of time? That should give the process some additional time to write the logs before shutting down.
Contributor
Author
There was a problem hiding this comment.
Sorry. Missed this @johscheuer . Making a new PR to implement.
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.
Use TimeoutExpired.stdout to capture partial output before timeout. Generate fallback XML if no output captured (hung containers). Prevents empty output for timed-out tests.
Already deployed and doesn't seem to break anything.