Skip to content

[Release] Milestone M155#1385

Merged
wilbaker merged 129 commits into
releases/shippedfrom
milestones/M155
Jul 31, 2019
Merged

[Release] Milestone M155#1385
wilbaker merged 129 commits into
releases/shippedfrom
milestones/M155

Conversation

@derrickstolee
Copy link
Copy Markdown
Contributor

@derrickstolee derrickstolee commented Jul 29, 2019

  • 1386 GVFS Health Feature

Mac

  • 1176 Platform native notifications PR_2
  • 1193 Mac ProjFS: Only hydrate/expand when deleting due to rename
  • 1202 Platform native notifications PR_3
  • 1215 Remove Placeholder after calling PreDelete
  • 1250 Mac: Switch on the UTF8 Tests
  • 1257 Mac: Bash Functional Test Hang
  • 1285 Installer reliability
  • 1318 Mac build scripts: consume git installer pkg directly
  • 1319 Don't change version number of dev builds
  • 1322 Script to generate GVFS.Installer.Mac nuspec
  • 1340 PrjFSKextLogDaemon: Don't log every time a dropped kext message is detected

Cross-Platform

  • 1267 Add logging to clone/mount paths
  • 1287 use repository relative paths in DiffTreeResult.TargetPath
  • 1301 simplify Git functional tests of case-sensitive file paths
  • 1320 Making max pipe length platform-dependant
  • 1375 Remove all TODO(POSIX) and TODO(Mac) comments

Git

  • 1283 Incremental commit graph
  • 1300 Update Git to include status deserialize fix
  • 1342 Update Git to include tracing updates
  • 1382 Update Git to include more tracing updates

Upgrade

  • 1224 ProductUpgrader: platform specific upgrade directories
  • 1225 Upgrader - platform specific directory creation
  • 1228 Upgrader: copy entire application directory
  • 1230 Upgrader: add command install action
  • 1234 Upgrader: implement cross platform functionality
  • 1268 NuGetUpgrader: fix issue with upgrader using interop services
  • 1270 VFSForGit Installer non-relocatable
  • 1284 Enable mac upgrade MVP
  • 1297 Upgrader: NuGet Upgrader should use GitHub endpoint for notifications
  • 1312 Use the new signing certificate
  • 1381 Upgrade: Fix test flakiness around upgrade reminders

FastFetch

  • 1291 use correct checkout thread maximum in FastFetch

Polish

  • 1241 Update heartbeats for folder placeholders and file hydration
  • 1257 Mac: Bash Functional Test Hang
  • 1263 Log Folder Placeholders Removed
  • 1281 PrefetchStep: don't send post-fetch request if no new packs
  • 1282 Remove requirement to run --no-renames
  • 1317 Setup.iss: Update GitHub URL
  • 1328 Move Enlistment Directory For Functional tests to ~/GVFS.FT
  • 1380 GitProcess: Catch InvalidOperationException when setting priority class

Backports from M153

  • 1259 Update Git to v2.22.0
  • 1276 POSIX: Switch to Process.Start for launching GVFS.Mount
  • 1278 Fix performance regression in LibGit2RepoInvoker

nickgra and others added 30 commits June 6, 2019 16:59
Initial implementation of additional fields on the FileSystemCallbacks
heartbeat to cover folder placeholder creation and file hydration.

Includes plumbing changes to route the image path name through for
folder placeholders and file hydration.
Instead of querying interop services at runtime (with a dll that is not
included with the windows install), determine this at compile time using the
under construction flags.
Add new helper to 'swap' the ConcurrentDictionary, move away from
managing EventLevel by passing a ref to passing an out bool.

Rename methods for clarity that were brought up in code review
Upgrader - platform specific directory creation
This change moves the vnode eligibility check (file system type, vnode type) from ShouldHandleVnodeOpEvent to HandleVnodeOperation to avoid repeated calls.

A unit test has been added to provide test coverage for the new code branch.
This adds an enum scoped in a namespace to be used instead of magic numbers in version checks.

The reasons for choosing a classic enum in a namespace are:
 * The namespace gives us explicit scoping rather than polluting the root namespace.
 * The using a classic enum vs a modern C++ enum class means the values are implicitly convertible to integers, which is how we actually use them.
Replaces a use of the old mock vnode creation function with the new tree and mountpoint-based one.
This change utilises the KAUTH_FILEOP_WILL_RENAME event which was introduced with Mojave/10.14 to determine if a KAUTH_VNODE_DELETE authorisation check is due to a rename() operation. In this case, the file or directory genuinely needs hydrating, otherwise hydration can be skipped.

This change also adds unit tests for the new rename operation tracking code, and adapts existing unit tests so hydration is not expected when a KAUTH_VNODE_DELETE check occurs outside of a rename() operation.

Note that this change means the behaviour on macOS 10.13 and earlier versus 10.14 and later subtly diverges.
Includes a change to the post-indexchanged hook (now the
post-index-change hook).

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
…nd file hydration

