Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProductUpgradeTimer: remove unacceptable Environment.Exit() #1668

Merged
merged 1 commit into from
May 28, 2020

Conversation

derrickstolee
Copy link
Contributor

A user reported an issue via the Teams channel. Looking at the diagnose logs I saw that the user's GVFS.Service was restarting in a loop with an exception tracking down to this Environment.Exit() call.

It's completely unacceptable to exit here, as it kills the service and then it restarts. Better to have no upgrades than to let this continue.

The cause of this exception was a missing executable when checking ProjFS.IsGVFSUpgradeSupported(), which seems to call PowerShell. The only reason the stack would have a Win32Exception with "The system cannot find the file specified" is that powershell.exe is not on the PATH, which was fixed in #1658.

@derrickstolee derrickstolee merged commit 55b7f52 into microsoft:master May 28, 2020
derrickstolee added a commit to microsoft/scalar that referenced this pull request May 28, 2020
…r Git

Scalar was created by forking the VFS for Git codebase, deleting a bunch of code, then renaming a bunch of files. It has since diverged significantly through many refactors.

One thing that has _never worked_ is the `scalar upgrade` verb when using GitHub as the source. The reason is that we package our releases differently than VFS for Git does, so the upgrader fails to find the Git installer and Scalar installer (instead, we have two `.zip` files, one for each platform). Since we are moving to another system for the typical upgrade pattern, we should just delete the GitHub upgrader. The `scalar upgrade` verb will remain for the NuGet feed, when configured. This resolves #351.

An issue was found in VFS for Git where the service would restart constantly when checking for an upgrade. The root cause was a problematic `Environment.Exit()` call. See microsoft/VFSForGit#1668 for an equivalent change.

Another annoying thing is the verbose output during `scalar clone` that repeats the given options. In the case of a non-GVFS protocol clone, some of these just don't make sense. Delete this output for clarity.

Finally, `scalar clone` failed miserably when using a non-standard URL such as `file://`. Fix that by doing some URL scanning in advance. If the URL does not start with `http://` or `https://`, we will not even try the GVFS protocol and will move on to a native Git clone. We also avoid any protocol prefix (`X://`) that is not `http://`, `https://` or `ssh://`. For SSH, the protocol prefix is not required, so we do not require a protocol prefix. Resolves #378.

Since this is a grab-bag of things, please review commit-by-commit. For the GitHub upgrader removal, consider ignoring whitespace changes.
derrickstolee added a commit that referenced this pull request Jun 2, 2020
Includes the following pull requests:

* #1663: Update Git to v2.27.0
* #1669: Docs: more troubleshooting and FAQs
* #1668: ProductUPgradeTimer: remove unacceptable Environment.Exit()
* #1664: Update USN journal entries for projected folders
* #1666: Docs: start basic template
* #1658: ProjFSFilter: Be more robust to missing PowerShell
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.

2 participants