Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b4HkWoC7hLzk61vZa8
29 lines
2.1 KiB
Bash
Executable File
29 lines
2.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Compare the shop scenario output of the patched 4.1 line (step 1) with the final upgrade (step 5).
|
|
cd "$(dirname "$0")/.." || exit 1
|
|
norm() { sed -E 's/"timestamp":"[^"]+"/"timestamp":"<ts>"/g; s/[0-9a-f]{32}-[0-9a-f]{16}/<trace>-<span>/g; s/[0-9a-f]{32}/<trace>/g' "$1"; }
|
|
F=output/11-shop-before-after.txt
|
|
{ echo "# The shop's scenario files, compared with Boot 4.1.3 / 2025.1.5 (timestamps and trace ids masked)."
|
|
echo "# 00-startup-race.txt is left out: it records timing."
|
|
for step in "2 only the two version numbers changed (step 2)" "5 all five steps applied"; do
|
|
read -r n title <<<"$step"
|
|
echo; echo "=== Boot 4.2.0 / 2026.0.0, $title"
|
|
for f in 01-config-server 02-eureka-registry 03-gateway-requests 04-trace-propagation 05-circuit-breaker 06-eureka-lb-trap; do
|
|
if diff -q <(norm run/shop1/output/$f.txt) <(norm run/shop$n/output/$f.txt) >/dev/null; then echo "$f.txt: identical"
|
|
else echo "$f.txt: DIFFERENT"; diff <(norm run/shop1/output/$f.txt) <(norm run/shop$n/output/$f.txt) | grep '^[<>]' | grep -v '^[<>] *$' | cut -c1-110 | head -6 | sed 's/^/ /'; fi
|
|
done
|
|
done; } > $F
|
|
cp run/shop1/output/06-eureka-lb-trap.txt output/12-eureka-lb-trap-before.txt
|
|
# On 2026.0.0 the log is the evidence: the registry query in gotchas.sh can answer from Eureka's 30 s response cache.
|
|
L=run/shop2/run/logs/order-service-broken.log
|
|
{ echo "# order-service on 2026.0.0 with --shop.demo.primary-builder=false, taken from its own log"
|
|
echo
|
|
echo "lines with BeanCurrentlyInCreationException: $(grep -c BeanCurrentlyInCreationException $L)"
|
|
echo "lines with 'No instances available for localhost': $(grep -c 'No instances available for localhost' $L)"
|
|
grep -m1 -E 'registration status' $L | sed -E 's/^.*(DiscoveryClient_ORDER)/\1/'
|
|
} > output/13-eureka-lb-trap-after.txt
|
|
{ echo; echo "The yes/no registry line in 06-eureka-lb-trap.txt varies between runs on 2026.0.0 (Eureka caches that answer);"
|
|
echo "the registration itself is recorded in 13-eureka-lb-trap-after.txt."; } >> $F
|
|
cp run/shop5/output/03-gateway-requests.txt output/14-gateway-requests-after.txt
|
|
cat $F output/1[23]-*.txt
|