Repository navigation
ci: cache BSD sdk sources separately - #35722
willcl-ark wants to merge 3 commits into
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. External sites
ReviewsSee the guideline and AI policy for information on the review process. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
3d5f68f to
ae284ca
Compare
The base install script runs while constructing the CI image, but the BSD SDKs are only needed later when compiling the source in the running container. Moving them out of base_install.sh means we can cache them similarly to other sources/caches.
Restore and save the NetBSD, FreeBSD, and OpenBSD SDK archives through the existing cache provider. Mount the shared sdk-sources directory in the container so cache hits avoid downloading the archives again.
The cache directories need to be created and mounted in both host and Docker modes. Keeping separate lists lets the paths drift. Define each cache's source and destination once and derive the volume and bind mounts from that definition.
ae284ca to
cd4b34c
Compare
|
🐙 This pull request conflicts with the target branch and needs rebase. |
|
An alternative would be to add fallback mirrors (like in depends), but this may be fine as well (haven't looked closely) |
|
Yeah I'm open to either option too. The nice thing about caching them in CI is that nobody has to update the fallback mirror on each SDK update (or forget to!). But IMO it's the "cleaner" approach, and the fallbacks also work for contributors local development; could be superior depending on how flakey the original hosts are... I think it might be @achow101 who could add fallbacks of these, if we want to go that route? |
|
Do you recall any CI logs where the download failed? |
I do not, it was just the re-downloading them needlessly which prompted this change. |
|
Ping for rebase. |
|
@willcl-ark do you still think the changes here are worthwhile? |
|
Closing due to low value. |

Sometimes CI jobs need to (re)download *BSD SDK archives, and these downloads can delay or fail the job, as has been happening recently.
The SDKs are currently downloaded and extracted while building the CI image itself; this means that when the relevant image-build cache is missed or invalidated, the SDK archives are downloaded again, which is unnecessary.
Instead, cache the BSD SDK archives separately and mount them into the runtime container. Move the BSD SDK setup out of
01_base_install.shand run it after the container starts, so it is no longer part of the image build and the BSD SDKs are no longer part of the image build cache/layers.This means rebuilding the BSD images no longer relies on pulling the SDK archives, reducing reliance and load we have on archive servers in many cases.
While touching 02_run_container.py and adding new paths to it, unify path handling for all caches a bit more.