ci: Retry image building once on failure
What changed, and why it matters
This change simply makes the Bitcoin Core CI (continuous integration) build script retry once if building a container image fails, usually due to temporary network issues. It does not touch any wallet, networking, consensus, or cryptographic code, and there is no security issue here.
No security action needed. Treat as a normal CI reliability improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies ci/test/02_run_container.py to wrap the container image build command in a single retry loop. If the build returns a non-zero exit code, the script waits 3 seconds and tries again. This is a reliability improvement for CI infrastructure, not a security patch.
Changed components
ci/test/02_run_container.pyInspect captured patch +5 / −1
diff --git a/ci/test/02_run_container.py b/ci/test/02_run_container.py
index 7b1e3e0e..2f15f27a 100755
--- a/ci/test/02_run_container.py
+++ b/ci/test/02_run_container.py
@@ -7,6 +7,7 @@ import os
import shlex
import subprocess
import sys
+import time
def run(cmd, **kwargs):
@@ -65,7 +66,10 @@ def main():
cmd_build += [os.environ["BASE_READ_ONLY_DIR"]]
print(f"Building {os.environ['CONTAINER_NAME']} image tag to run in")
- run(cmd_build)
+ if run(cmd_build, check=False).returncode != 0:
+ print(f"Retry building {os.environ['CONTAINER_NAME']} image tag after failure")
+ time.sleep(3)
+ run(cmd_build)
run(["./ci/test/02_run_container.sh"]) # run the remainder
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.