-
Notifications
You must be signed in to change notification settings - Fork 10.1k
docker setup from cache in GitHub CI speedup #35873
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:
- Convert your PR to a draft unless it's ready to review
- Read the contributing docs
- Before marking as "ready for review", ensure:
- the goal is clearly stated in the description
- all the tests are passing
- the change is something we merge
- include a route or your device' dongle ID if relevant
CI is failing + this seems extremely jank, fragile, hard to maintain and understand. Converting to draft. |
5841902
to
a691288
Compare
I will get this fixed. Additionally, the new docker pull-or-build routine needs some added handling when it comes to the script running a retry in case the build fails, which I'm working on now. Can I get a lock on the bounty? |
8956e9a
to
378c7d4
Compare
It's fixed, CI now runs successfully. However, there are two non-critical changes made to the image (the Dockerfile is being put inside for even faster caching, entirely without running That's the last remaining reason why the build time is <40s for now, but not yet <20s. I can show it on a separate branch with the path changed in the |
Furthermore, referencing to the "jank" argument. At the same time, Some comments may also be added to the script, despite I've felt like the code is rather self-explainatory, you may want to correct me on this. |
|
@maxime-desroches That's because of the abovementioned permission/hardcoded path problem - it's trying to build an updated image because of the updated Dockerfile (and changed compression algorithm), which would cause next runs to be fully cached. Take a look at the last commit, it's exactly at the benchmarked 31s now (and drops down to 13s if the image is Zstd-compressed and successfully uploaded). |
From now (31s run time), there are two ways to the 13s time, either:
Before a merge, the last commit |
As I said above, here is the branch https://github.com/workinright/openpilot/tree/docker-image-path-change-showcase showing the speed of https://github.com/workinright/openpilot/actions/runs/16833488479/job/47686918506 The fallback to @maxime-desroches @adeebshihadeh Do you need anything more from me to be able to review this PR? |
Please add comments explaining the major sections and logic. There's one line that is literally 450 characters wide. See this script for an example. You code might seem "self-explanatory" to you because you wrote it, but when merging code (especially infrastructure), you have to think about the current maintainers and the future ones that will have to fix and maintain this. |
@maxime-desroches Done. The fall-back is also implemented. |
Furthermore, the last commit contains a suggested way of parallelizing the CI tasks (in order to strip few more seconds), to actually reach <20s run time (benchmarked at 15s-19s on a standard runner, depending on its load). Additional ~2-3s can be stripped with parallelizing the |
Converting to draft. Discussed a plan in Discord. |
Fixes #30706