ci: isolate container test networks #36435

pull maflcko wants to merge 2 commits into bitcoin:master from maflcko:2610-ci-network changing 3 files +32 −15
  1. maflcko commented at 10:14 AM on October 5, 2026: member

    Fixes #35416, by:

    • First, a general CI cleanup to use one network per CI container and remove it after success
    • Then, to use one subnet per container and a unique IP in that subnet (to avoid collisions)
  2. ci: Use one network per container and rm it after success
    The networks were left around for the next run, which may cause issues
    when they are changed in a future CI change.
    
    Fix it by using one network per container, and by cleaning it up after a
    successful run.
    
    This also allows to harden the script by removing the check=False on
    creation.
    
    On a failed run, networks will remain dangling and need manual pruning
    (same behaviour as before).
    fae564e66a
  3. ci: Use one subnet per container
    This avoids collisions between concurrently running containerized CI jobs.
    fa966fd767
  4. DrahtBot commented at 10:14 AM on October 5, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK willcl-ark, sedited

    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-->

  5. maflcko renamed this:
    2610 ci network
    ci: isolate container test networks
    on Oct 5, 2026
  6. DrahtBot added the label Tests on Oct 5, 2026
  7. maflcko commented at 10:18 AM on October 5, 2026: member

    @willcl-ark This is a slightly different approach, based on your attempt from May (with my feedback addressed from #35417#pullrequestreview-4410066861 without causing a ci failure :sweat_smile: )

    You may be qualified to nack/ack. Also, do you want to be co-author of any of the commits?

  8. willcl-ark commented at 10:18 AM on October 5, 2026: member

    Yes was just taking a look here.

    do you want to be co-author of any of the commits?

    no thanks, I'm fine :)

  9. willcl-ark commented at 12:30 PM on October 5, 2026: member

    I seem to recall wondering about this previously, but do you think we should try to remove the network before creating, to avoid bumping into network creation issues after a failed run (where the user presumably kills the container but will forget to rm the network)?

    I don't mind strongly, but perhaps with a dedicated network per container this is even "safer" than before?

  10. maflcko commented at 12:55 PM on October 5, 2026: member

    I don't think the network can be removed before creating: The only case where it exists is when the run failed (and the container still exists). A network can not be deleted when the container exists, IIRC? Maybe there could be a CI_FORCE_FRESH_CONTAINER=1 setting?

    <!--

  11. willcl-ark commented at 10:25 AM on October 6, 2026: member

    Maybe there could be a CI_FORCE_FRESH_CONTAINER=1 setting?

    I don't think this is worth it, the error message is fine.

  12. willcl-ark approved
  13. willcl-ark commented at 10:26 AM on October 6, 2026: member

    ACK fa966fd76764a0e150f654d7c2760e58226edba5

    Code looks fine.

    Manually checked 3 or 4 Ci runs too to ensure they were using the correct names, e.g. on netbsd:

    + docker network create --ipv6 --subnet=1111:1111:14::/112 --subnet=11.11.20.0/24 ci_netbsd_cross-net
    
  14. willcl-ark approved
  15. willcl-ark commented at 1:08 PM on October 6, 2026: member

    ACK fa966fd76764a0e150f654d7c2760e58226edba5

  16. sedited approved
  17. sedited commented at 1:25 PM on October 6, 2026: contributor

    utACK fa966fd76764a0e150f654d7c2760e58226edba5

  18. sedited merged this on Oct 6, 2026
  19. sedited closed this on Oct 6, 2026

  20. maflcko deleted the branch on Oct 6, 2026
  21. fanquake referenced this in commit c4c42177d1 on Oct 6, 2026
  22. fanquake referenced this in commit 54ae12e53c on Oct 6, 2026
  23. fanquake commented at 7:00 PM on October 6, 2026: member

    Backported to 32.x in #36427.


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-10-07 08:51 UTC

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