Skip to content

fix(exec): keep the gate's full mxbuild output in a per-run log - #452

Open
MendixMau wants to merge 1 commit into
masterfrom
fix/gate-full-log
Open

MendixMau wants to merge 1 commit into
masterfrom
fix/gate-full-log

Conversation

@MendixMau

@MendixMau MendixMau commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Problem

exec.sh printed head -20 of mxbuild's output and deleted the rest with its temp file, so the evidence of a failed gate (the detail of a CE1613 among it) was lost. In a field migration project (12 modules), every one of the 17 "gate could not run" rows and at least 1 real CE failure had no output left to read, which cost about 20 minutes of blocked reruns.

Refs #442, #448, #171, #285, #424

Change

  • project-bin/exec.sh: when the gate does not end clean (non-zero exit or a non-empty errors file) the full mxbuild output is written to .mpr-snapshots/mxbuild-logs/<timestamp>-<pid>.log. That dir is git-ignored by snapshot-mpr.sh, and its name does not match the [0-9]* pattern restore_snapshot uses, so a rollback never touches it. The newest 30 logs are kept.
  • The screen keeps the top lines and adds full mxbuild output: <path>; the BUILD-LOG row detail ends with mxbuild log: <path> (the detail column is free text, so the row format is unchanged).
  • CHANGELOG entry.

Test

New tests/wave2/test-exec-gate-log.sh (stub mxcli, mxbuild, java; no real mxbuild): A) a failing gate with 41 lines of output leaves a log holding all of it, the screen shows no tail and names the path, the row names the path, and the rollback still applies; B) a clean run writes no log and no note; C) 35 old logs plus one new are pruned to 30. 11 of 11 pass. Existing test-exec-crash-rollback.sh (13) and test-exec-lock-watch.sh (84) pass. check-pr-discipline.sh and check-portability.sh (changed files) are clean.

Risk

  • A failed gate writes one log file (size of mxbuild's output); clean gates write nothing.
  • Touches the same BUILD-LOG detail line as the watcher PR (fix/gate-watcher-race); a one-line rebase conflict is possible.

🤖 Generated with Claude Code

exec.sh printed head -20 of mxbuild's output and deleted the rest, so the detail
of a failed gate was lost in a field migration project (12 modules). A gate that
does not end clean now writes .mpr-snapshots/mxbuild-logs/<run>.log (newest 30
kept); the screen shows the top lines plus the path and the BUILD-LOG row ends
with "mxbuild log: <path>".

Refs #441, #443, #171, #285, #424

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant