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

Cache fuchsia checkout in a docker layer #138683

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

erickt
Copy link
Contributor

@erickt erickt commented Mar 19, 2025

This allows the Fuchsia checkout to be cached and shared across builds, which avoids any rate limits with checking out Fuchsia. Note though that the Fuchsia checkout is about 27GiB as of checkout, which might cause separate problems.

try-job: x86_64-fuchsia

@rustbot
Copy link
Collaborator

rustbot commented Mar 19, 2025

r? @marcoieni

rustbot has assigned @marcoieni.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Mar 19, 2025
@erickt
Copy link
Contributor Author

erickt commented Mar 19, 2025

@bors try

@erickt erickt marked this pull request as draft March 19, 2025 03:21
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 19, 2025
Cache fuchsia checkout in a docker layer

This allows the Fuchsia checkout to be cached and shared across builds, which avoids any rate limits with checking out Fuchsia. Note though that the Fuchsia checkout is about 27GiB as of checkout, which might cause separate problems.

try-job: x86_64-fuchsia
@bors
Copy link
Contributor

bors commented Mar 19, 2025

⌛ Trying commit 4b63766 with merge 191a16c...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Mar 19, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 19, 2025
@erickt erickt force-pushed the fuchsia-checkout branch from 4b63766 to 99f9a35 Compare March 19, 2025 03:26
This allows the Fuchsia checkout to be cached and shared across builds,
which avoids any rate limits with checking out Fuchsia. Note though that
the Fuchsia checkout is about 27GiB as of checkout, which might cause
separate problems.

try-job: x86_64-fuchsia
@erickt erickt force-pushed the fuchsia-checkout branch from 99f9a35 to 7803a78 Compare March 19, 2025 03:43
@klensy
Copy link
Contributor

klensy commented Mar 19, 2025

Fuchsia checkout is about 27GiB as of checkout

git sparse checkout?

@Kobzol
Copy link
Contributor

Kobzol commented Mar 19, 2025

Our Docker builds are automatically cached, and unless their inputs change, they are not rebuilt on CI. So I'm not sure how much more caching we could do, tbh.

@erickt
Copy link
Contributor Author

erickt commented Mar 21, 2025

Our Docker builds are automatically cached, and unless their inputs change, they are not rebuilt on CI. So I'm not sure how much more caching we could do, tbh.

@Kobzol - I'm not too familiar with how the docker run.sh scripts work, but if I'm reading src/ci/docker/host-x86_64/x86_64-fuchsia/Dockerfile, the ENV SCRIPT ... at the send suggests to me we're running the build-fuchsia.sh script outside of the cache. So factoring out the checkout might avoid all that IO.

Fuchsia checkout is about 27GiB as of checkout

git sparse checkout?

@klensy: we're working on a way to use sparse checkouts, but that's not actually the majority of the issue. Turns out most of our artifacts are prebuilt binaries, like our Go and Dart toolchains, which we really don't need to run our limited tests for Rust. I don't think we have an easy way to filter out these artifacts from being download, but I might be able to just delete them from the docker directory to remove unnecessary things though. I'll experiment with this.

@Kobzol
Copy link
Contributor

Kobzol commented Mar 21, 2025

Our Docker builds are automatically cached, and unless their inputs change, they are not rebuilt on CI. So I'm not sure how much more caching we could do, tbh.

@Kobzol - I'm not too familiar with how the docker run.sh scripts work, but if I'm reading src/ci/docker/host-x86_64/x86_64-fuchsia/Dockerfile, the ENV SCRIPT ... at the send suggests to me we're running the build-fuchsia.sh script outside of the cache. So factoring out the checkout might avoid all that IO.

Fuchsia checkout is about 27GiB as of checkout

git sparse checkout?

@klensy: we're working on a way to use sparse checkouts, but that's not actually the majority of the issue. Turns out most of our artifacts are prebuilt binaries, like our Go and Dart toolchains, which we really don't need to run our limited tests for Rust. I don't think we have an easy way to filter out these artifacts from being download, but I might be able to just delete them from the docker directory to remove unnecessary things though. I'll experiment with this.

Oh, I see, I didn't notice that. Well, that actually seems quite wasteful! I suppose that we could move the download to a Docker layer (so run it during docker build, which is cached), and then only do bash scripts/rust/build_fuchsia_from_rust_ci.sh when the container runs (so run it during docker run? I don't know if the recent errors were in the download or build phase though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants