Skip to content

[pull] master from microsoft:master - #147

Merged
pull[bot] merged 5 commits into
cgallred:masterfrom
microsoft:master
Sep 4, 2026
Merged

pull[bot] merged 5 commits into
cgallred:masterfrom
microsoft:master

Conversation

@pull

@pull pull Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

derrickstolee and others added 5 commits September 2, 2026 11:11
Context:
The microsoft/git GVFS helper supports endpoint-specific cache servers so cache infrastructure can be migrated independently. VFS for Git previously sent every protocol request to one global URL.

Justification:
Use the same gvfs.<endpoint>.cache-server keys and clone option names as Scalar. Keeping endpoint preferences on CacheServerInfo centralizes precedence and lets mount-time cache resolution preserve the configured routes.

Implementation:
Load, persist, and validate overrides for prefetch, object GET, object POST, and sizes requests. Add matching clone options, retain the global cache as the default, preserve overrides while resolving cache identity, and cover configuration, CLI parsing, and mount resolution.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Context:
Endpoint-specific cache servers are preferences above the global cache, but failures previously terminated requests instead of using the healthy fallback route. Early fallback handling also charged abandoned attempts to the process-wide circuit breaker, confused cancellation with transport failure, and exposed excess URI data in telemetry.

Justification:
Treat route failover separately from transient retry accounting. Cancellation remains control flow, local processing errors stay on the active route, and network-body failures alone can move a request to the global cache. Authority-only metadata preserves diagnostics without exposing credentials or request details.

Implementation:
Fall back prefetch, object GET, object POST, and sizes requests through the global cache, with sizes retaining its final origin fallback. Track response-stream failures, preserve circuit-breaker budget across route transitions, propagate cancellation unchanged, validate endpoint URLs, and emit redacted fallback telemetry. Add focused coverage for HTTP, transport, body-read, local-write, cancellation, telemetry, and terminal failures.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Context:
Administrators need to understand how dedicated GVFS endpoint caches interact with the existing global cache and with gvfs cache-server commands.

Justification:
Documenting precedence and fallback behavior alongside the configuration keys makes staged cache migrations predictable and preserves the distinction between global and endpoint-specific settings.

Implementation:
Describe the clone options, local Git config keys, endpoint-to-global fallback order, the sizes-to-origin fallback, and troubleshooting guidance for inspecting or changing endpoint overrides.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Context:
The prefetch entry point now reports only URI authority when a request fails, but requestor-level tests did not execute the warning and unsupported-command telemetry paths that consume the terminal request URI.

Justification:
Exercise the production composition directly so future changes cannot reintroduce credentials, paths, queries, or fragments into prefetch failure diagnostics. These focused cases also raise changed-line coverage above the repository threshold without relying on incidental functional-test execution.

Implementation:
Add a deterministic prefetch requestor that returns terminal HTTP failures. Verify both general failure warnings and not-supported events emit only the host and port from a credential-bearing request URI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
## Why This Matters

The microsoft/git GVFS helper can route protocol endpoints to dedicated cache servers, but VFS for Git previously sent every protocol request to one global cache URL. Supporting the same endpoint-specific preferences lets cache infrastructure migrate incrementally without making a dedicated endpoint a hard dependency.

The `/gvfs/sizes` endpoint is unique to VFS for Git, so this change adds the corresponding `gvfs.sizes.cache-server` setting alongside the prefetch, GET, and POST settings used by Scalar.

## Commit Narrative

1. **Route GVFS endpoints to dedicated cache servers**: load, persist, and validate endpoint overrides; add matching `gvfs clone` options; preserve overrides during mount-time cache resolution.
2. **Fall back safely from dedicated cache endpoints**: retry failed endpoint requests through the global cache, preserve circuit-breaker budgets, distinguish network body failures from local processing errors, propagate cancellation unchanged, and emit authority-only telemetry.
3. **Explain endpoint-specific cache routing**: document configuration, precedence, fallback order, and troubleshooting.
4. **Cover prefetch failure telemetry redaction**: exercise terminal prefetch failures at the production entry point and ensure diagnostics retain only URI authority.

## Routing and Fallback Behavior

- `gvfs.prefetch.cache-server` routes `/gvfs/prefetch`.
- `gvfs.get.cache-server` routes object GET requests.
- `gvfs.post.cache-server` routes object POST requests.
- `gvfs.sizes.cache-server` routes `/gvfs/sizes`.
- If an endpoint-specific route is absent or fails, the request uses `gvfs.cache-server`.
- Sizes requests can additionally fall back from the global cache to origin.
- Existing repositories without endpoint overrides retain their previous behavior.

Endpoint-to-global transitions do not consume the process-wide circuit-breaker budget. Response-body transport failures can trigger fallback, while local processing failures remain on the current route. `OperationCanceledException` propagates without retry or fallback. Fallback and terminal prefetch diagnostics include only URI authority, excluding credentials, paths, queries, and fragments.

## Clone and Configuration Surface

`gvfs clone` accepts `--prefetch-cache-server-url`, `--get-cache-server-url`, `--post-cache-server-url`, and `--sizes-cache-server-url`. Values are stored in local Git config and malformed absolute URLs are rejected.

`gvfs cache-server --get` and `--set` continue to operate only on the global cache setting. Endpoint-specific values can be inspected or changed with `git config --local`.

## Related microsoft/git Changes

- [microsoft/git#836: gvfs-helper: add config to incrementally replace cache servers](microsoft/git#836)
- [microsoft/git#849: scalar: add endpoint cache-server clone options](microsoft/git#849)

## Tests

Coverage includes configuration precedence and persistence, mount-time resolution, clone option parsing and URL validation, endpoint/global/origin routing, HTTP and transport failures, response-body failures, local handler failures, cancellation propagation, telemetry redaction, terminal endpoint reporting, and circuit-breaker accounting.
@pull pull Bot locked and limited conversation to collaborators Sep 4, 2026
@pull pull Bot added the ⤵️ pull label Sep 4, 2026
@pull
pull Bot merged commit 113b3f9 into cgallred:master Sep 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant