-
Notifications
You must be signed in to change notification settings - Fork 16
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
Running into timeout issues when downloading Serverless cli #15
Comments
For me this timeout is 80%+ of the time and means this orb doesn't work. The issue seems to be that CircleCI is appearing to be in china to the serverless install script. The timed out log entry is: From the orb source: This bash script seems to use myqcloud.com only if it is detected that the caller is in China. And that URL is definitely trying to download from China. Because the only part of the script that I need is the actual serverless install I have resolved this issue by adding the following to replace
This forces it to use the US source and voila... no timeout. If CircleCI only builds in the US, then adding this to the orb would probably fix the issue. |
Sorry I should have updated. It turned out to be two things: the first is that IFF it gets the script, the script was downloading from China. But also the script itself is being hosted in china (wtf serverless?)
So we can see it is being pulled from https://sls-standalone-1300963013.cos.ap-shanghai.myqcloud.com/install.sh which can time out because it is in China. Serverless mirrors its files in the US too so replacing the URL with https://sls-standalone-sv-1300963013.cos.na-siliconvalley.myqcloud.com/install.sh means china doesn't get included. |
@nshgraph thank you for providing this info. It seems like maybe something we might be looking to serverless to correct but I wanted to know if you ended up finding a proper solution that worked for you long time. I am in a maintenance sprint for this orb, but this is very difficult for me to reproduce. I will add We can pull from that second URL but I have concerns this will be difficult to keep up to date and based on the age of this issue, likely already is. Edit: locally the geolocation is not having an effect for me so far. While i wasnt able to replicate this on CircleCI.com, it is happening locally. Installing even with the geolocation i seem to be getting the CN mirror. I am attempting to get a look at the install script but also considering what if we installed with NPM, I believe the serverless bin requires Node anyway but I am trying to confirm that. If we do not need node to run the bin then I would not want to add that dependency. Edit 2:
I am doing more debugging now from within CircleCI SSH to see if we could get this operating normally because there is a chance someone will need/want the china CDN if the user is not on CircleCI Cloud. |
Hello, https://github.com/CircleCI-Public/serverless-framework-orb/releases/tag/v2.0.0 |
Orb Version
1.0.1
Describe the bug
The following curl command to install the Serverless cli in the
setup
command occasionally results in a timeout:curl -o- -L https://slss.io/install | bash
To Reproduce
Use the
circleci/serverless-framework
orb in a build, and run thesetup
command.Expected behavior
The Serverless cli should be installed after running the
setup
command.Additional context
This is an intermittent issue, but I noticed it happened around 10%~15% of the time.
Adding a retry to the curl command on timeout might address the issue.
The text was updated successfully, but these errors were encountered: