Repository navigation
server: serve Go and sccache on organization hosts - #43
Merged
Merged
Conversation
An organization host answered every request as a Nix read, so the Go
and sccache caches were reachable only under /_api/v1/<product>/<org>/
<cache> on the shared host. Customers should configure one address
shape, <org>.<suffix>/<cache>/<product>.
The cache router now registers /{cache}/go and /{cache}/sccache with
their trailing forms. On an organization host their handler rewrites
the path to the canonical protocol route and dispatches it into a
router holding only the Go and sccache routes, so authorization, limits,
and storage are the existing handlers' and management or upload routes
stay unreachable from an organization host. On any other host the same
shape remains a path-based Nix read, which keeps caches named go or
sccache working. PROPFIND answers with the path the client used.
Two things change shape. On an organization host, a product path with a
method the protocol rejects now gets the protocol's JSON 404 or 405
instead of the Nix read's 405. Requests matching the new routes are
labelled with them in metrics rather than as cache reads.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First of three stacked PRs for Polymath-AS/snowstead-service#20.
Serves Go and sccache at
<org>.<suffix>/<cache>/<product>on organization hosts. The/_api/v1/<product>/<org>/<cache>addresses keep working and read the same entries.goorsccacheare unaffected (covered by tests, no new reserved names).tests/org_host.rscovers auth, cross-organization isolation, method and path edge cases, andno-storeon every response.test/compiler.mjsruns realgoandsccacheclients against both addresses.Behavior changes: on an organization host, product-shaped paths now return the protocol's JSON 404/405 where the Nix read returned 405; matching requests get new route labels in metrics.
pnpm checkpasses.