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

Cache to warning #5

Open
wants to merge 323 commits into
base: master
Choose a base branch
from
Open

Cache to warning #5

wants to merge 323 commits into from

Conversation

jeschu1
Copy link
Owner

@jeschu1 jeschu1 commented Aug 25, 2020

No description provided.

wilbaker and others added 30 commits October 2, 2018 13:00
…n enumeration filter strings don't have wildcards

Windows: Use a faster comparison when enumeration filter strings don't have wildcards
…and trees on failed initial checkout

On Clone, we need to create the `.git/index` file during a checkout, which requires having all trees reachable from the root tree of the tip commit. To ensure we have all of the objects, we call `TryDownloadCommit()`. However, this method doesn't actually try downloading a pack of trees if we already have the commit and root tree.

Due to the shared object cache, we may have these objects for a few reasons:

1. A recent fetch included a ref update that points to that commit, and we downloaded the commit and tree as loose objects.
2. A background prefetch downloaded a prefetch pack containing that commit and tree, but some of the reachable trees are missing due to clock skew between cache servers.

This fixes the issue by forcibly downloading the packfile if the checkout fails and trying again.

Resolves microsoft#306.
This change allows us to reinitialize the GitProces with valid repository information information and pass it correctly to the credential call.
This test attempted to cover a rare scenario, but is flaky due to something holding a handle on the pack-files we are trying to delete.
If not cache server is present display "None"
…ucceedsWithMissingTrees

This test attempted to cover a rare scenario, but is flaky due to something holding a handle on the pack-files we are trying to delete.

The test did these things:

1. Clone in `enlistment1`.
2. Delete all packfiles.
3. Download the tip commit and root tree as loose objects.
4. Clone in `enlistment2`, hitting the new retry logic.

However, the pack-file delete can fail due to something holding on to the packfiles. This failed on one PR build already. Stop it from failing on others.
… new release is available it will be downloaded in the background.

2. GVFS Git Hooks will nag user to install the upgrade.
3. GVFS Upgrade [--confirm] verb will enable user to manually trigger installation of the upgrade release.
4. Unit test cases
5. Functional test for upgrade reminder messaging
- Display nag only 10% of the times a git command is run
- Removed "Run gvfs upgrade..." from the reminder notification message.
- Use ITracer.StartActivity for method tracing.
- Service Verb redirects list of repos that failed to mount to stderr.
- Upgrader tool reads stderr and displays the list on Console.
- New console message displayed after launching installer advising user to not run gvfs, git commands until installation has finished.
- Added a new Console message to let user know upgrade completed successfully
- inserted blank line before final instruction to run `gvfs upgrade --confirm` command
- Early exit when no upgrade or invalid upgade ring is set
- Upgrade verb crash fix on Mac.
- Early exit when upgrade is not installable and `gvfs upgrade --confirm` is run
- Cleanup renamed UpgradeDiskLayout constant to MountUpgrade.
- Cleanup - replaced usage of the string "gvfs.upgrade-ring" with const.
- Added TODO to remove NotSupportedException from GitProcess::TryGitVersion.
- Made InstallerTracer.CommandToRerun protected property. Updated UT.
- Added issue reference url for InstallerPreRunChecker refactoring TODO.
- Added new constants for "gvfs upgrade", "gvfs upgrade --confirm" strings.
- Removed pre-check for development version. Upgrade can now be run on Developer machines.
- Optimization - InstallerPreRunChecker::IsBlockingProcessRunning now returns HashSet. Removed unnecessary conversion to list.
- Better error handling in InstallerPreRunChecker while launching GVFS CLI
- Updated messaging in InstallerPreRunChecker. The text "elevated command prompt" was missing in some of the messaging.
- Cleanup. Renamed processWrapper to ProcessLauncher.
- Added URL info while logging network errors during fetch release.
- Removed Randomization of upgrade timer in the service.
- Removed GVFSArgs from MockInstallerPreRunChecker UT class.
- Removed ShouldExitOnError property in UpgradOrchestrator class. Using Environment.ExitCode instead.
- Cleanup. Replaced all occurances of "remount" with "mount".
- removed log-mount-failure-in-stderr flag from Service verb.
- renamed log files to productupgrade_<verb|process>and mount_repoupgrade
- Using GitProcess.TryGetVersion() in GVFSVerb and Diagnose Verb.
- Save directory listing of GVFS.Upgrade\Downloads directory during diagnose.
- Created MockGitInstallation.cs
- Removed NotSupportedException handler from GitProcess.cs
- Renamed all variables with name gvfsConfig to serverGVFSConfig
    - Usage gvfs config <key> <value>
    - New LocalGVFSConfig.cs file. It writes config key value pairs into a git config file.
    - Updated ProductUpgrader.cs to use the new LocalGVFSConfig class to read ring config.
