Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
x/build: make GOROOT read-only before running tests #30316
Is it better to catch regressions to #28387 by making builders have a read-only GOROOT and hope that tests fail if they try to write, or by having a writeable GOROOT and try to verify (after tests have finished running) that GOROOT hasn't been modified?
I'm not sure if it's viable to do the latter, but I wanted to ask so that we consider it.
@dmitshur, we could do both, but it is more important to run with a read-only GOROOT and check for failing tests: tests that leave changes behind are easy for developers to detect (via
The latter category is still harmful, since they will fail when users run
Ephemeral changes can also interfere with proper cache invalidation, so we should avoid them even if GOROOT is writable.
referenced this issue
Feb 21, 2019
The buildlet already has a recursive file list endpoint, so the build system could also just look at all files before & after a test run to see if there are any differences. This is what x/build/cmd/gomote does to decide how to incrementally push files from developer machines to buildlets.
That might be faster in that it's only doing read operations and not writes.