Closes #262. The git edge served only the repositories listed in GIT_EDGE (flagon-io/g1t). Now every repository uses it by default, with nothing to configure.
Config
GIT_EDGE(repos) ison.offturns the edge off everywhere during an incident, and every read goes to Artifacts. An-owner/nameentry leaves that repository out, for exampleon, -acme/rocket. A bareowner/nameentry (the old allow-list syntax) is ignored.
Cold and rarely read repositories are no slower than before
- A cold edge already answered a read with a
503 coldright away and started in the background, so Artifacts answered the read. But every request in a clone (info/refs, ls-refs, fetch) still made one hop each to the runner and the Durable Object. Now, when a repos isolate gets a cold, failing or unreachable answer, it sends that repository's reads straight to the store for 30 s. If the runner has no edge deployed (x-g1t-edge: off), it does so for 10 min. A409 behindis not held off, because the edge catches up within moments. (git_edge::rest_after,resting)
Containers
- Pushes: a push used to sync the edge, which starts its container. Now a push wakes an edge that is asleep only if its repository was read in the last 24 h. The
GitEdgeobject records reads in its storage, at most once every 10 min. A running edge still catches up with every push. A sync after a read the edge missed still starts it. - Instance limit: at
max_instances,startAndWaitForPortsspends up to 60 s retrying. Reads were never slowed by this, because they don't wait for a start. Now an edge that failed to start waits 2 min (START_REST_MS) before trying again, and Artifacts answers its reads in the meantime. max_instances: raised from 20 to 50. With the sandboxes, the total is 230 vCPU, 900 GiB and 1,680 GB, well inside the account limits.
Private repositories
The edge is only asked after authorize_git has authorized the read, the same as any read of the store. The runner Worker has no route of its own (workers_dev: false, no routes), so only bound services can reach /gitedge/….
Tests
- Rust:
git_edge_serves_every_repository_unless_it_is_off_or_left_out,a_cold_edge_is_left_alone_while_it_starts - TS:
a push wakes an edge asleep only when its repository was read in the last day,every read is noted, whether the edge answers it or is cold