-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Include the SDK tarball in poison checks #48550
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -124,13 +124,13 @@ | |||
<UsingTask TaskName="Microsoft.DotNet.SourceBuild.Tasks.LeakDetection.CheckForPoison" AssemblyFile="$(MicrosoftDotNetSourceBuildTasksLeakDetectionAssembly)" TaskFactory="TaskHostFactory" Condition="'$(EnablePoison)' == 'true'" /> | ||||
<Target Name="ReportPoisonUsage" | ||||
BeforeTargets="Build" | ||||
DependsOnTargets="CopySdkArchive" | ||||
Condition="'$(EnablePoison)' == 'true'" | ||||
Inputs="$(MSBuildProjectFullPath)" | ||||
Outputs="$(BaseIntermediateOutputPath)ReportPoisonUsage.complete" > | ||||
<ItemGroup> | ||||
<!-- Exclude the Private.SourceBuilt.Artifacts archive from poison usage scan. --> | ||||
<AssetToCheck Include="$(ArtifactsAssetsDir)*$(ArchiveExtension)" /> | ||||
<AssetToCheck Remove="$(ArtifactsAssetsDir)$(SourceBuiltArtifactsTarballName)*" /> | ||||
<!-- Include dotnet-sdk-*.tar.gz --> | ||||
<AssetToCheck Include="$(ArtifactsAssetsDir)dotnet-sdk-*$(ArchiveExtension)" /> | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adding an Error Task that throws when AssetToCheck is empty so that this doesn't regress easily again. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We already have it:
It wasn't failing before due to us collecting 2 symbols tarballs, so There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right. You could change this to verify that the sdk archive is included. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Example:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I'll add that. It doesn't hurt to have this specific check. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will get rid of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed with 3cd22d9 |
||||
<!-- Include shipping nuget packages. --> | ||||
<ShippingPackageToCheck Include="$(ArtifactsShippingPackagesDir)**/*.nupkg" /> | ||||
<!-- Add and mark SBRP packages to validate that they have the correct poison attribute. --> | ||||
|
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 need to use the (hardlink) copy instead of just
$(SdkTarballPath)
? The copy only exists as a convenience for SB partners:sdk/src/SourceBuild/content/eng/finish-source-only.proj
Line 306 in fe5ce36
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 model preserves an option to add more asset files in the future.
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'm following. The current include only matches on the SDK archive itself, not on other files.
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.
To clarify. Currently, this will only match the SDK. The intent is to preserve a possibility to expand
AssetToCheck
in the future, with additional files in source-build preferred root assets dir. Since we already copy (hard-link) the SDK to this directory, I'm keeping it consistent to reference the SDK from the same dir, using a pattern.