fix: Download JS SDKs at once in a single session #3417
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.
Since we download JS SDKs in a for loop which invokes a separate docker container for each
curlrun, we seem to be triggering some sort of a DoS protection. And rightfully so as the old method causes TCP and TLS churn although we advertise we support HTTP/1.1 and HTTP/2.This patch does a few things:
curls globbing support to download all files in one go, maxing TCP and TLS reuse. This should fix the DoS protectioncurl's--compressoption to make things even more efficientcurl's--create-dirsto save 1 docker container run per version for creating the directory-IHEADchecks in favor of a-ffail option combined with|| truewhich makes curl fail and not write the output on a non-200 response while still allowing the script to succeed