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

[Release] milestones/M171 #1671

Merged
merged 31 commits into from
Jun 2, 2020
Merged

[Release] milestones/M171 #1671

merged 31 commits into from
Jun 2, 2020

Conversation

derrickstolee
Copy link
Contributor

Includes the following pull requests:

kewillford and others added 30 commits April 15, 2020 14:32
… related classes

Add Readme.md for the GitIndexProjection and related classes
A user had issues and we started a support line. Their diagnose log
had _thousands_ of service logs. These were all failing with a call
stack pointing to the method changed here.

The only explanation I can think of is that PowerShell is not
available on their system!

Signed-off-by: Derrick Stolee <[email protected]>
This will throw a new PowershellNotFoundException if not found, but
this is a private static method. One caller catches this exception
explicitly, and then returns an "invalid" mode. The only other
caller only happens if the first returns "disabled" instead.

Signed-off-by: Derrick Stolee <[email protected]>
…of a file

Add Readme.md for the virtualization states of a file
…erShell

A user had issues and we started a support line. Their diagnose log
had _thousands_ of service logs. These were all failing with this call
stack pointing to the method changed here:

```
System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
 at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at GVFS.Common.ProcessHelper.StartProcess(Process executingProcess)
    at GVFS.Common.ProcessHelper.Run(ProcessStartInfo processInfo, String errorMsgDelimeter, Object executionLock)
     at GVFS.Platform.Windows.ProjFSFilter.IsGVFSUpgradeSupported() in E:\\A\\_work\\822\\s\\GVFS\\GVFS.Platform.Windows\\ProjFSFilter.cs:line 371 
       at GVFS.Upgrader.InstallerPreRunChecker.IsGVFSUpgradeAllowed(String& consoleError) 
        at GVFS.Upgrader.InstallerPreRunChecker.TryRunPreUpgradeChecks(String& consoleError) 
          at GVFS.Service.ProductUpgradeTimer.TimerCallback(Object unusedState) in E:\\A\\_work\\822\\s\\GVFS\\GVFS.Service\\ProductUpgradeTimer.cs:line 168
```

The only explanation I can think of is that PowerShell is not
available on their system!
To update the USN journal entries for a projected folder, we
previously computed the new hash based on the contained files and their
contents.

Let's also include the file and folder names.

Signed-off-by: Derrick Stolee <[email protected]>
Add new "usn.updateDirectories" boolean config option. This is set in
the system-wide config, and requires remounting for the config to take
effect.

Signed-off-by: Derrick Stolee <[email protected]>
We don't have a lot of user-facing documentation. Someone owns [VFSforGit.org](https://vfsforgit.org/) but I don't know who. (@ethomson probably knows.)

However, it would be better to have a set of docs in the repo. This provides some basic info for using VFS for Git, especially around the happy path.

To finish #1665, I will update the troubleshooting docs with more advice around the not-so-happy paths.
…lders

This replaces #1648.

BuildXL was having issues detecting that a folder had changes when the projection changed because VFSForGit was simply updating its in memory projection and not doing anything with the file system that would trigger and update to the USN. It would hand back the new items in the directory when ProjFS would ask for the items for enumeration the next time an enumeration happened.

This change is to make the folder get a new USN when VFSForGit determines that a folder has changed.  This is done by keeping a SHA1 hash of all the names of the folder entries that are in the projection. When the projection changes, calculate the new SHA for the folder and compare with what it had before.  If it changed, then write and delete a file in the folder to trigger the USN update.

**Note:** We don't need any upgrade step because we are already storing the SHA for the folder in the placeholder database but it is currently `null` for all folders so the first time there is a projection change it will cause all the folders to get the calculated SHA for the folder and update the placeholder database. 

Tasks:

- [X] Update folder SHA-1 calculation to depend only on child names, not contents.
- [x] Get installer to BuildXL folks for validation.
- [x] Place this behavior behind a config option.
- [ ] Document the config option. (Delaying to #1665)
- [ ] Update functional test to run in CI and PR validation (behind config). (The test is updated to work behind the config, but the `fsutil usn readdata <path>` command isn't working in CI. Tested locally.)
…vironment.Exit()

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.
Co-authored-by: Johannes Schindelin <[email protected]>
More progress towards #1665:

1. Add some troubleshooting steps from the private wiki and recent issues.
2. Add FAQs around macOS port and Scalar.

The release process needs to be documented, but it includes private info so that will happen in a private repo.
Signed-off-by: Derrick Stolee <[email protected]>
Signed-off-by: Derrick Stolee <[email protected]>
See microsoft/git#271.

Updates necessary here:

* The `multi-pack-index` builtin started honoring `repack.packKeptObjects`, which is `false` by default. We want to repack the `.keep` pack because that is just the most-recent prefetch pack-file. We don't expire it, but we want to repack it.

* The `sparse-checkout` code changed some error messages and behavior, so the `reset --mixed` tests no longer reflect an exact behavior match to vanilla Git (without sparse-checkout). Since VFS for Git dynamically sparsifies, we can't exactly match the behavior in the control repo.
@derrickstolee derrickstolee merged commit a05334b into releases/shipped Jun 2, 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.

3 participants