-
Notifications
You must be signed in to change notification settings - Fork 441
Create and publish VerticalAssetManifest #19062
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
Create and publish VerticalAssetManifest #19062
Conversation
...ks.PublishVerticalManifest/Microsoft.DotNet.SourceBuild.Tasks.PublishVerticalManifest.csproj
Outdated
Show resolved
Hide resolved
.../tasks/Microsoft.DotNet.SourceBuild.Tasks.PublishVerticalManifest/PublishVerticalManifest.cs
Outdated
Show resolved
Hide resolved
.../tasks/Microsoft.DotNet.SourceBuild.Tasks.PublishVerticalManifest/PublishVerticalManifest.cs
Outdated
Show resolved
Hide resolved
.../tasks/Microsoft.DotNet.SourceBuild.Tasks.PublishVerticalManifest/PublishVerticalManifest.cs
Outdated
Show resolved
Hide resolved
.../tasks/Microsoft.DotNet.SourceBuild.Tasks.PublishVerticalManifest/PublishVerticalManifest.cs
Outdated
Show resolved
Hide resolved
.../tasks/Microsoft.DotNet.SourceBuild.Tasks.PublishVerticalManifest/PublishVerticalManifest.cs
Outdated
Show resolved
Hide resolved
...ks.PublishVerticalManifest/Microsoft.DotNet.SourceBuild.Tasks.PublishVerticalManifest.csproj
Outdated
Show resolved
Hide resolved
.../tasks/Microsoft.DotNet.SourceBuild.Tasks.PublishVerticalManifest/PublishVerticalManifest.cs
Outdated
Show resolved
Hide resolved
…ackages when in source build
.../tasks/Microsoft.DotNet.SourceBuild.Tasks.PublishVerticalManifest/PublishVerticalManifest.cs
Outdated
Show resolved
Hide resolved
.../tasks/Microsoft.DotNet.SourceBuild.Tasks.PublishVerticalManifest/PublishVerticalManifest.cs
Outdated
Show resolved
Hide resolved
.Select(attribute => attribute.ToString()) | ||
.ToHashSet(); | ||
|
||
if (assetManifestXmls.Skip(1).Any(assetManifestXml => |
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.
Clever
.../tasks/Microsoft.DotNet.SourceBuild.Tasks.PublishVerticalManifest/PublishVerticalManifest.cs
Outdated
Show resolved
Hide resolved
--> | ||
<EnvironmentVariables Include="OfficialBuildId=$(OfficialBuildId)" /> | ||
<!-- The BUILD_BUILDNUMBER environmental variable is set by the AzDo agent. We're overwriting it below, so we need to save it in a different env variable --> | ||
<EnvironmentVariables Include="VmrBuildNumber=$(BUILD_BUILDNUMBER)"/> |
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 think you actually want this in the root build.proj
and not the repo-project build proj. since the VerticalManifest publish is not specific to a repo project. That probably means you don't have to set an env var, just use BUILD_BUILDNUMBER
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.
Btw, I think it should be based off OfficialBuildId. That should be set at some level to BUILD_BUILDNUMBER.
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 defined the OfficialBuildId
property in the base Directory.Build.props
. My msbuild knowledge might be wrong here, but I think it will have the value we want it to when we're calling the PublishVerticalManifest
task, since the values set in repo-projects
will be reset
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.
Ahh, so this is for future use?
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.
No we need it for the PublishVerticalManifest
task, to set the correct BuildId. But it looks like it's not working as I thought it should. The OfficialBuildId
is not getting set to anything after we're done with repo-projs
. Think we'll have to save it in a different property before we start building
.../tasks/Microsoft.DotNet.SourceBuild.Tasks.PublishVerticalManifest/PublishVerticalManifest.cs
Outdated
Show resolved
Hide resolved
.../tasks/Microsoft.DotNet.SourceBuild.Tasks.PublishVerticalManifest/PublishVerticalManifest.cs
Outdated
Show resolved
Hide resolved
.../tasks/Microsoft.DotNet.SourceBuild.Tasks.PublishVerticalManifest/PublishVerticalManifest.cs
Outdated
Show resolved
Hide resolved
.../tasks/Microsoft.DotNet.SourceBuild.Tasks.PublishVerticalManifest/PublishVerticalManifest.cs
Outdated
Show resolved
Hide resolved
...ks.PublishVerticalManifest/Microsoft.DotNet.SourceBuild.Tasks.PublishVerticalManifest.csproj
Show resolved
Hide resolved
.../tasks/Microsoft.DotNet.SourceBuild.Tasks.PublishVerticalManifest/PublishVerticalManifest.cs
Outdated
Show resolved
Hide resolved
.../tasks/Microsoft.DotNet.SourceBuild.Tasks.PublishVerticalManifest/PublishVerticalManifest.cs
Outdated
Show resolved
Hide resolved
.../tasks/Microsoft.DotNet.SourceBuild.Tasks.PublishVerticalManifest/PublishVerticalManifest.cs
Outdated
Show resolved
Hide resolved
using System.Xml.Linq; | ||
|
||
namespace Microsoft.DotNet.SourceBuild.Tasks.PublishVerticalManifest | ||
namespace Microsoft.DotNet.SourceBuild.Tasks |
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 isn't a source-build task. Consider renaming this to something like Microsoft.DotNet.UnifiedBuild.Tasks
.
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 see that this would force you to rename everything, so I'm ok with keeping this name for now.
...ools/tasks/Microsoft.DotNet.SourceBuild.Tasks.MergeAssetManifests/PublishVerticalManifest.cs
Outdated
Show resolved
Hide resolved
…eBuild.Tasks.MergeAssetManifests/PublishVerticalManifest.cs
src/SourceBuild/content/build.proj
Outdated
<Target Name="MergeAssetManifests" AfterTargets="Build"> | ||
<PropertyGroup> | ||
<MergedAssetManifestOutputPath>$(ArtifactsDir)VerticalManifest.xml</MergedAssetManifestOutputPath> | ||
<VmrBuildNumber>$(BUILD_BUILDNUMBER)</VmrBuildNumber> |
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.
Move this property after L7 in this file and see if that changes anything.
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.
should work there, before we go into repo-projects
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.
Maybe a repo changes this env var?!? Super weird.
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.
Yeah, no idea why it's not available now. Looks like we stopped publishing binlogs..
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 don't see this variable mentioned anywhere else in the code.. I reverted back to the Build.props change
<!-- The predefined environmental variable `BUILD_BUILDNUMBER` is getting overwritten in repo-projects, | ||
so save it in a different varialbe--> | ||
<PropertyGroup> | ||
<VmrBuildNumber>$(BUILD_BUILDNUMBER)"</VmrBuildNumber> |
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.
Isn't the extra "
wrong?
dotnet/source-build#4198
Adds a task that creates a VerticalAssetManifest.
Needs to be merged after #18917