ci: isolate container test networks #35417

pull willcl-ark wants to merge 2 commits into bitcoin:master from willcl-ark:container-networks changing 3 files +47 −8
  1. willcl-ark commented at 7:54 PM on May 29, 2026: member

    Fixes #35416

    Local CI jobs currently share Docker networks while requesting fixed routable addresses. That prevents two jobs from running at the same time because the second container cannot claim the same static IPs. See 33362.

    Name the networks "{container_name}-ipv[4|6]", using a subnet based on the hash of their name, so each CI job gets a separate network while the tests continue to see the addresses they expect.

    Increment them to 11.x.x.x and 1111:2222:x to avoid hitting (existing) dangling networks on machines.

    On successful runs, the networks are cleaned up. On failed runs they will remain (as they are being used by the failing container).

  2. ci: isolate local test networks
    Local CI jobs currently share Docker networks while requesting fixed
    routable addresses. That prevents two jobs from running at the same time
    because the second container cannot claim the same static IPs. See
    33362.
    
    Name the networks "{container_name}-ipv[4|6]", using a subnet based on
    the hash of their name, so each CI job gets a separate network while the
    tests continue to see the addresses they expect.
    7af6acc1ea
  3. ci: clean up local test networks
    Previously the (single, shared) networks were left in docker after runs,
    but with a network container this may get messy.
    
    Remove the IPv4 and IPv6 networks when the run is successful. On a
    failed run, networks will remain dangling and need manual pruning (same
    behaviour as previously).
    
    We can't remove networks automagically form failed runs without first
    killing the container (docker doesn't let you remove networks which are
    active), which we want to avoid so we can jump in to failures.
    d23a74aa1b
  4. DrahtBot added the label Tests on May 29, 2026
  5. DrahtBot commented at 7:54 PM on May 29, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35417.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept ACK fanquake

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  6. willcl-ark commented at 7:56 PM on May 29, 2026: member

    Implements one apprach from #35416 (comment)

    I tried other ways of generating deterministic networks here (we have prcedent for using 'os.getpid()`), but I think in the end this is probably the most robust idea.

    IMO cleaning up the networks is nicer, but I can drop that commit if it's not wanted for some reason unknown to me currently (or i can squash it).

    Also open to other solutions here.

  7. fanquake commented at 8:01 PM on May 29, 2026: member

    Concept ACK - thanks for following up here.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-31 17:50 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me