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

[$500 bounty] Speedup CI setup to <20s #30706

Open
adeebshihadeh opened this issue Dec 13, 2023 · 5 comments
Open

[$500 bounty] Speedup CI setup to <20s #30706

adeebshihadeh opened this issue Dec 13, 2023 · 5 comments
Labels
bounty CI / testing good first issue Feasible for new contributers

Comments

@adeebshihadeh
Copy link
Contributor

adeebshihadeh commented Dec 13, 2023

The best case time of the setup-with-retry stage that runs in most of our CI jobs is ~1m4s. All it does is setup the openpilot environment, and most of that time is pulling an already built docker image. This puts a hard limit on how fast our jobs can finish; a job that finishes in 1m is 10x better than one that finishes in 2-3m.

Some possible strategies:

  • make the docker image smaller
  • move the docker cache somewhere faster
  • ditch docker, install directly on the 20.04 runner, and cache the apt and pip packages

Requirements for the bounty:

  • all setup-with-retry on the final PR commit must finish in less than <20s

Sub-bounty of $100 for <40s if you can't get to <20s. $500 is for <20s. Bounties don't stack.

https://github.com/commaai/openpilot/blob/master/.github/workflows/setup-with-retry/action.yaml

@adeebshihadeh adeebshihadeh pinned this issue Dec 13, 2023
@adeebshihadeh adeebshihadeh changed the title [$100 bounty] Speedup CI setup to <40s [$500 bounty] Speedup CI setup to <20s Dec 18, 2023
@nelsonjchen
Copy link
Contributor

wild idea, compatibility unknown, gain (or loss) unknown:

use containerd or similar drop-in runtime instead of stock GHA moby with lazy loading of compatible estargz docker image "pages".

https://github.com/crazy-max/ghaction-setup-containerd

@jimbrend
Copy link

jimbrend commented Dec 20, 2023

@lukechilds what do you think?
just out of curiosity on first glance, either way

@jimbrend
Copy link

  • ditch docker, install directly on the 20.04 runner, and cache the apt and pip packages

what are the cons here?

@mbiernat42
Copy link

That sleep 30 seems questionably long

@profknow
Copy link

If it's just loading previously configured env, then why not just operate on Flash Drive, leaving the state where it was when last active.

Even on my own computer, I often keep copies of working system/environments that I simply dump into active memory without "booting up". It saves SO MUCH time when you already know the final state anyway.

--Loren Grayson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty CI / testing good first issue Feasible for new contributers
Projects
Status: Open
5 participants