[Bug]: sbx CI jobs fail on kit build, network policy and ExampleContainer_Host
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
Research direction
Start with the Test core using sbx workflow and the named failures: TestRealSandboxKits, internal/core.TestExtractDockerHost, and ExampleContainer_Host. Check how the workflow configures buildx and sandbox network policy, then compare the expected container host with the sbx runtime output. Done when these failures pass in the sbx jobs; the issue also mentions reaper race failures addressed by #3868.
Written by the indexing model from the issue text.
Description
Testcontainers version
v0.46.0 (main, 3d48472a)
Using the latest Testcontainers version?
Yes
Host OS
Linux, GitHub Actions ubuntu-24.04 runners in the Test core using sbx jobs
Host arch
x86_64
Go version
1.26.10 and 1.27.3
Docker version
sbx v0.51.0 (docker-sbx 0.51.0-1~ubuntu.24.04~noble from Docker's apt repository), sandbox Engine 29.9.2
Docker info
Operating System: Docker Hardened Images/Debian GNU/Linux 13 (trixie) (containerized)
What happened?
The Test core using sbx jobs fail on main and on same-repository pull requests that touch the sbx paths, so the end check fails for them. They failed this way on main on 5 November (run 42075741888) and on #4095 (run 42373890168), both with sbx v0.51.0. At the #3987 merge on 25 October they failed earlier, on auth login failed: invalid Docker credentials. Most runs skip these jobs, so the failures have gone unnoticed.
Three of the failures come from the sbx environment rather than from the code under test.
TestRealSandboxKits fails to build its test kit, as the runner's buildx uses the docker driver, which doesn't support the OCI exporter the kit build needs.
internal/core.TestExtractDockerHost panics when the sbx provider creates its sandbox, as no global network policy has been initialized. The workflow runs sbx --app-name "$TESTCONTAINERS_SBX_APP_NAME" policy init allow-all, which appears to cover only that app name, while this sandbox is created without it. This is a hypothesis I haven't confirmed in the sbx module.
ExampleContainer_Host expects localhost as the container host, but under sbx it is 127.0.0.1, the runtime's published host.
The other failures in these jobs, TestGenericReusableContainerInSubprocess and TestReaper_ReuseRunning, are reaper races that sbx's slower container start makes likely, and are fixed by #3868.
Relevant log output
error: resolve kits: kit "./testdata/test-tools": build kit ./testdata/test-tools: exit status 1 ERROR: failed to build: OCI exporter is not supported for the docker driver. Switch to a different driver, or turn on the containerd image store, and try again. Learn more at https://docs.docker.com/go/build-exporters/
--- FAIL: TestRealSandboxKits
panic: initialize provider "sbx": sbx create: exit status 1: error: global network policy has not been initialized
FAIL internal/core.TestExtractDockerHost/Docker_Host_is_extracted_just_once
--- FAIL: ExampleContainer_Host
got:
127.0.0.1
true
want:
localhost
true
Additional information
@mdelapenya, as these came in with the sbx runtime provider in #3987, could you take a look? Pull requests from forks skip these jobs, so #3868 can't show its fix for the reaper races under sbx until it is rebased onto a branch in this repository.
- Dominant language
- Go
- Stars
- 5k
- Forks
- 660
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 48
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from testcontainers/testcontainers-go
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
testcontainers/testcontainers-go#4143 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
testcontainers/testcontainers-go#4142 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
testcontainers/testcontainers-go#4120 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug]: `DockerImageAuth` fails in FIPS 140-only mode: `configKey` uses `crypto/md5`, so image pulls fall back to empty credentialsPossibly taken @spor3006 claimed this 27 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
testcontainers/testcontainers-go#4080 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug]: root module still requires vulnerable github.com/moby/go-archive v0.2.0 (GHSA-hfg8-hc9c-6c3h)Open
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
testcontainers/testcontainers-go#3913 · 1 comment · 6 reactions ·
Maintainers usually reply within 1 day
All issues in testcontainers/testcontainers-go
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openclaw/crabbox#3249 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
ec2-subnet, security-group and internet-gateway skip all resources when one is deleted during the scanPossibly taken @toabctl claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
gruntwork-io/cloud-nuke#1208 ·
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
snowflakedb/gosnowflake#1872 ·