Skip to content

Use non-stable version for SB SDK filename on publish#2750

Merged
mthalman merged 6 commits intodotnet:release/10.0.1xxfrom
mthalman:sb-publish-path
Oct 8, 2025
Merged

Use non-stable version for SB SDK filename on publish#2750
mthalman merged 6 commits intodotnet:release/10.0.1xxfrom
mthalman:sb-publish-path

Conversation

@mthalman
Copy link
Member

@mthalman mthalman commented Oct 6, 2025

The source-built SDK that is published as an artifact of a VMR build uses the same filename that is produced by the output of the sdk repo. In the case of stable versioning, this can lead to collisions in the storage account because it doesn't have any other part of the path that produces uniqueness. This differs from the source-built artifacts tarball, for example, which always uses a non-stable version in its filename.

This is fixed by adding a symlink file which references the original SDK tarball. The symlink uses the non-stable version filename. The metadata constructed for publishing then references the symlink file so that the publishing manifest file is defined as we want. This allows the SDK tarball that is produced by the VMR built to still be named as it has always been but with the added benefit of always using a non-stable version filename when actually publishing that file.

Review the changes by viewing each commit. The first commit does a small refactor by moving logic source-build-specific logic from Publishing.props to PublishSourceBuild.props. The rest is actual changes to fix the issue.

@mthalman mthalman enabled auto-merge (squash) October 6, 2025 20:40
@mthalman mthalman disabled auto-merge October 7, 2025 14:55
@mmitche
Copy link
Member

mmitche commented Oct 7, 2025

@mthalman Let me know when you're satisfied with this change, so I can validate it as part of the servicing exercise.

@mthalman
Copy link
Member Author

mthalman commented Oct 7, 2025

I'm still looking at it. Something's not quite right.

The file at assets/Release is named dotnet-sdk-10.100-rtm-centos.10-x64.tar.gz when it should be named dotnet-sdk-10.0.100-ci-centos.10.x64.tar.gz. I don't see this locally. Not sure if this something weird about using file linking and/or AzDO artifact publishing or not. Investigating.

@mthalman
Copy link
Member Author

mthalman commented Oct 7, 2025

This is so confusing. The Copy task says it's copying the SDK tarball to the assets location but when you look at the pipeline artifacts, it doesn't exists there:

Copy
    Assembly = /__w/1/s/.dotnet/sdk/10.0.100-rc.1.25451.107/Microsoft.Build.Tasks.Core.dll
    Parameters
        SourceFiles = /__w/1/s/artifacts/assets/Release/Sdk/10.0.100-rtm/dotnet-sdk-10.0.100-ci-centos.10-x64.tar.gz
        DestinationFolder = /__w/1/s/artifacts/assets/Release/
        SkipUnchangedFiles = True
    Copying file from "/__w/1/s/artifacts/assets/Release/Sdk/10.0.100-rtm/dotnet-sdk-10.0.100-ci-centos.10-x64.tar.gz" to "/__w/1/s/artifacts/assets/Release/dotnet-sdk-10.0.100-ci-centos.10-x64.tar.gz".

But that assets/Release/dotnet-sdk-10.0.100-ci-centos.10-x64.tar.gz file is not there in the artifacts:

image

I have no idea what's going on.

@mmitche
Copy link
Member

mmitche commented Oct 7, 2025

I think I see it. Your copy is from /s/artifacts to /s/artifacts. The artifact output is in the staging directory, /a/artifacts. Most of the output gets there via PushToBuildStorage.

@mthalman
Copy link
Member Author

mthalman commented Oct 8, 2025

Ok, this looks to be working now.

@mthalman mthalman requested a review from mmitche October 8, 2025 15:13
@mthalman mthalman enabled auto-merge (squash) October 8, 2025 15:13
@mthalman mthalman merged commit 58a20a9 into dotnet:release/10.0.1xx Oct 8, 2025
10 checks passed
@mthalman mthalman deleted the sb-publish-path branch October 8, 2025 16:02
@akoeplinger
Copy link
Member

@mthalman was this ported to main?

@mthalman
Copy link
Member Author

/backport to main

@github-actions
Copy link
Contributor

Started backporting to main (link to workflow run)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants