#35417 ci: isolate container test networks

full analysis

https://github.com/bitcoin/bitcoin/pull/35417 · willcl-ark · +37/-8 in 3 files, 2 commits · labels: Tests, CI failed · draft

Goal

  • Allow developers to run multiple local CI container jobs simultaneously without network address collisions

Generates unique, deterministic Docker IPv4 and IPv6 subnets based on the container name when running containerized CI scripts. Passes these subnets to the functional bind tests via environment variables instead of hardcoding static IP addresses, and cleans up the Docker network on successful runs.

Problem: Local CI containers share static IP addresses (e.g., 1.1.1.5 and 1111:1111::5) for bind tests, which prevents developers from running multiple local CI container jobs simultaneously due to address collisions.

Category: Build and CI (#36 of 55)

P3 · cleanup

  • P3 because it eliminates IP collisions when running concurrent local CI containers
  • Benefit is limited to developers running multiple local CI test runs at once

Fixes an issue where concurrent local CI runs collide on static Docker network IPs, removing developer friction when running multiple test jobs.

Membership: Modifies ci/test/02_run_container.py to configure Docker container networking for CI runs.

Factors: security/stability 0, bug 1, performance 0, user value 1, leverage 0

Category: Test infrastructure (#28 of 45)

P3 · test coverage

  • P3 because functional bind tests no longer rely on hardcoded static host IP addresses
  • Enables test execution across non-default network environments without adding new test cases

Enables the functional bind test suite to run in non-default network environments without hardcoded host address requirements.

Membership: Carries the Tests label and updates functional test scripts feature_bind_port_discover.py and feature_bind_port_externalip.py to dynamically read routable IP addresses from environment variables.

Factors: security/stability 0, bug 1, performance 0, user value 0, leverage 0

Reviewability: Stale: CI failing

  • CI is failing and the author has been inactive for months

CI is currently failing and the author has been silent for 106 days.

Author status: silent since 2026-06-02 after addressing reviewer nits and force-pushing

Resolved concerns:

  • Assigning both IPv4 and IPv6 subnets in a single network command and streamlining environment variable passing (raised by maflcko, addressed in force-push).

Agreement: Strong

  • Strong overall approval across concept and code
  • Concept approval without detailed technical justification (fanquake)
  • Approved after nits on subnet command and environment variables were addressed (maflcko)

Strong approval with Concept ACK from fanquake and code approval from maflcko.

The PR has an explicit Concept ACK from fanquake and an approval review from maflcko, with all review comments resolved by the author.

  • fanquake gave Concept ACK: 'thanks for following up here.'
  • maflcko reviewed and approved: 'lgtm, seems fine. Left some nits', which the author resolved.

Review verdicts (DrahtBot): 0

Files

45 lines under test/bench/ci.

  • ci/test/02_run_container.py +30/-5
  • test/functional/feature_bind_port_discover.py +4/-2
  • test/functional/feature_bind_port_externalip.py +3/-1

Card

This PR isolates Docker container networks in local CI runs by dynamically generating IPv4 and IPv6 subnets from the container name, passing them to the test suite via environment variables. It solves issue #35416, which prevented running multiple local CI container jobs simultaneously due to static IP collisions. Reviewers support the change (Concept ACK fanquake, ACK maflcko), but CI is failing and the author has been silent for over 100 days. It has no external dependencies.

Data

dossier JSON · extract JSON · model openrouter/google/gemini-3.8-flash, generated 2026-09-17T16:19, confidence high, input hash 2fe8297e9008aa88