Skip to content
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

Add a Ruby script for downloading cargo-about #14

Merged
merged 3 commits into from
Sep 6, 2022

Conversation

lopopolo
Copy link
Member

@lopopolo lopopolo commented Sep 6, 2022

Fixes some flakes in CI and the nightly builder where curl fails to
fetch release metadata from GitHub with:

curl: (22) The requested URL returned error: 403

Add Ruby script for downloading cargo-about

Downloading release information with curl and piping it to jq is flaky
in CI and in the nightly builder, sometimes resulting in 403 errors that
curl treats as unrecoverable.

curl has a --retry-all-errors flag but it is unavailable on Windows or
Ubuntu 20.04.

Add a small Ruby script using only the standard library that is
installed as part of the generate_third_party gem. This script
features retries on network errors, logging with log GitHub Actions log
groups, and automatically adds the resulting cargo-about binaries to
$PATH.

The script takes a platform as its first argument which conveniently
matches the runner.os context variable in a GitHub Actions context.

Fixes some flakes in CI and the nightly builder where curl fails to
fetch release metadata from GitHub with:

```
curl: (22) The requested URL returned error: 403
```
@lopopolo lopopolo added the A-github-action Area: GitHub Action API and configuration. label Sep 6, 2022
@lopopolo lopopolo changed the title Retry all errors with curl Add a Ruby script for downloading cargo-about Sep 6, 2022
@lopopolo lopopolo added the A-cargo-about Area: cargo-about installation and configuration. label Sep 6, 2022
Downloading release information with curl and piping it to jq is flaky
in CI and in the nightly builder, sometimes resulting in 403 errors that
curl treats as unrecoverable.

curl has a `--retry-all-errors` flag but it is unavailable on Windows or
Ubuntu 20.04.

Add a small Ruby script using only the standard library that is
installed as part of the `generate_third_party` gem. This script
features retries on network errors, logging with log GitHub Actions log
groups, and automatically adds the resulting cargo-about binaries to
$PATH.

The script takes a platform as its first argument which conveniently
matches the `runner.os` context variable in a GitHub Actions context.
@lopopolo lopopolo force-pushed the lopopolo/fix-flake-403-responses-github-api branch from 4d56510 to 0e41774 Compare September 6, 2022 05:03
@lopopolo lopopolo merged commit b7f7814 into trunk Sep 6, 2022
@lopopolo lopopolo deleted the lopopolo/fix-flake-403-responses-github-api branch September 6, 2022 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cargo-about Area: cargo-about installation and configuration. A-github-action Area: GitHub Action API and configuration.
Development

Successfully merging this pull request may close these issues.

None yet

1 participant