microsoft / microsoft/VFSForGit
Corrupt object tests failing with latest microsoft/git version
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 474
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 8
Description
If I run the functional tests with microsoft/git version v2.43.0.vfs.0.0, then I get the following errors:
Test GVFS.FunctionalTests.Tests.EnlistmentPerTestCase.LooseObjectStepTests.CorruptLooseObjectIsDeleted()
Failed at 8:26:13 AM taking 00:00:51.9717655
Step failed to delete corrupt blob
Expected: False
But was: True
=> GVFS.FunctionalTests.Tests.EnlistmentPerFixture.GitCorruptObjectTests.GitRequestsReplacementForTruncatedObject()
Test GVFS.FunctionalTests.Tests.EnlistmentPerFixture.GitCorruptObjectTests.GitRequestsReplacementForTruncatedObject()
Failed at 8:26:10 AM taking 00:00:02.1702420
Expected: 0
But was: 128
I've proposed for these tests to be modified in #1804 as a temporary measure, but perhaps we should leave them in until we can demonstrate the problem by updating the Git version pin to a more-recent release.
The "fix" would actually need to be in microsoft/git to fix the handling of these bad objects in a way that auto-heals.
The good news is that the need for this functionality is greatly diminished. It was created this way because VFS for Git's early versions would not use temporary files and would frequently create files that were not fsync'd resulting in empty or truncated files. All versions in the last five years have been more careful to avoid this behavior, so we don't need to clean up these bad files as much as we have historically.
With that context in mind, one acceptable fix might be to remove these tests altogether as not being an expected behavior.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported functional tests, LooseObjectStepTests.CorruptLooseObjectIsDeleted and GitCorruptObjectTests.GitRequestsReplacementForTruncatedObject, using microsoft/git v2.43.0.vfs.0.0. Compare their behavior with the version pin and the proposal in #1804. Done means establishing the expected behavior and documenting whether the tests should remain or be removed; the underlying fix is identified as belonging to microsoft/git.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, git
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100