Skip to content

Run upstream tests on images in CI here#555

Open
tianon wants to merge 1 commit intodocker-library:masterfrom
infosiftr:dist-test
Open

Run upstream tests on images in CI here#555
tianon wants to merge 1 commit intodocker-library:masterfrom
infosiftr:dist-test

Conversation

@tianon
Copy link
Member

@tianon tianon commented Feb 14, 2025

This runs upstream's dist test which is roughly go test std cmd.

Fixes #552

@tianon
Copy link
Member Author

tianon commented Feb 14, 2025

Ouch, I knew they'd be rough, but 10-11 minutes is even heavier than I was picturing.

@tianon
Copy link
Member Author

tianon commented Feb 15, 2025

On the upside, total "wall clock" for https://github.com/docker-library/golang/actions/runs/13339366508 (current master) is ~23m 56s and https://github.com/docker-library/golang/actions/runs/13338265228 (this PR) is ~30m 36s.

@yosifkit
Copy link
Member

I agree to adding tests to ensure that the go binaries work as expected in the container environment but the comparison to the most recent run on master is not quite accurate since it took so long because of the Windows 2025 failures (cancelled last week in 22m 59s). Looking at runs before that like https://github.com/docker-library/golang/actions/runs/13297417083 and the complete wall clock is ~14 minutes but greatly slowed by pulling windows images 😢. It's complicated. 🫤

I think the biggest extra slowdown is the serial testing of 1.24 and then tip, though I am unsure if running multiple dist test at the same time will be significantly faster since it is CPU heavy. But, running the DOI tests in parallel is not something we can change in this repo.

# the "dist" tool doesn't query Go for GOROOT and expects it to be set explicitly
sh -xec 'GOROOT="$(go env GOROOT)" && export GOROOT && exec "$@"' --

# ideally this would just be "go tool dist test" but it isn't built by default (because most users don't need it)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh neat, this gets better in 1.25+: https://go.dev/doc/go1.25#go-command

The Go distribution will include fewer prebuilt tool binaries. Core toolchain binaries such as the compiler and linker will still be included, but tools not invoked by build or test operations will be built and run by go tool as needed.

(go tool dist test "just works" in 1.25+)

This runs upstream's `dist test` which is roughly `go test std cmd`.
@tianon
Copy link
Member Author

tianon commented Feb 11, 2026

"Build: 20s, Test: 15.5m" does not feel good - I'm very torn here. I think this is valuable, but it's way too heavy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add go test std to image tests

2 participants