Maintenance: use the correct object directory#470
Merged
derrickstolee merged 6 commits intomicrosoft:mainfrom Dec 17, 2020
Merged
Maintenance: use the correct object directory#470derrickstolee merged 6 commits intomicrosoft:mainfrom
derrickstolee merged 6 commits intomicrosoft:mainfrom
Conversation
This allows running the same tests in both "scalar run" and "git maintenance run" modes. The actual logic based on this bit of information is not actually included yet. Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
To check if Git's official background maintenance is ready for a full Scalar repo, add tests that check for how 'git maintenance run --task=loose-objects' compare to 'scalar run loose-objects'. The biggest difference is that 'scalar run <task>' sets GIT_OBJECT_DIRECTORY to the shared object cache before running 'git maintenance run --task=<task>', so we need to make Git do that, too. THIS COMMIT CAUSES FUNCTIONAL TEST FAILURES. These will be fixed in the next commit. Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
This change works without a hitch. Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Switch based on the test harness to use 'git maintenance run' as well as 'scalar run' for the commit-graph task. The one clear deviation is that we cannot have Git clean up the .lock file, since that violates Git's expectations. That's a meaningful behavior difference (that hopefully won't matter?) so let's attempt to fix that problem. Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Use the 'git maintenance run --task=prefetch' the same was as 'scalar run fetch' to maximize our test coverage. Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
See microsoft/git#301. Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
3fe5aed to
70b68e0
Compare
dscho
reviewed
Dec 17, 2020
Member
dscho
left a comment
There was a problem hiding this comment.
Not an expert, just two small comments/questions.
Scalar.FunctionalTests/Tests/EnlistmentPerFixture/CommitGraphStepTests.cs
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #458, we dropped the
Scalar.Serviceapplication from the macOS platform and depended entirely ongit maintenance startto initialize background maintenance. This had two issues:cron-based background maintenance does not sufficiently create a user environment for GCM Core to store credentials. This causes it to start loading pop-ups on the hour every hour for theprefetchtask. This item is handled upstream asds/maintenance-part-4, which creates platform-specific maintenance abilities, including macOS integration withlaunchd/launchctl.git maintenance run --task=<task>insidescalar run <job>, I forgot thatscalar runsetsGIT_OBJECT_DIRECTORYso something inside ofgit maintenance runneeds to do the same. This is being answered by Update 'git maintenance' to match upstream git#301.As for Scalar, the only thing we need to do is consume this new version of Git and test that
git maintenance rundoes the same thing asscalar run. Hold it to the same standards.Review commit-by-commit to avoid being overwhelmed with scaffolding for the multi-mode test classes.