question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make Core-SDK download blobs from private location when public location fail

See original GitHub issue

Similarly to what is described in this issue and implemented in this PR, Core-SDK will need a similar work, but for downloading .zip blobs and implemented in MSBuild. The logic, I believe, should be the same: builds will initially lookup the file in the public location and, if the download fail and the build is internal, try download from the private location.

Link to sample failing build: https://dnceng.visualstudio.com/internal/_build/results?buildId=393720&view=logs&j=695ed18d-4f96-5f5b-a547-692c59452cfc&t=581b320b-1054-5daf-6073-fa89a72ce14b&l=63

The build that updated Core-SDK eng\version.props file in the above build’s branch is public and thus published the blob to a public location. However, the current logic in core-sdk is to whenever the current build is an internal one look for the blobs in MSRC only, and thus it doesn’t find the file published to the public location.

The implementation I’m planning is this:

  • Augment the DownloadFile task to receive a PrivateUri parameter which should be set only if the build is internal.
  • DownloadFile task will only try to download files from PrivateUri if the download using Uri fail with error code in the 400 range.

What do you think? @mmitche @livarcocc @dagood @riarenas @markwilkie

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
JohnTortugocommented, Oct 22, 2019

I think the issue is now clarified - please raise your hand if not 😃. So I’ll move forward with the plan outlined in the issue’s description.

@livarcocc can you take a quick look at the plan and let me know if it makes sense to you?

1reaction
riarenascommented, Oct 22, 2019

I think that’s what @JohnTortugo is currently implementing. But yes, we have to do that now.

The way I understand the state of the world now is:

  1. When built from an internal/* branch, Core-SDK will look for all its input blobs in the private location (https://github.com/dotnet/core-sdk/pull/4753). I understood this would be enough, as we wouldn’t try to give public builds for inputs during a servicing release.
  2. When building from the internal project, Arcade will try to install the specified additional runtimes by first attempting using the public location, if that doesn’t work, try looking in private storage. (https://github.com/dotnet/arcade/pull/4122)

What this issue asks for, is that we give item 1 in that list the same treatment as item 2, as my understanding regarding how the servicing SDK would be constructed was incorrect, and we will need to implement this in the core-sdk repo.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trouble downloading azure storage blobs under private ...
The reason you are not able to download the blobs from a private container is because you are simply returning the blob's URL...
Read more >
Configure anonymous public read access for containers ...
Public read access for blobs only: Blobs within the container can be read by anonymous request, but container data is not available anonymously....
Read more >
Errors installing the SDK during builds · Issue #34015
Downloading 'https://dot.net/v1/dotnet-install.sh' Trying to run ... Failed to install dotnet SDK from public location (exit code '1').
Read more >
Configuring AWS DataSync transfers with Microsoft Azure ...
Creating your Azure Blob Storage transfer location. You can configure DataSync to use your Azure Blob Storage as a transfer source or destination....
Read more >
Azurite
Extension for Visual Studio Code - An open source Azure Storage API compatible server.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found