Skip to content
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

In VMR builds only build the target RID and don't rebuild #10017

Merged
merged 7 commits into from
Mar 6, 2024

Conversation

jkoritzinsky
Copy link
Member

Reapply #9925 but only do it in VMR builds. Additionally, only build the vertical's RID in a vertical build as we won't be able to restore the other apphost packs anyway.

…ding on a vertical build (where we won't have the other AppHost RIDs anyway).

Also re-enable building the language servers in VMR non-sourcebuild builds.
eng/SourceBuild.props Outdated Show resolved Hide resolved
333fred
333fred previously approved these changes Mar 1, 2024
@333fred 333fred dismissed their stale review March 1, 2024 18:20

Compile errors

…tifier doesn't seem like it wants to work nicely.
@jkoritzinsky
Copy link
Member Author

cc: @mmitche any ideas why this PR would be hitting a source-build error with what looks like the inner clone?

@mmitche
Copy link
Member

mmitche commented Mar 1, 2024

Odd...it's recursively cloning and going on forever. @dotnet/source-build-internal

@@ -12,6 +12,22 @@
<RemoveDevicePlatformSupport>true</RemoveDevicePlatformSupport>
</PropertyGroup>

<!--
In a vertical build, we'll only publish for the RID of the vertical.
In a non-vertical build, we'll publish for alll RIDs of the OS we are building on (to reduce the number of CI jobs).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In a non-vertical build, we'll publish for alll RIDs of the OS we are building on (to reduce the number of CI jobs).
In a non-vertical build, we'll publish for all RIDs of the OS we are building on (to reduce the number of CI jobs).


<PropertyGroup Condition="'$(DotNetBuild)' == 'true'">
<RuntimeIdentifiers>$(TargetRid)</RuntimeIdentifiers>
<RuntimeIdentifier>$(TargetRid)</RuntimeIdentifier>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to set both RuntimeIdentifiers (plural) and RuntimeIdentifier (singular)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use RuntimeIdentifiers below to create the "publish" job (for both VMR and non-VMR builds) and the SDK uses RuntimeIdentifier to determine which RID to create the apphost for (which we need for the correct apphost architecture in the VMR build).

@ellahathaway
Copy link
Member

Odd...it's recursively cloning and going on forever. @dotnet/source-build-internal

Looking at sequence of events:

  1. Build.proj runs SourceBuildArcadeBuild.targets
  2. SourceBuildArcadeBuild.targets runs RunInnerSourceBuildCommand
  3. RunInnerSourceBuildCommand runs /root/repos/razor//.dotnet/dotnet msbuild /m /nologo /clp:Summary /v:minimal /nr:true /warnaserror /p:TreatWarningsAsErrors=true /p:ContinuousIntegrationBuild=false /root/.nuget/packages/microsoft.dotnet.arcade.sdk/8.0.0-beta.24123.1/tools/Build.proj /bl:"/root/repos/razor/artifacts/log/Release/Build.binlog" /p:Configuration=Release /p:RepoRoot=/root/repos/razor/ /p:Restore=true /p:Build=true /p:ArcadeBuildFromSource=true /p:Rebuild=false /p:Test=false /p:Pack=true /p:IntegrationTest=false /p:PerformanceTest=false /p:Sign=false /p:Publish=false which triggers the infinite clone.

It looks like that last action re-runs ./Build.proj which causes RunInnerSourceBuildCommand to re-run and so-forth. What I'm struggling to figure out is what about that last command triggers this loop. @mthalman - Any ideas as to what is causing this?

@mthalman
Copy link
Member

mthalman commented Mar 4, 2024

@ellahathaway - Where are you getting that sequence from? I don't see any binlog attached to these builds.

@ellahathaway
Copy link
Member

ellahathaway commented Mar 4, 2024

Where are you getting that sequence from? I don't see any binlog attached to these builds.

I had to build locally in order to get the outer binlog (unable to get inner binlog due to infinite clone). This is the binlog from my local build.

@ellahathaway
Copy link
Member

ellahathaway commented Mar 4, 2024

Confirmed that removing this change fixed the infinite clone issue. Working to determine why this change that would cause the infinite looping.

@mmitche
Copy link
Member

mmitche commented Mar 4, 2024

Confirmed that removing this change fixed the infinite clone issue. Working to determine why this change that would cause the infinite looping.

@jkoritzinsky Is the intention to pass this only to the inner build, or just generally to the repo build? If it's the latter, then this should just go into the VMR's build args for razor.

@jkoritzinsky
Copy link
Member Author

I wanted to make sure it's propagated to the inner build from the outer build (as the inner build now needs it). If we can get the property value to the inner build without adding that line, we can do that instead.

eng/SourceBuild.props Outdated Show resolved Hide resolved
@mmitche
Copy link
Member

mmitche commented Mar 4, 2024

I wanted to make sure it's propagated to the inner build from the outer build (as the inner build now needs it). If we can get the property value to the inner build without adding that line, we can do that instead.

The inner build takes the outer build command line and adds additional arguments. So if it doesn't adversely affect the outer build, then you can pass it through at the outer build level.

@jkoritzinsky
Copy link
Member Author

@mmitche just to make sure I understand, does that mean that I can skip passing it here and only pass it in dotnet/installer#18843? I just want to make sure I get it right with all of the layers.

@mmitche
Copy link
Member

mmitche commented Mar 5, 2024

@mmitche just to make sure I understand, does that mean that I can skip passing it here and only pass it in dotnet/installer#18843? I just want to make sure I get it right with all of the layers.

Yes. It will need to be passed at that layer no matter what because TargetRid properties aren't ambiently visible to the repos. They need to be passed explicitly. So if it gets passed at the top level it should appear in the inner build args.

@jkoritzinsky
Copy link
Member Author

I don't have permission to merge here, can someone else merge this in?

@mmitche mmitche merged commit 0a163de into dotnet:main Mar 6, 2024
12 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Mar 6, 2024
@davidwengier
Copy link
Contributor

@ryzngard as the resident expert, can you test the build output from https://dev.azure.com/dnceng/internal/_build/results?buildId=2394804&view=results and verify this hasn't regressed VS Code again.

@ryzngard
Copy link
Contributor

ryzngard commented Mar 6, 2024

Validated the osx-arm64 build runs on osx with an m1 chip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants