-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Build Mono build tasks packs only when targeting mobile #105153
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
Build Mono build tasks packs only when targeting mobile #105153
Conversation
|
/cc: @vitek-karas |
|
what is the status of this? |
CI failures are unrelated so this is ready to go. |
|
I will track official builds on |
|
Official builds including this change does not seem to have an issue with building required packages. Example of successful build: https://dev.azure.com/dnceng/internal/_build/results?buildId=2502042&view=results |
|
/backport to release/8.0-staging |
|
Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/10090590446 |
|
/backport to release/6.0-staging |
|
Started backporting to release/6.0-staging: https://github.com/dotnet/runtime/actions/runs/10090593349 |
|
@ivanpovazan backporting to release/8.0-staging failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Build Mono build tasks packs only when targeting mobile
Using index info to reconstruct a base tree...
M src/mono/nuget/mono-packages.proj
Falling back to patching base and 3-way merge...
Auto-merging src/mono/nuget/mono-packages.proj
CONFLICT (content): Merge conflict in src/mono/nuget/mono-packages.proj
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Build Mono build tasks packs only when targeting mobile
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
|
@ivanpovazan an error occurred while backporting to release/8.0-staging, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
|
@ivanpovazan backporting to release/6.0-staging failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Build Mono build tasks packs only when targeting mobile
Using index info to reconstruct a base tree...
M src/mono/nuget/mono-packages.proj
Falling back to patching base and 3-way merge...
Auto-merging src/mono/nuget/mono-packages.proj
CONFLICT (content): Merge conflict in src/mono/nuget/mono-packages.proj
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Build Mono build tasks packs only when targeting mobile
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
|
@ivanpovazan an error occurred while backporting to release/6.0-staging, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
Description
Microsoft.NET.Runtime.MonoTargets.Sdkpackage is built even when it is not required.From recently we started seeing runtime official builds doing retries (which is a separate concerning problem).
This is problematic for the
Build Workloads(orwindows-x64 release Workloads) job of the runtime official build.Build Workloadsdepends on the jobs that target mobile platforms, uses their outputs and produces its own artifacts which are later published and used in VS insertion stages. More specifically:Build Workloadsdependencies publishMicrosoft.NET.Runtime.MonoTargets.Sdk.nupkg/.symbols, whileBuild Workloadspublishes.msivariants of this packageHowever, it can happen that a non-mobile targeted job failed on the first try of the official build e.g.,
linux_musl_x64 Monoand thatBuild Workloadsucceeded producing the.msivariants. However, whenlinux_musl_x64 Monosucceeds on the second try it again publishes a differentMicrosoft.NET.Runtime.MonoTargets.Sdk.nupkg/.symbolsoverwriting what was used in the first run ofBuild Workload, which makes the overall build non-deterministic, ie.:Build Workloadpublished.msipackages with one version ofMicrosoft.NET.Runtime.MonoTargets.Sdklinux_musl_x64 Monopublished a different version ofMicrosoft.NET.Runtime.MonoTargets.Sdk.nupkg/.symbolsAs an end result, VS insertion reports issues during
Symbol Checkas we end up having a miss match between publishedMicrosoft.NET.Runtime.MonoTargets.Sdk.nupkg/.symbolsand the.msivariant.Changes
This PR limits building
Microsoft.NET.Runtime.MonoTargets.Sdkpackage only when we target mobile which helps in prevention of having different versions of the same package as a result of an official build.Testing
I manually ran an official build with this change in: https://dev.azure.com/dnceng/internal/_build/results?buildId=2493547 and verified that the build succeeds and that the
MergedManifest.xmlincludes all the artifacts as without this change.Follow-up
Once approved we should backport this to our servicing branches as we have the same issue there as well.
Finally, we should investigate why retries of the official builds are enabled as that seems like an undesired behavior.