]> git.kaiwu.me - haproxy.git/commit
DEV: patchbot: tolerate polluted save responses and show server warnings
authorWilly Tarreau <w@1wt.eu>
Mon, 6 Jul 2026 17:30:15 +0000 (19:30 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 7 Jul 2026 12:45:32 +0000 (14:45 +0200)
commit09814345d53698587d55a590e5b6d0077530f9e7
tree8fa9b3aa0105b2af6aa509884b906f25e09f452f
parent351c7e6598e47933a005e625f38b16dcd2fb4ddc
DEV: patchbot: tolerate polluted save responses and show server warnings

Some server setups leak the CGI's stderr into the response body (e.g.
inetd-style servers where fd 2 is the client socket): since stderr is
unbuffered and stdout is buffered, a git error message then lands
*before* the "OK <n>" line, and the applied-count check failed with a
cryptic "server applied only ? of N changes" although everything had
been applied. Scan the whole response for the lines of interest (the
"OK <n>" count, the "conflict" and "warning" lines) instead of assuming
they come first, dump the raw response to the console when no count is
found at all to ease diagnosis, and display the server's warning lines
(such as the new "git commit failed" one) next to the save status so
that a recording problem is visible from the page instead of being
buried in a server log.
dev/patchbot/scripts/post-ai.sh