Update heartbeats to contain folder placeholder and file hydration metadata
Display about box with VFSForGit and Git version info.
- Fetch Version info by running gvfs & git commands
- Added UT (updated tests cases added required mocks)
- Renamed GVFSTask to ProductInfoFetcher
- New ProcessHelper wrapper class around NSTask
- Separate xcodebuild test & build steps for native app.
  This helps prevent XCTest frameworks from getting
  injected into deployment binaries
- Use nullability decorators
- VFSForGit classes are prefixed with "VFS".
- Use default Xcode code indentations
- Quote the directory being deleted
Added component-plist file for "VFS For Git" package. This is an xml
file that contains specifications for how installer should handle
bundles in VFSForGit. BundleIsRelocatable is set to true, for
"VFS For Git.app". This stops the installer from searching the disc
for a copy of the app, which it then upgrades. Now the installer
will always fresh-install (or upgrade) "/Library/Application\ Supp
ort/VFS For Git/VFS For Git.app" only. Also updated CreateInstaller
script to use the component-plist file.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Currently, this is hardcoded to run the "where" program, which is not
appropriate on non-Windows platforms. Add a platform abstraction so different
platforms can run different programs.
Different platforms have different requirements for the list of processes that
block installation.

The POSIX platforms also remove "gvfs" from the list of blocked processes, as
they can run upgrade while the 'gvfs upgrade' command is running. We might want
to come back and restrict this to only the `gvfs upgrade` command (or only if
the running command is a parent process) in a future change.
jamill and others added 12 commits July 26, 2019 13:06
The script would fail to properly parse Git Version strings that
included multiple hyphens, which broke Git Version strings that were
generated by "draft" pipelines, which had the form:

  1.2.3-DRAFT-pr

as it would not include any text after the second hyphen.
Remove all TODO(POSIX) and TODO(Mac) comments.
Mac build scripts: consume git installer pkg directly
As specified in the documentation [1], the PriorityClass setter will
throw an InvalidOperationException if the process ID is not available.
This could happen due to a race condition where the process completes
before we can set its priority.

The other exceptions it can throw are either platform-specific or
signal a bug, so do not be overly aggressive in the 'catch'.

[1] https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.process.priorityclass?view=netframework-4.8

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
If we fail to communicate with the mount process, then 'gvfs status'
gives us the information we want, not 'git status'.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Use a new environment variable, GVFS_UPGRADE_DETERMINISTIC, to
always print the "upgrade available" message, if it is present.

This should fix test flakiness and issue #852.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Includes updates from microsoft/git#164.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
… when setting priority class

As specified in the documentation [1], the PriorityClass setter will
throw an InvalidOperationException if the process ID is not available.
This could happen due to a race condition where the process completes
before we can set its priority.

The other exceptions it can throw are either platform-specific or
signal a bug, so do not be overly aggressive in the 'catch'.

[1] https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.process.priorityclass?view=netframework-4.8
…reminders

Should fix #852.

The fix is to use an environment variable to always show the upgrade message, if present.

While looking at the post-command hook code, I discovered some simple cleanups that are isolated to different commits:

* Removed unreachable code.
* Changed a message to refer to `gvfs status` instead of `git status`.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
@derrickstolee derrickstolee requested a review from jrbriggs July 29, 2019 23:24
@jrbriggs
Copy link
Copy Markdown
Member

/azp run GitHub VFSForGit Large Repo Build
/azp run GitHub GitHub VFSForGit Large Repo Perf Tests

@azure-pipelines
Copy link
Copy Markdown

No pipelines are associated with this pull request.

@derrickstolee
Copy link
Copy Markdown
Contributor Author

Large Repo Perf run succeeded with expected results. All difference was within error bounds.

Copy link
Copy Markdown
Contributor Author

@derrickstolee derrickstolee left a comment

Choose a reason for hiding this comment

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

I looked through the changes and couldn't find anything alarming. Can't approve my own PR, though. 🤷‍♂

Copy link
Copy Markdown
Member

@jamill jamill left a comment

Choose a reason for hiding this comment

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

I did a quick spot check of a couple of things, and it looks as expected to me :) Thanks!

Copy link
Copy Markdown
Member

@kewillford kewillford left a comment

Choose a reason for hiding this comment

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

This looks good from a quick run through.

return false;
}

this.FileSystem.CreateDirectory(upgradeApplicationDirectory);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@alameenshah, @jamill should we be calling TryCreateDirectory here instead (or catching exceptions that CreateDirectory might throw)?

As best I can tell the caller of TryPrepareApplicationDirectory does not expect it to throw.

return false;
}

this.FileSystem.CreateDirectory(directory);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@alameenshah @jamill same comment here.

I think we don't have to hold up the release for this, but if you agree can you file a work item or create a PR into master to update this code?

@wilbaker wilbaker merged commit 4558f66 into releases/shipped Jul 31, 2019
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.