x/build: use Cloud Run #31834
Labels
Builders
x/build issues (builders, bots, dashboards)
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Performance
Milestone
There are a lot of interesting things we could do with Cloud Run for the Go build system.
The make.bash step would be great, but at Cloud Run's 1 vCPU, that takes 4.5 minutes. If they add support for cranking that up, we plateau pretty flatly around 4 vCPUs (1m45s). It doesn't get much better than 1m15s even with 96 CPUs. So 4 vCPUs would be great. But that's not available.
But we could also wrap each make.bash tool invocation (compile, link, etc) with a toolexec wrapper, and run each step remotely as its own Cloud Run call. We'd need to inject a VFS into the remote call with some private syscall and/or os package hooks, as Cloud Run doesn't permit FUSE or NFS or anything in the kernel. (It's gVisor)
So Cloud Run for make.bash naively is too slow today with its 1 vCPU (4.5 minutes) and doing make.bash quickly on Cloud Run today requires some time consuming (but straight forward) work for the VFS and wrappers.
But tests today are easy...
We can do make.bash elsewhere, and then use Cloud Run to massively shard the test execution.
With a make.bash snapshot,
go tool dist test --list
to find all the testsgo test -list . unicode/utf8
to get all theTestFoo
names, then:utf8.test -short -vet=off -run=^TestEncodeRune$
, etc.Cloud Run's default quota (before asking for it to be raised) permits 1,000 instances. We'd need to lock down concurrency to 1 call per service (probably), but 1,000 test executions in parallel SGTM.
I hacked up a super rough prototype today that's promising.
/cc @dmitshur
The text was updated successfully, but these errors were encountered: