Skip to content

Remove some leftover pain points from VFS for Git#381

Merged
derrickstolee merged 4 commits intomicrosoft:masterfrom
derrickstolee:clone-verb-updates
May 28, 2020
Merged

Remove some leftover pain points from VFS for Git#381
derrickstolee merged 4 commits intomicrosoft:masterfrom
derrickstolee:clone-verb-updates

Conversation

@derrickstolee
Copy link
Contributor

@derrickstolee derrickstolee commented May 28, 2020

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.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Copy link
Contributor

@jeffhostetler jeffhostetler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I'm understand the subtleties of the ProductUpgrader commit and GH vs NuGet changes, but everything else looks good.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
@derrickstolee
Copy link
Contributor Author

I'm not sure I'm understand the subtleties of the ProductUpgrader commit and GH vs NuGet changes, but everything else looks good.

I deleted the GitHubUpgrader which never worked for Scalar. It may have lost some test coverage because the GitHubUpgrader was used as a mock for the orchestrator. I did manually verify that scalar upgrade will show an error message (but fail gracefully) if we haven't configured a private NuGet feed.

@derrickstolee derrickstolee merged commit c2ed93b into microsoft:master May 28, 2020
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.

Scalar clone fails on local repo paths scalar upgrade fails with "Could not find Git installer in the latest release"

2 participants