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

Reduce error/exception noise by having maintenance tasks check if the repo exists before running #1447

Closed
wilbaker opened this issue Aug 13, 2019 · 2 comments · Fixed by #1449
Labels
affects: live-site Improving our ability to diagnose and fix the product platform: linux platform: macOS platform: windows

Comments

@wilbaker
Copy link
Member

We just saw the following error in the PackfileMaintenanceStep.

This could be due to someone deleting their repo while VFS4G is still mounted.

Rather than having this situation reported as an error, the maintenance task could check that if the repo's folder exists before trying to open it, and if it does not, it could shut the mount process down.

System.IO.InvalidDataException: Couldn't open repo at E:\latest\src: could not find repository from 'E:\latest\src'
 at GVFS.Common.Git.LibGit2Repo..ctor(ITracer tracer, String repoPath)
 at GVFS.Common.Git.GitRepo.<.ctor>b__5_0()
 at GVFS.Common.Git.LibGit2RepoInvoker.GetSharedRepo()
 at GVFS.Common.Git.LibGit2RepoInvoker.InitializeSharedRepo()
 at GVFS.Common.Maintenance.PackfileMaintenanceStep.PerformMaintenance()
 at GVFS.Common.Maintenance.GitMaintenanceStep.CreateProcessAndRun()
 at GVFS.Common.Maintenance.GitMaintenanceStep.Execute()
@derrickstolee
Copy link
Contributor

@wilbaker: the GitMaintenanceQueue already blocks on this. These errors are coming due to a race condition: the user deleted the repo after the step started.

How much do we want to dig in here? Put a check around the LibGit2RepoInvoker? Around GitProcess?

@wilbaker
Copy link
Member Author

I think we can make the code a bit smarter about when it decides to call RelatedError to reduce the noise we're seeing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: live-site Improving our ability to diagnose and fix the product platform: linux platform: macOS platform: windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants