-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix: Download JS SDKs at once in a single session #3417
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #3417 +/- ##
=======================================
Coverage 99.01% 99.01%
=======================================
Files 3 3
Lines 203 203
=======================================
Hits 201 201
Misses 2 2 ☔ View full report in Codecov by Sentry. |
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.
Lets just do this for now.
Since we download JS SDKs in a for loop which invokes a separate docker container for each
curl
run, 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:
curl
s globbing support to download all files in one go, maxing TCP and TLS reuse. This should fix the DoS protectioncurl
's--compress
option to make things even more efficientcurl
's--create-dirs
to save 1 docker container run per version for creating the directory-I
HEAD
checks in favor of a-f
fail option combined with|| true
which makes curl fail and not write the output on a non-200 response while still allowing the script to succeed