-
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?
Conversation
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.
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
Files not reviewed (1)
- src/SourceBuild/content/eng/finish-source-only.proj: Language not supported
<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 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:
<!-- Copy SDK archive to assets root as source-only build partners expect the file to be there. --> |
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.
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.
Does this list indicate that the product has a ton of poisoned artifacts? (i.e. SBRP)
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.
Not likely, as some of those are ref. assemblies and the rest are in netfx folders that aren't usable in source build.
I am investigating those issues at the moment. Will create a tracking issue as well.
<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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
We already have it:
<Error Condition="'@(AssetToCheck)' == ''" Text="No assets will be poison checked - this is unexpected!" /> |
It wasn't failing before due to us collecting 2 symbols tarballs, so AssetToCheck
wasn't empty.
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.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Example:
<SdkArchive Include="..." />
<Error Condition="'@(SdkArchive)' == ''" Text="eRROR" />
<AssetToCheck Include="@(SdkArchive)" />
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, 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 comment
The reason will be displayed to describe this comment to others. Learn more.
Will get rid of AssetToCheck
items and only have SdkArchive
- we can add additional asset files if we need them in the future. Being explicit makes sense here. I will continue to obtain the SDK archive from source-build specific location.
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.
Fixed with 3cd22d9
Fixes: dotnet/source-build#5052
We used to scan the sdk before, but this was regressed by some change in build infra. This PR adds the required
DependsOnTarget
attribute, that would ensure that SDK is present in the assets dir.As we do not need to scan other tarballs in the assets dir, I've updated the pattern to only select the SDK tarball. We do not need to scan symbols tarballs. By explicitly including the SDK, the existing check will ensure that there are no regressions in the future.
This PR also updates the poison baseline to account for those discovered in the SDK. Tracking issue for fixing poisons: dotnet/source-build#5057