Repository navigation
Share third-party packages between test runs through a fallback folder - #18
Merged
Merged
Conversation
Shared fallback folder, https-only harvest, kit prefixes, parallel harvest, leftover sweep, run lifecycle, machine-folder refusal, the hard-coded-folder check and the machine-folder guard.
Each run gets its own packages folder and HTTP cache under dist/nuget-runs, removed by a trap that also runs on HUP, INT and TERM; the next run sweeps what a killed one left, by marker file. Packages a run downloaded from an https feed move into the shared folder (MSBUILDKIT_TESTS_NUGET_SHARED_DIR, default dist/nuget-shared) with one rename each; kit packages never do. The machine's folder is refused as the shared folder and compared before and after by hash.
An earlier edit of tests/run.sh turned the literal carriage return inside tr -d into a line feed, so the check failed on Windows.
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.
Test runs share third-party NuGet packages through a folder the tests own, instead of reading the machine's global-packages folder. Follow-up to #15.
NUGET_PACKAGESandNUGET_HTTP_CACHE_PATHunderdist/nuget-runs/<script>.<pid>.<time>/, removed by a trap that also runs on HUP/INT/TERM; the next run sweeps what a killed run left (marker file + dead pid only).dist/nuget-shared(MSBUILDKIT_TESTS_NUGET_SHARED_DIRoverrides) is the run'sNUGET_FALLBACK_PACKAGES. At the end of a run, packages downloaded from anhttpsfeed move into it, staged and published with one rename. Loopback, plain http, local-folder sources and kit packages (MSBUILDKIT_TESTS_KIT_PACKAGE_PREFIXES, defaultDragoAnt.MSBuildKit;DragoAnt.Fixture.;DragoAnt.Samples.) never do.ni_packages_dir; a test file that names a packages folder itself fails the run.tests/nuget-isolation.test.sh: 23 unit checks on hand-made folders (no dotnet, no network), run fromtests/run.sh.The kit ships no code that enumerates the package cache, so nothing needed fallback-folder support there.
Evidence
local.posix,local.windows,plain.httptaken).sh tests/manager.shon a loaded Windows machine: cold shared folder 474 s (48 packages moved), warm 151 s (0 moved).