-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Shift Most of Wasm AOT test build to helix #48226
Conversation
Since AOT'ing each test suite takes between 3-9 min, we need to shift the burden over to helix.
Tagging subscribers to this area: @directhex Issue DetailsSince AOT'ing each test suite takes between 3-9 min, we need to shift the burden over to helix.
|
…nto build-wasm-aot-helix
…m run with EnableAggressiveTrimming enabled
<PropertyGroup Condition="'$(UseDefaultBlazorWASMFeatureSwitches)' == 'true'"> | ||
<EventSourceSupport>false</EventSourceSupport> | ||
<UseSystemResourceKeys>true</UseSystemResourceKeys> | ||
<UseSystemResourceKeys>false</UseSystemResourceKeys> | ||
<EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding> | ||
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport> | ||
|
||
<!-- we want to default to what Blazor has, except if we are building in Debug config --> | ||
<DebuggerSupport Condition="'$(Configuration)' != 'Debug'">false</DebuggerSupport> | ||
<DebuggerSupport Condition="'$(DebuggerSupport)' == '' and '$(Configuration)' != 'Debug'">false</DebuggerSupport> | ||
</PropertyGroup> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some these need to have values different from what UseDefaultBlazorWasmFeatureSwitches
wants:
DebuggerSupport
- this is needed by some library tests because they depend on pdbs, or debugger attributes- Currently, I am setting this in the specific projects that need it
UseSystemResourceKeys
- IIUC, this is needed so that the resources don't get trimmed, which is needed by some library tests
Setting these only for some library projects makes it kinda inconsistent. And I'm wondering if that affects what the intention of UseDefaultBlazorWasmFeatureSwitches
is.
So, do we need switch at all? If so, then what should be done here?
/cc @lewing @akoeplinger
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @radical, the intention of UseDefaultBlazorWASMFeatureSwitches
is to make us consistent with Blazor. I think overriding in the individual library test projects where necessary is fine for now.
@@ -219,7 +219,7 @@ jobs: | |||
targetRid: browser-wasm | |||
platform: Browser_wasm | |||
container: | |||
image: ubuntu-18.04-webassembly-20210223133559-4800846 | |||
image: ubuntu-18.04-webassembly-20210309143118-005aab4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@steveisok @mdh1418 Do you know why this change was made? main
is still using the older version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
judging from the date it's to bring in dotnet/dotnet-buildtools-prereqs-docker@f25f6cd
…LoadContext The test project explicitly copies, and needs `mscorlib.dll`, which gets trimmed out with `EnableAggressiveTrimming=true`. Preserve that.
Fails because it can't find `xunit.runner.utility.netcoreapp10`
`InlineDataDiscoverer`, and `MemberDataDiscoverer` were getting trimmed, which would cause some tests to get skipped. For example, ~9k tests in `System.Data.Common.Tests`
88b8234
to
f33e181
Compare
@@ -219,7 +219,7 @@ jobs: | |||
targetRid: browser-wasm | |||
platform: Browser_wasm | |||
container: | |||
image: ubuntu-18.04-webassembly-20210223133559-4800846 | |||
image: ubuntu-18.04-webassembly-20210309143118-005aab4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
judging from the date it's to bring in dotnet/dotnet-buildtools-prereqs-docker@f25f6cd
<PropertyGroup Condition="'$(UseDefaultBlazorWASMFeatureSwitches)' == 'true'"> | ||
<EventSourceSupport>false</EventSourceSupport> | ||
<UseSystemResourceKeys>true</UseSystemResourceKeys> | ||
<UseSystemResourceKeys>false</UseSystemResourceKeys> | ||
<EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding> | ||
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport> | ||
|
||
<!-- we want to default to what Blazor has, except if we are building in Debug config --> | ||
<DebuggerSupport Condition="'$(Configuration)' != 'Debug'">false</DebuggerSupport> | ||
<DebuggerSupport Condition="'$(DebuggerSupport)' == '' and '$(Configuration)' != 'Debug'">false</DebuggerSupport> | ||
</PropertyGroup> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @radical, the intention of UseDefaultBlazorWASMFeatureSwitches
is to make us consistent with Blazor. I think overriding in the individual library test projects where necessary is fine for now.
</ItemGroup> | ||
|
||
<!-- To recreate the original project on helix, we need to set the wasm properties also, same as the | ||
library test project. Eg. $(InvariantGlobalization) --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have a way of knowing the list of properties is complete or when we need to update it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Um .. not really. So, when something breaks? I didn't add all the properties either, because I want to do that as it comes up.
@@ -2,6 +2,7 @@ | |||
<PropertyGroup> | |||
<IncludeRemoteExecutor>true</IncludeRemoteExecutor> | |||
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks> | |||
<DebuggerSupport Condition="'$(DebuggerSupport)' == '' and '$(TargetOS)' == 'Browser'">true</DebuggerSupport> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curious why does this need .pdb?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eg:
fail: [FAIL] System.Collections.Tests.HashtableTests.DebuggerAttribute
info: System.InvalidOperationException : Expected one DebuggerDisplayAttribute on System.Collections.Hashtable.
info: at System.Diagnostics.DebuggerAttributes.ValidateDebuggerDisplayReferences(Object obj)
info: at System.Collections.Tests.HashtableTests.DebuggerAttribute()
info: at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
fail: [FAIL] System.Collections.Tests.QueueTests.DebuggerAttribute_NullQueue_ThrowsArgumentNullException
info: System.InvalidOperationException : Expected one DebuggerTypeProxyAttribute on System.Collections.Queue.
info: at System.Diagnostics.DebuggerAttributes.GetProxyType(Type type, Type[] genericTypeArguments)
info: at System.Diagnostics.DebuggerAttributes.ValidateDebuggerTypeProxyProperties(Type type, Type[] genericTypeArguments, Object obj)
info: at System.Diagnostics.DebuggerAttributes.ValidateDebuggerTypeProxyProperties(Type type, Object obj)
info: at System.Collections.Tests.QueueTests.DebuggerAttribute_NullQueue_ThrowsArgumentNullException()
info: at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
@@ -0,0 +1,55 @@ | |||
// Licensed to the .NET Foundation under one or more agreements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should ideally be added to
Lines 8 to 11 in d08f7f2
<ProjectReference Remove="$(MSBuildThisFileDirectory)WasmAppBuilder\WasmAppBuilder.csproj" | |
Condition="'$(TargetOS)' != 'Browser'" /> | |
<ProjectReference Remove="$(MSBuildThisFileDirectory)WasmBuildTasks\WasmBuildTasks.csproj" | |
Condition="'$(TargetOS)' != 'Browser'" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand. This file will get built with WasmBuildTasks
. What should be added to tasks.proj
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks green to me, there is some minor whitespace damage but this was a long road so lets land it.
Since AOT'ing each test suite takes between 3-9 min, we need to shift the burden over to helix.
This is done by:
because it has the AOT build part
app build for that on helix (eg. emsdk, wasm app targets, cross compiler etc)
aot-build.proj
WasmBuildApp
targetusing the paths for the assets on helix
WasmBuildApp
for the build, resulting in a wasm appbundle.
for
Wasm.Build.Tests
, which we can use here too.Trimming:
Since, AOT can be so expensive, we use
EnableAggressiveTrimming=true
(EAT), butthat means that we could have issues due to trimming.
And it can sometimes be unclear whether the build/test failures are due to trimming
or AOT.
Because these builds+test runs are different from other builds, owing to the
"build partially on helix" step, a normal EAT build would not be the same as
to help with testing this, we add two lanes to
runtime-staging
:*_Mono_AOT
: builds AOT+EAT on helix*_Mono_EAT
: builds EAT, on helixbuild: 1. build test assembly; 2. send to helix; 3. build wasm app; 4. run tests
This should effectively mean that we can see which errors might be due to EAT, and
which are clearly because of EAT+AOT.