Repository navigation
Improve sync time with a global test-runtime project.json restore upfront. - #12345
Conversation
|
This is a initial version, will file issues for furthur cleanup. |
|
Thanks, @karajas. How much does this improve the sync time? |
|
On my machine, the sync step was TotalMinutes : 12.0820112816667 After using the common project.json, |
|
Testing this with some further changes,
This increases the reduced restore time to TotalMinutes : 7.293574075 but I'm working on bringing this down. edit: Current failures look like missing Test Data, will double check versions required by the project's. |
Thanks. Good start on improving this. FWIW, a typical sync.cmd run for me typically takes over half an hour :-( so I very much welcome improvements here. |
|
@stephentoub More improvements coming too.... :) |
| </SupplementalTestData> | ||
| </ItemGroup> | ||
|
|
||
| <PropertyGroup> |
There was a problem hiding this comment.
I'm fine with this being here for now but once we get this all working we should put this in test.targets in build tools. .
There was a problem hiding this comment.
I think we wanted to make this change specific to the repo that it was going into in case their were any properties that we wanted to be custom to it.
There was a problem hiding this comment.
I think I can agree with the ProjectJson/ProjectLockJson properties.
| "coreFx.Test.net463": {} | ||
| } | ||
| } | ||
| "dependencies": { |
There was a problem hiding this comment.
Any reason we still need this project.json?
| <!-- TODO: Replace this with a package reference. --> | ||
| <ItemGroup> | ||
| <None Include="project.json" /> | ||
| <ProjectReference Include="..\..\System.Drawing.Primitives\pkg\System.Drawing.Primitives.pkgproj" /> |
There was a problem hiding this comment.
I suspect these packages already exist now.
What do they have to exclude compile of? Can we fix that? |
|
I was trying to isolate projects that depended on a separate version of NETStandard.Library. Today that would be the xunit library through the TestSuite package and the perf runner packages. Ideally I would like to isolate runners that depend on older metapackage versions as well, like the uwp runner. This is less of an issue today because we force it to pick up only the latest packages. I'll try include compiling the perf libraries again and see if they work but I recall some pretty large restore errors. |
|
Think I resolved the perf libraries to be include compiled, so am now trying a run with all the perf project.json's removed again. |
2c89c18 to
ed83730
Compare
|
Resolved the System.Runtime.Loader error, where the restore seems to work only for netstandard1.6 |
|
An important point to note is project.json for tests are no longer required unless you have special compilation requirements. All test project's will utilize the latest version of all packages from the last checked in build (LKG) , auto update will affect common test-runtime project.json and all project.json with the special rules reducing the noise for each auto update PR. Another important point to note is that test project's will now compile with all the assets resolved from the common test-runtime project.json, we need to come up with a way to handle opt out references. |
|
PTAL. |
eb23ded to
8548a9f
Compare
|
Readded all the Project.Json's for System.Runtime.Loader tests and System.Reflection CoreCLR tests. |
|
@weshaggard I'll verify the official build against packages scenario doesn't break. |
| } | ||
| } | ||
| "dependencies": { | ||
| "coveralls.io": "1.4", |
There was a problem hiding this comment.
This file definitely looks very scary. We should really consider generating it.
There was a problem hiding this comment.
This seems like an interesting challenge. The method I used to generate this initially was a aggregation tool across all project.json in the src directory, which is fine but didn't resolve any of the odd restore requirements like having certain dependencies adjacent to each other.
The vetted method for generating this file is
- Copy all dependencies that are produced from https://github.com/dotnet/versions/blob/master/build-info/dotnet/corefx/master/Latest_Packages.txt
- Restore in a giant project.json, ensuring the lockfile generated has the appropriate compile time and runtime requirements.
- Move dependency specific information to the appropriate framework sections. If the dependency supports only a certain netstandard version and higher then ensure you duplicate for higher netstandards below.
I can do a write up of this part and will definitely look into a better generation story. A lot of it, just involved running sync on the different scenarios and cleaning up the errors.
|
This is awesome. I love seeing a ton of stuff getting deleted and our restore times going down. Thanks @karajas The change looks good to me but as we chatted lets be sure our official build can handle it. |
|
So far the official build would break because of this change. I've fixed the related code in buildagainstpackages.targets to omit the common project.json with @chcosta 's help, which I'll open a PR in buildtools for. Even with this change some of the references need to be changed to get a clean official build against packages, I'm working through those at the moment. For example in my current change, IsolatedStorage is still in the uap section but needs another copy in the netstandard section so that buildagainstpackages can pick up the compile time asset from packages. |
3c416c4 to
255ff91
Compare
|
Added ActiveIssue on https://github.com/dotnet/corefx/issues/12759 to pass CI. |
|
@dotnet-bot test Innerloop Windows_NT Debug Build and Test please |
|
@weshaggard Verified this passes against official builds. PTAL. |
|
@joperezr @stephentoub Can this change go in before we patch the next update dependencies PR? |
weshaggard
left a comment
There was a problem hiding this comment.
Fix the last merge conflict and merge.
Restore this common project.json upfront to improve sync time and avoid download contention from nuget.
Move CommonTestProjectJson Properties to build.proj
…test System.Security.Permissions. Rebase dependencies for test-runtime project.json
Improve sync time with a global test-runtime project.json restore upfront. Commit migrated from dotnet/corefx@2b91aa8
Improve sync time with a global test-runtime project.json restore upfront. Commit migrated from dotnet/corefx@2b91aa8
This change is to improve the time taken by sync.cmd. It introduces the following changes.
There is only one test project.json now so as to avoid download contention withing the nuget restore processes while restoring multiple project.json's (which eats up double the raw download time of the packages).
A singular project.json also removes all the I/O operations of generating multiple test lock files. (75% of the restore step is just in generating and walking through the lockfiles, IsRestoreRequired is a great way to avoid rerun cost for projects that still require their test project.json.)
/cc @weshaggard @ericstj @markwilkie