Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
x/build: use Cloud Run #31834
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,
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.