Route GVFS endpoints to dedicated cache servers - #2103
Open
Derrick Stolee (derrickstolee) wants to merge 4 commits into
Open
Route GVFS endpoints to dedicated cache servers#2103Derrick Stolee (derrickstolee) wants to merge 4 commits into
Derrick Stolee (derrickstolee) wants to merge 4 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
Contributor
Author
It has now been vetted. |
tyrielv
self-requested a review
August 31, 2026 18:39
Contributor
|
InProcessMount.cs looks like it needs a call to |
Contributor
Author
|
🤖 Agreed - I am tracing this cache resolution path and will preserve the endpoint-specific overrides here as well. AI response generated by rocket |
Contributor
Author
|
🤖 Fixed in AI response generated by rocket |
tyrielv
reviewed
Aug 31, 2026
tyrielv
left a comment
Contributor
There was a problem hiding this comment.
Machine-drafted review (Review Swarm), reviewed and approved by me before posting. Five inline notes below; the circuit-breaker one is the load-bearing item.
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>
Derrick Stolee (derrickstolee)
force-pushed
the
gvfs-endpoint-config
branch
from
September 2, 2026 15:13
5aabfa2 to
63f8dc0
Compare
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>
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.
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/sizesendpoint is unique to VFS for Git, so this change adds the correspondinggvfs.sizes.cache-serversetting alongside the prefetch, GET, and POST settings used by Scalar.Commit Narrative
gvfs cloneoptions; preserve overrides during mount-time cache resolution.Routing and Fallback Behavior
gvfs.prefetch.cache-serverroutes/gvfs/prefetch.gvfs.get.cache-serverroutes object GET requests.gvfs.post.cache-serverroutes object POST requests.gvfs.sizes.cache-serverroutes/gvfs/sizes.gvfs.cache-server.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.
OperationCanceledExceptionpropagates without retry or fallback. Fallback and terminal prefetch diagnostics include only URI authority, excluding credentials, paths, queries, and fragments.Clone and Configuration Surface
gvfs cloneaccepts--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 --getand--setcontinue to operate only on the global cache setting. Endpoint-specific values can be inspected or changed withgit config --local.Related microsoft/git Changes
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.