The stand-in gc and the server's GcService handler #4
Loading…
Reference in a new issue
No description provided.
Delete branch "standin-gc"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
spec-bb1.34, first part: the stand-in
gcand the server's side ofGcService. Stacked on #3: until it merges the diff shows its commit; I rebase then.roomcity gc(internal/standin): readsROOMCITY_SESSIONandROOMCITY_SERVER, sends args, stdin (read to its end), theGC_*variables and the directory throughGcService.Run, writes the answer's stdout and stderr, and exits with its code. A server it cannot reach is exit 1 and a line on stderr.internal/gchandler:New(Config{CityDir, GcPath, Env}) *Handler, aroomcityv1connect.GcServiceHandler; roomcity-9a mounts it withroomcityv1connect.NewGcServiceHandler. It runs gc inCityDir(not the session's directory), the server's environment under the session'sGC_*(other variables of the request are dropped), and returns a non-zero exit as an answer, a gc that does not start asCodeInternal.Not here, and open on the ticket: that the three hooks give the right result when the real gc runs on the server's disk.
Verified:
go vet ./...andgo test ./..., includingroomcity gcend to end against the handler with a scripted gc.bd8254420a3713291ed03713291ed04e331bc96e