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

Enable generation of aka.ms links #4948

Merged
merged 6 commits into from
Mar 3, 2020
Merged

Conversation

mmitche
Copy link
Member

@mmitche mmitche commented Feb 27, 2020

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

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
@mmitche
Copy link
Member Author

mmitche commented Feb 27, 2020

For #3963. Testing some 'real' builds now.

Copy link
Member

@dagood dagood left a 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).

eng/common/templates/post-build/post-build.yml Outdated Show resolved Hide resolved
{
using (var clientThrottle = new SemaphoreSlim(8, 8))
{
await Task.WhenAll(links.Select(async link =>
Copy link
Member

Choose a reason for hiding this comment

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

Looks like duplicated code?

Copy link
Member Author

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?

Copy link
Member

Choose a reason for hiding this comment

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

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 =>

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 =>

Copy link
Member

@dagood dagood left a comment

Choose a reason for hiding this comment

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

Some extra nitpicking. 🙂

@mmitche
Copy link
Member Author

mmitche commented Mar 2, 2020

Feedback addressed.

@mmitche
Copy link
Member Author

mmitche commented Mar 3, 2020

I think this is good to go now.

Copy link
Contributor

@JohnTortugo JohnTortugo left a comment

Choose a reason for hiding this comment

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

LGTM

@mmitche
Copy link
Member Author

mmitche commented Mar 3, 2020

@dagood ANy other concerns?

@mmitche mmitche merged commit e32ba79 into dotnet:master Mar 3, 2020
@mmitche mmitche deleted the if-8-were-9 branch February 9, 2022 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants