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

Exclude packages from checksum generation #33722

Merged
merged 4 commits into from
Mar 19, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/installer/publish/prepare-artifacts.proj
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
<SuppressFinalPackageVersion>true</SuppressFinalPackageVersion>
</PropertyGroup>

<!-- Create all the checksum files. Exclude anything that ends
in .nupkg (symbol and regular packages). -->
<Target Name="CreateChecksums">
<ItemGroup>
<ArtifactsForGeneratingChecksums
Include="@(UploadToBlobStorageFile)"
Excldude="*.nupkg"
Copy link
Member

Choose a reason for hiding this comment

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

There is a typo in Exclude.

Suggested change
Excldude="*.nupkg"
Exclude="*.nupkg"

Copy link
Member

Choose a reason for hiding this comment

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

Should we include *.snupkg so that when/if we add them, they're excluded?

Copy link
Member

Choose a reason for hiding this comment

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

They won't be found by any of this by default, so nothing needs to be done to prevent that:

<DownloadedSymbolNupkgFile Include="$(DownloadDirectory)**\*.symbols.nupkg" />
<DownloadedNupkgFile
Include="$(DownloadDirectory)**\*.nupkg"
Exclude="@(DownloadedSymbolNupkgFile)" />

FWIW, I have concerns that snupkg doesn't meet dotnet/runtime requirements based on the spec last time I looked: dotnet/arcade#167 (comment).

Copy link
Member

Choose a reason for hiding this comment

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

I don't think this will work because the nupkgs aren't in the working dir. Maybe use a Condition on %(Extension) instead, or exclude @(DownloadedSymbolNupkgFile);@(DownloadedNupkgFile)?

Copy link
Member

Choose a reason for hiding this comment

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

Oh, this has actually already been done:

<!-- Add files that are not affected by filtering. -->
<UploadToBlobStorageFile
Include="@(DownloadedArtifactFile)"
Exclude="@(DownloadedSymbolNupkgFile);@(DownloadedNupkgFile)" />

This PR should be a no-op.

Copy link
Member Author

@mmitche mmitche Mar 18, 2020

Choose a reason for hiding this comment

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

Hrmm...that's odd then, because we're getting checksums for the blobs:

https://dev.azure.com/dnceng/internal/_build/results?buildId=563472&view=artifacts&type=publishedArtifacts

I'll dig deeper.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, that's strange. Later in that file the nupkgs are added back in:

<UploadToBlobStorageFile Include="@(NupkgToPublishFile)" />

<UploadToBlobStorageFile Include="@(SymbolNupkgToPublishFile)" />

I don't know why we'd be doing that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like it's the ultimate list of things to upload to the parepred artifacts location

DestinationPath="%(FullPath)$(ChecksumExtension)" />

<GeneratedChecksumFile Include="@(ArtifactsForGeneratingChecksums -> '%(DestinationPath)')" />
Expand Down