Skip to content

Commit fbb5133

Browse files
CopilotPDowney
andauthored
CI: document timeout exit code constant and handle tee failure after successful install
Agent-Logs-Url: https://github.com/EngineScript/EngineScript/sessions/54538003-bd42-4247-8202-8781e8642546 Co-authored-by: PDowney <[email protected]>
1 parent 57cd4d1 commit fbb5133

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to EngineScript will be documented in this file.
44

55
Changes are organized by date, with the most recent changes listed first.
66

7+
## 2026-04-10 (2)
8+
9+
### 🔧 CI RUN-INSTALL-STEP IMPROVEMENTS
10+
11+
- Defined `TIMEOUT_EXIT_CODE=124` as a named constant with an explanatory comment in `scripts/ci/run-install-step.sh`, replacing the undocumented magic number in the timeout exit-code comparison.
12+
- Added a `TEE_EXIT_CODE` failure check after a successful installation: if `tee` exits non-zero the script now reports that log streaming failed and exits with code 1, ensuring incomplete logs are surfaced.
13+
714
## 2026-04-10
815

916
### 🐛 VHOST IMPORT EXTRACTION FLOW FIX

scripts/ci/run-install-step.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ TIMEOUT_SECONDS="$2"
1212
INSTALL_SCRIPT_PATH="$3"
1313
LOG_PATH="$4"
1414
INTEGER_REGEX='^[0-9]+$'
15+
# `timeout` returns 124 when the wrapped command times out.
16+
TIMEOUT_EXIT_CODE=124
1517

1618
if ! [[ "$TIMEOUT_SECONDS" =~ $INTEGER_REGEX ]]; then
1719
echo "Error: timeout must be an integer (seconds): $TIMEOUT_SECONDS" >&2
@@ -41,7 +43,7 @@ TEE_EXIT_CODE="${PIPE_EXIT_CODES[1]}"
4143
set -e
4244

4345
if [ "$SCRIPT_EXIT_CODE" -ne 0 ]; then
44-
if [ "$SCRIPT_EXIT_CODE" -eq 124 ]; then
46+
if [ "$SCRIPT_EXIT_CODE" -eq "$TIMEOUT_EXIT_CODE" ]; then
4547
echo "${COMPONENT_NAME} installation timed out after ${TIMEOUT_SECONDS} seconds"
4648
else
4749
echo "${COMPONENT_NAME} installation failed"
@@ -57,6 +59,13 @@ if [ "$SCRIPT_EXIT_CODE" -ne 0 ]; then
5759
exit 1
5860
fi
5961

62+
if [ "$TEE_EXIT_CODE" -ne 0 ]; then
63+
echo "${COMPONENT_NAME} installation completed, but log streaming failed"
64+
echo "Log streaming (tee) exit code: $TEE_EXIT_CODE"
65+
echo "Script end time: $(date)" >> "$LOG_PATH"
66+
exit 1
67+
fi
68+
6069
echo "Script end time: $(date)" >> "$LOG_PATH"
6170
# Ensure installer/log writes are flushed before subsequent CI steps that may read logs
6271
# or create snapshots/caches; this is intentional despite the small performance cost.

0 commit comments

Comments
 (0)