- New base class for Verbs that don't need an enlistment.
- Cleanups
…FS Config is written to a temporary file and then renamed to its final destination. For this rename operation to succeed, user needs to have delete permission on the destination file, in case it is pre-existing. If the pre-existing file was created by a different user, then the delete will fail. Reference: https://stackoverflow.com/questions/22107812/privileges-owner-issue-when-writing-in-c-programdata. This work around allows safe write to succeed in C:\ProgramData directory.
- New GVFSPlatform constant for installer file name extension.
- Renamed installer file name from "SetupGVFS.version.exe" to "VFSGit.version.exe"
- Updated UT & FT.
… are .mockexe and .dmg

- Update UT
- Changed GVFS installer name to New Format "VFSGit.Version.Extension"
- Upgrade supports both old and new gvfs installer name formats now.
- Early exit upgrade when either Git or GVFS asset installers are missing in the Release.
- New success message when repository mount fails.
- updated messaging when gvfs mount fails
- Don't re-mount when GVFS installation fails.
- Shorter pre-upgrade warning text.
- rephrased ProjFS error message
- Rephrased Cannot install upgrade messaging.
- Added advice on what to do next when an upgrade is available but not installable.
- Include Ring information in upgrade-available message. Updated UT.
- cleanup made LocalGVFSConfig.allSettings a private property
Use correct repoUrl for credential
Show "None" message in diagnose instead of invalid url
Enrich existing tests to include confirm off
wilbaker and others added 23 commits October 30, 2018 14:33
…ut validating the working directory during setup

Mac: Run GitRepoTests with and without validating the working directory during setup
Telemetry: Record when a mount succesfully starts
…alToOutside functional test

Disable Native_ProjFS_MoveFile_PartialToOutside functional test
Mac: Don't assert/panic when we fail to read attributes during a FileOp operation
…oDotGitDirectory

Mac: Disable StatusTests.MoveFileIntoDotGitDirectory
…emoving the old one first if it wasn't properly cleaned up (likely in the case of a panic)
Mac: Handle setting the PAT in PrepFunctionalTests.sh correctly after a kernel panic
…he ETW listener

Add ability to specify an iKey for the ETW listener
In the EnlistmentPerFixture.PrefetchVerbTests class, we have the same PostFetchJobShouldComplete() method as we do in the version without a shared cache, except that none of our tests in the class actually trigger a commit-graph write. The commit-graph write requires a prefetch that downloads a new prefetch packfile, while the multi-pack-index is rewritten on every prefetch (in case a non-prefetch packfile was added). We don't write the commit-graph on clone because we need a full enlistment to guarantee missing object downloads.

Somehow, these test succeed in the full test suite, but do not succeed when only the one class is run. This caused some pain for someone stepping through the tests in a debugger.

Instead of removing the commit-graph check, instead see if the commit-graph file exists before calling `git commit-graph read`. This allows us to still check that the commit-graph file exists and is in good condition (when it exists).

The multi-pack-index is guaranteed to exist after every post-fetch job.
…ph check

In the EnlistmentPerFixture.PrefetchVerbTests class, we have the same PostFetchJobShouldComplete() method as we do in the version without a shared cache, except that none of our tests in the class actually trigger a commit-graph write. The commit-graph write requires a prefetch that downloads a new prefetch packfile, while the multi-pack-index is rewritten on every prefetch (in case a non-prefetch packfile was added). We don't write the commit-graph on clone because we need a full enlistment to guarantee missing object downloads.

Somehow, these test succeed in the full test suite, but do not succeed when only the one class is run. This caused some pain for someone stepping through the tests in a debugger.

Instead of removing the commit-graph check, instead see if the commit-graph file exists before calling `git commit-graph read`. This allows us to still check that the commit-graph file exists and is in good condition (when it exists).
Create a script to create a build drop to enable running functional tests on boxes that didn't build the product.
This is an expected condition that happens when status is being read to and removed at the same time.   This will self heal but we want to keep a warning to know how often it happens.
@jeschu1 jeschu1 closed this Aug 25, 2020
@jeschu1 jeschu1 reopened this Aug 25, 2020
@jeschu1
Copy link
Owner Author

jeschu1 commented Aug 25, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jeschu1 jeschu1 closed this Aug 25, 2020
@jeschu1 jeschu1 reopened this Aug 25, 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.