[windows] Fix downloading dependencies from mirrors #17231
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This reverts commit de42ae8 see #13293
As mentioned in the comments in the commit it breaks downloading dependencies from any mirror which does not return the
Location
HTTP header. Furthermore it invalidates the value ofERRORLEVEL
which now contains the return code offindstr
instead of fromwget
.Motivation and Context
When setting up my Windows 10 dev machine I noticed that lots of windows dependency downloads failed randomly and I had to restart
download-dependencies.bat
alot until I got all dependencies. Now when I setup the new windows build slave I ran into the same problem again. I then realized that from the 11 mirrors I triedLocation
HTTP headerwhich leads to the download being considered as failed (for the second reason that's correct).
This should also be backported to Leia since it was introduced there and will also lead to build failures there.
Types of change
Checklist: