-
Notifications
You must be signed in to change notification settings - Fork 353
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
Enable generation of aka.ms links #4948
Conversation
This change enables automatic generate of 'latest' aka.ms links for builds that publish installers and checksums and are applied to a channel What this does is generate an aka.ms for the blob by stripping away version numbers. So Runtime/5.0.0-alpha.1.20062.3/dotnet-apphost-pack-5.0.0-alpha.1.20062.3-osx-x64.pkg becomes Runtime/dotnet-apphost-pack-osx-x64.pkg. We then generate the aka.ms link as such: dotnet/<channel>/Runtime/dotnet-apphost-pack-osx-x64.pkg -> https://dotnetfeed.blob.core.windows.net/akamslinkstest/Runtime/5.0.0-alpha.1.20062.3/dotnet-apphost-pack-5.0.0-alpha.1.20062.3-osx-x64.pkg
For #3963. Testing some 'real' builds now. |
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.
First pass (cut a bit short by a meeting).
src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/PublishArtifactsInManifest.proj
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifest.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifest.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Deployment.Tasks.Links/Microsoft.DotNet.Deployment.Tasks.Links.csproj
Show resolved
Hide resolved
src/Microsoft.DotNet.Deployment.Tasks.Links/src/AkaMSLinksManager.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Deployment.Tasks.Links/src/AkaMSLinksManager.cs
Outdated
Show resolved
Hide resolved
{ | ||
using (var clientThrottle = new SemaphoreSlim(8, 8)) | ||
{ | ||
await Task.WhenAll(links.Select(async link => |
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.
Looks like duplicated code?
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.
@dagood What code looks duplicated here?
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.
arcade/src/Microsoft.DotNet.Deployment.Tasks.Links/src/AkaMSLinksManager.cs
Lines 79 to 89 in 609a83e
using (HttpClient client = CreateClient()) | |
{ | |
using (var clientThrottle = new SemaphoreSlim(8, 8)) | |
{ | |
await Task.WhenAll(linksToDelete.Select(async link => | |
{ | |
try | |
{ | |
await clientThrottle.WaitAsync(); | |
bool success = await retryHandler.RunAsync(async attempt => |
arcade/src/Microsoft.DotNet.Deployment.Tasks.Links/src/AkaMSLinksManager.cs
Lines 157 to 167 in 609a83e
using (HttpClient client = CreateClient()) | |
{ | |
using (var clientThrottle = new SemaphoreSlim(8, 8)) | |
{ | |
await Task.WhenAll(links.Select(async link => | |
{ | |
try | |
{ | |
await clientThrottle.WaitAsync(); | |
bool success = await retryHandler.RunAsync(async attempt => |
src/Microsoft.DotNet.Deployment.Tasks.Links/src/AkaMSLinksManager.cs
Outdated
Show resolved
Hide resolved
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.
Some extra nitpicking. 🙂
src/Microsoft.DotNet.Deployment.Tasks.Links/src/AkaMSLinksManager.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Deployment.Tasks.Links/src/AkaMSLinksManager.cs
Outdated
Show resolved
Hide resolved
Feedback addressed. |
eng/common/templates/post-build/channels/generic-public-channel.yml
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Arcade.Sdk/tools/SdkTasks/PublishArtifactsInManifest.proj
Show resolved
Hide resolved
src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifest.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifest.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifest.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifest.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Deployment.Tasks.Links/src/CreateAkaMSLinks.cs
Outdated
Show resolved
Hide resolved
I think this is good to go now. |
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.
LGTM
@dagood ANy other concerns? |
This change enables automatic generate of 'latest' aka.ms links for builds that publish installers and checksums and are applied to a channel
What this does is generate an aka.ms for the blob by stripping away version numbers. So
Runtime/5.0.0-alpha.1.20062.3/dotnet-apphost-pack-5.0.0-alpha.1.20062.3-osx-x64.pkg becomes Runtime/dotnet-apphost-pack-osx-x64.pkg. We then generate the aka.ms link as such:
dotnet/<channel>/Runtime/dotnet-apphost-pack-osx-x64.pkg
-> https://dotnetfeed.blob.core.windows.net/akamslinkstest/Runtime/5.0.0-alpha.1.20062.3/dotnet-apphost-pack-5.0.0-alpha.1.20062.3-osx-x64.pkg