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

Use Pants'-managed runs-on runners for Linux aarch64 CI #427

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

huonw
Copy link
Contributor

@huonw huonw commented Nov 25, 2024

This replaces our use of Circle CI's arm64 Linux runners for both testing and releasing with the runs-on runners that Pantsbuild configures (and pays for) in AWS, via https://runs-on.com

This has a few benefits:

  • single tool to learn for configuring CI
  • single source of credentials (currently the release build is failing due to a token seemingly being invalid, but it's not obvious to me how to fix this)
  • more atomicity, e.g. instead of the release needing to trigger a separate Circle CI build that runs in the background, we can just use the normal GitHub "wait for another job" rules

It also has downsides: we're going from free resources to paid. However, the incremental cost for the scie-pants repo should be quite small, compared to the main pants repo:

  • this repo is low volume (over the last 12 months we've done about 220 CI runs total)
  • things run quickly (in this PR, ~7 minutes without a cache, ~4 minutes with)

I estimated cost based on US$0.1344/hour for a on-demand t4g.xlarge 4 core instance in us-east-1 (I'm not sure this is our exact configuration). Prices in practice may be cheaper, because Runs-On attempts to use spot instances).

  • per build, we're looking at US$0.0090 (with cache) to US$0.016 (without cache)
  • per month, we're looking at ~20 builds, so US$0.18 to US$0.32 (but likely cheaper given this is on-demand costs)

If this starts adding up a lot, we can likely optimise. For instance: optimise spot-instance selection for lowest cost not "PCO", and use more caching (whether that's coarse-grained actions/cache or fine-grained sccache).

Fixes #422, fixes #430

@benjyw
Copy link
Contributor

benjyw commented Nov 25, 2024

Note the image label ubuntu22-full-arm64-python3.7-3.13 not found error...

@huonw
Copy link
Contributor Author

huonw commented Nov 25, 2024

Where do I see that error? It's not in the GitHub UI that I can spot?

I'm imagining #428 (add the config to the main branch first) may help.

@benjyw
Copy link
Contributor

benjyw commented Nov 27, 2024

Where do I see that error? It's not in the GitHub UI that I can spot?

I'm imagining #428 (add the config to the main branch first) may help.

That error is in emails from RunsOn, but you can see CI stalling out on it here: https://github.com/pantsbuild/scie-pants/actions/runs/12019942836/job/33507556110?pr=427

huonw added a commit that referenced this pull request Dec 3, 2024
Preparation for #422: this add runs-on configuration to this repo, so we
can using it to run GitHub Actions, replacing our CircleCI config
(#427).
@huonw
Copy link
Contributor Author

huonw commented Dec 3, 2024

To land this, someone with more repository admin powers than me will need to mark the circle CI jobs as not-required (and the linux-arm64 ones as required, while you're there).

Once this lands, I'll do a beta release to validate the release workflow changes.

@huonw huonw marked this pull request as ready for review December 3, 2024 22:21
@huonw huonw requested a review from benjyw December 3, 2024 22:21
@benjyw
Copy link
Contributor

benjyw commented Dec 4, 2024

To land this, someone with more repository admin powers than me will need to mark the circle CI jobs as not-required (and the linux-arm64 ones as required, while you're there).

Once this lands, I'll do a beta release to validate the release workflow changes.

The branch protection rules have been updated as requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants