fix: preserve canary release stdin across edge checks
Memind CI / Test, build, and release guards (push) Successful in 1m35s

This commit is contained in:
john
2026-07-26 21:24:23 +08:00
parent 473ad80882
commit 02f2dc6b17
2 changed files with 15 additions and 2 deletions
+6 -2
View File
@@ -261,7 +261,9 @@ candidate_healthy() {
}
edge_ssh() {
ssh -o BatchMode=yes -o ConnectTimeout=10 "${EDGE_HOST}" "$@"
# This remote release script itself arrives on stdin. Ordinary nested SSH
# commands must not consume the unparsed remainder of that script.
ssh -n -o BatchMode=yes -o ConnectTimeout=10 "${EDGE_HOST}" "$@"
}
write_canary_tunnel_plist() {
@@ -586,7 +588,9 @@ done
[[ "${counts:-unknown unknown}" == "0 0" ]]
say "Switch the committed 105 nginx upstreams to the isolated canary tunnel"
edge_ssh /bin/bash <<EDGE_SWITCH
# Unlike ordinary edge_ssh calls, this command intentionally receives only the
# bounded EDGE_SWITCH heredoc on stdin.
ssh -o BatchMode=yes -o ConnectTimeout=10 "${EDGE_HOST}" /bin/bash <<EDGE_SWITCH
set -euo pipefail
for config in '${EDGE_MOBILE_CONFIG}' '${EDGE_WECHAT_CONFIG}'; do
before_count="\$(grep -cF 'proxy_pass http://58.38.22.103:8081;' "\${config}")"