Skip to content

Gate CLI mount-progress display behind gvfs.mount-progress config#2055

Open
tyrielv wants to merge 1 commit into
microsoft:masterfrom
tyrielv:tyrielv/mount-progress-flag
Open

Gate CLI mount-progress display behind gvfs.mount-progress config#2055
tyrielv wants to merge 1 commit into
microsoft:masterfrom
tyrielv:tyrielv/mount-progress-flag

Conversation

@tyrielv

@tyrielv tyrielv commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

PR #2005 ("Show mount progress phases in CLI during gvfs mount") did two separable things:

  1. Reliability infrastructure (must keep): moved the named-pipe server start before the parallel auth+validation wait in InProcessMount.MountWithLockAcquired, plus a HandleRequest Mounting-state guard, volatile currentState, and a null-safe HandleGetStatusRequest. Opening the pipe early widens the WaitUntilMounted connect window: the "Unable to mount because the GVFS.Mount process is not responding" error only fires from the connect phase (60s interactive / 300s unattended); once connected, the GetStatus poll loop is untimed. So an early pipe converts a possible connect-timeout into an indefinite-but-progressing wait. This benefits the SYSTEM-service automount path (GVFSMountProcess uses the same WaitUntilMounted).

  2. Display layer (cosmetic): the MountProgress phase strings + CLI dynamic spinner.

Change

Adds a disabled-by-default gvfs.mount-progress config flag that gates only the display layer:

  • When off (default), HandleGetStatusRequest no longer populates response.MountProgress. WaitUntilMounted fires its onProgress callback only on non-empty progress, and ConsoleHelper renders just the base message when progress is empty — so the CLI falls back to its existing static spinner. No client-side changes needed.
  • The reliability infrastructure (early pipe start, Mounting guard, volatile currentState, null-safe GetStatus) is always on, independent of the flag.

Net effect for a stabilization prerelease: keep the automount robustness from #2005, hold back the newer progress-display behavior behind an opt-in (git config gvfs.mount-progress true).

Testing

  • dotnet build GVFS.Mount — clean (0 warnings, 0 errors)
  • Unit tests: 887 total, 876 passed, 0 failed, 11 expected skips

Notes

  • The MountProcessSnapshot / TryConnectWithProcessTracking early-exit connect tracking is a separate change (commit d98a2bb9) and is intentionally untouched.

PR microsoft#2005 restructured mount startup so the named pipe server starts
before the parallel auth+validation wait. That early-pipe move is a
reliability improvement -- it widens the WaitUntilMounted connect
window, avoiding "GVFS.Mount process is not responding" failures when
auth is slow (including the SYSTEM-service automount path) -- and is
separable from the progress-display feature layered on top of it.

Add a disabled-by-default gvfs.mount-progress config flag that gates
only the display layer. When off, the mount process no longer surfaces
MountProgress phase strings over the named pipe, and the CLI falls back
to its existing static spinner (ConsoleHelper already renders just the
base message when progress is empty). The reliability infrastructure --
early pipe start, HandleRequest Mounting-state guard, volatile
currentState, and null-safe HandleGetStatusRequest -- is always on
regardless of the flag, so stabilization builds keep the automount
robustness without shipping the newer progress-display behavior.

Assisted-by: Claude Opus 4.8
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
@tyrielv tyrielv force-pushed the tyrielv/mount-progress-flag branch from addd027 to 34666c4 Compare July 9, 2026 22:26
@tyrielv tyrielv marked this pull request as ready for review July 9, 2026 22:29
@tyrielv tyrielv enabled auto-merge July 9, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant