Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,17 @@ EOF, connection resets/timeouts, temporary DNS failures, and HTTP 408, 429,
500, 502, 503, and 504. Authentication, missing repositories, certificate
validation, local filesystem errors, and unknown failures are not retried.
Classification uses Git's English stderr diagnostics; the child locale is fixed
to `C`. Retry logs contain the operation, attempt, delay, and error category,
without raw upstream stderr or credentials.
to `C`. Retry logs contain the operation, attempt, delay, and error category.

An operation that still fails is logged once, as `upstream operation failed`,
with its operation, repo, `error_kind`, elapsed time, and a summary of git's
stderr. The summary is the last 8 lines, capped at 1 KiB, because `remote:`
lines are upstream-controlled text. Git already strips credentials from URLs in
its own diagnostics; the proxy repeats that, redacts `Authorization` and
`Cookie` values and the credential in use, and removes inherited `GIT_TRACE*`
and `GIT_CURL_VERBOSE` so trace output never reaches stderr. The stderr stays
out of the returned error, which callers may surface. A cancelled operation (the
client went away, or shutdown) is logged at debug, not as a failure.

Retries stay inside the existing per-repository lock. Each failed clone's staging
directory is removed before another attempt; an existing fetch mirror is kept.
Expand Down
4 changes: 3 additions & 1 deletion docs/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ Label values:
`serve_duration_seconds`: `info_refs` (the buffered ref advertisement) or
`upload_pack` (the packfile stream, timed to EOF).
- `result` on `requests_total`: `ok`, `error`, `upstream_error`, `unauthorized`,
`rejected`. On `upstream_ops_total`: `ok` or `error`. On `lfs_objects_total`:
`rejected`. On `upstream_ops_total`: `ok` or `error`, once per operation after
retries; an operation cancelled because the client went away or the proxy is
shutting down is not counted. On `lfs_objects_total`:
`hit` (served from disk), `miss` (fetched from upstream, then cached), `error`.
On `auth_validations_total`: `allow`, `deny`, `unavailable` (the endpoint
failed, throttled, or answered something else), `saturated` (no call made: no
Expand Down
Loading
Loading