scripts/bw-compat: use docker logs for log collection
What changed, and why it matters
This commit fixes a CI log-collection script. It changes how test logs are gathered from Docker containers so that logs are reliably saved as artifacts. There is no security issue here—just a debugging/observability improvement for internal backward-compatibility tests.
No security action needed. Treat as a normal CI/test infrastructure improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies scripts/bw-compatibility-test/network.sh. The collect_logs() function previously used docker cp to copy lnd.log files from named volumes inside containers, which silently failed in CI and produced empty artifact uploads. It now uses docker logs to read the container’s stdout/stderr directly into a log file. This is a reliability fix for test diagnostics.
Changed components
scripts/bw-compatibility-test/network.shInspect captured patch +1 / −3
diff --git a/scripts/bw-compatibility-test/network.sh b/scripts/bw-compatibility-test/network.sh
index c712381..e586229 100644
--- a/scripts/bw-compatibility-test/network.sh
+++ b/scripts/bw-compatibility-test/network.sh
@@ -307,9 +307,7 @@ function collect_logs() {
for node in alice bob charlie dave bob-pr dave-pr; do
if docker ps -a --format '{{.Names}}' | grep -q "^${node}$"; then
- mkdir -p "$log_dir/$node"
- docker cp "$node:/root/.lnd/logs/bitcoin/regtest/lnd.log" \
- "$log_dir/$node/lnd.log" 2>/dev/null || true
+ docker logs "$node" > "$log_dir/${node}.log" 2>&1 || true
fi
done
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.