-
Notifications
You must be signed in to change notification settings - Fork 8
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
Random curl failures when installing on GitHub Actions #48
Comments
@ptmkenny it's quite possible that you're running into GitHub's rate limit. Is it possible to use the following in your GitHub action? env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" This will inject the GitHub token paired with your CI runner in the environment and in turn, the installer will use it for downloading the CLI and circumvent the GitHub API rate limit. You can see how the token is used here Lines 381 to 389 in 17e7009
Then, this is called to get the latest version Line 181 in 17e7009
and to get the artifacts Line 399 in 17e7009
|
Thanks that makes sense. I didn't realize the installer needed auth , so I'll try running it with the token then. I won't be able to test for a couple days but I'll confirm when I get the chance. |
Maybe we should consider hosting the binaries elsewhere to avoid this issue, like for the legacy CLI. |
Hosting on GitHub simplifies things a lot, but we could consider falling back to an alternative when we're in a CI system without a |
I'm a fan of hosting on github, and releases can be accessed without a token, but there is a strict limit if you don't have a token going. However, you can use https://nightly.link/ to get around this. DDEV does it so people can access without those kind of issues, and it works for github-attached zipballs as well. |
We could also host it on Platform.sh 🙂 |
Yes, of course. that introduces build/push complexity, but definitely solves this class of problem. |
@ptmkenny has your issue been resolved after adding the environment variable? |
@akalipetis Thanks, I did manage to get this working with an environment variable. But, because I set up the build environment inside an action instead of inside the workflow directly, I have to pass the environment variable as an input to the action; accessing secrets directly within an action is not supported. So switching from the legacy CLI to the new one added ~20 lines of code to my workflow passing the token around. It would be great if the current version warned the user when the installer was called without |
Thanks @ptmkenny - this would be a nice improvement indeed! |
A couple days ago, I upgraded from the legacy CLI to the new CLI.
I've noticed that the actions are failing fairly frequently (for example, in a series of actions that downloads the CLI 12 times, 2 failures) due to a curl error when downloading platformsh:
Here's the step in the GitHub action, copied from the platformsh docs:
I can't remember getting such a failure with the legacy CLI, and if I did, I didn't get one every test run like I'm getting now.
Any ideas about how to debug this would be much appreciated.
The text was updated successfully, but these errors were encountered: