ci: isolate container test networks #36435

Manually merged
maflcko merged 2 commits from 2610-ci-network into master 2026-10-06 13:39:47 +00:00 AGit
maflcko commented 2026-10-05 10:14:52 +00:00 (Migrated from github.com)

Fixes https://github.com/bitcoin/bitcoin/issues/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)
Fixes https://github.com/bitcoin/bitcoin/issues/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)
DrahtBot commented 2026-10-05 10:14:59 +00:00 (Migrated from github.com)

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

External sites

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 <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

<!--e57a25ab6845829454e8d69fc972939a--> The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. <!--006a51241073e994b41acfe9ec718e94--> ### External sites * Code coverage & benchmarks: https://corecheck.dev/bitcoin/bitcoin/pulls/36435 * Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/36435.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/36435#author-ralph <!--021abf342d371248e50ceaed478a90ca--> ### Reviews See [the guideline](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#code-review) and [AI policy](https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md) for information on the review process. | Type | Reviewers | | ---- | --------- | | ACK | [willcl-ark](https://github.com/bitcoin/bitcoin/pull/36435#pullrequestreview-5427016869), [sedited](https://github.com/bitcoin/bitcoin/pull/36435#pullrequestreview-5429033222) | 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-->
maflcko commented 2026-10-05 10:18:02 +00:00 (Migrated from github.com)

@willcl-ark This is a slightly different approach, based on your attempt from May (with my feedback addressed from https://github.com/bitcoin/bitcoin/pull/35417#pullrequestreview-4410066861 without causing a ci failure 😅 )

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

@willcl-ark This is a slightly different approach, based on your attempt from May (with my feedback addressed from https://github.com/bitcoin/bitcoin/pull/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?
willcl-ark commented 2026-10-05 10:18:58 +00:00 (Migrated from github.com)

Yes was just taking a look here.

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

no thanks, I'm fine :)

Yes was just taking a look here. > do you want to be co-author of any of the commits? no thanks, I'm fine :)
First-time contributor

Base: 714261b508c237ce26b09b0e25f23262385b0152
Head: fa966fd76764a0e150f654d7c2760e58226edba5

No verified findings are available from this partial review.

Review coverage was incomplete. The archaeology review had incomplete evidence. The alternatives experiment had incomplete evidence.

Full review report

<!-- forgejo-review-bot:bitcoin/bitcoin --> Base: `714261b508c237ce26b09b0e25f23262385b0152` Head: `fa966fd76764a0e150f654d7c2760e58226edba5` No verified findings are available from this partial review. Review coverage was incomplete. The archaeology review had incomplete evidence. The alternatives experiment had incomplete evidence. [Full review report](<https://review.fish.foo/traces/36435-fa966fd76764a0e150f654d7c2760e58226edba5-403-1.html>)
willcl-ark commented 2026-10-05 12:30:31 +00:00 (Migrated from github.com)

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?

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?
maflcko commented 2026-10-05 12:55:28 +00:00 (Migrated from github.com)

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?

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? <!--
willcl-ark commented 2026-10-06 10:25:19 +00:00 (Migrated from github.com)

Maybe there could be a CI_FORCE_FRESH_CONTAINER=1 setting?

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

> Maybe there could be a CI_FORCE_FRESH_CONTAINER=1 setting? I don't think this is worth it, the error message is fine.
willcl-ark (Migrated from github.com) approved these changes 2026-10-06 10:26:52 +00:00
willcl-ark (Migrated from github.com) left a comment

ACK fa966fd767

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
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 ```
willcl-ark (Migrated from github.com) approved these changes 2026-10-06 13:08:24 +00:00
willcl-ark (Migrated from github.com) left a comment
ACK fa966fd76764a0e150f654d7c2760e58226edba5
sedited (Migrated from github.com) approved these changes 2026-10-06 13:25:08 +00:00
sedited (Migrated from github.com) left a comment

utACK fa966fd767

utACK fa966fd76764a0e150f654d7c2760e58226edba5
fanquake commented 2026-10-06 19:00:42 +00:00 (Migrated from github.com)

Backported to 32.x in #36427.

Backported to `32.x` in #36427.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bitcoin/bitcoin!36435
No description provided.