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

Downloading azure-sdk-for-rust repository takes a long time #10732

Closed
hlinnaka opened this issue Feb 9, 2025 · 3 comments · Fixed by #10790
Closed

Downloading azure-sdk-for-rust repository takes a long time #10732

hlinnaka opened this issue Feb 9, 2025 · 3 comments · Fixed by #10790
Labels
a/ci Area: related to continuous integration a/docker Area: related to docker images

Comments

@hlinnaka
Copy link
Contributor

hlinnaka commented Feb 9, 2025

The problem

When building the compute node image, the build clones the full 'azure-sdk-for-rust' repository, with history and all. The repository is about 300 MB in size, so we download that 300 MB on every CI run. I noticed this when building locally; it slows down the local docker build significantly too.

Here's one example run from CI:

#16 [compute-tools 3/3] RUN mold -run cargo build --locked --profile release-line-debug-size-lto --bin compute_ctl --bin fast_import --bin local_proxy
#16 0.494     Updating git repository `[https://github.com/neondatabase/rust-postgres.git`](https://github.com/neondatabase/rust-postgres.git%60)
#16 1.516     Updating crates.io index
#16 1.559     Updating git repository `[https://github.com/neondatabase/azure-sdk-for-rust.git`](https://github.com/neondatabase/azure-sdk-for-rust.git%60)
#16 151.3     Updating git repository `[https://github.com/neondatabase/tokio-epoll-uring.git`](https://github.com/neondatabase/tokio-epoll-uring.git%60)
#16 151.7     Updating git repository `[https://github.com/neondatabase/framed-websockets`](https://github.com/neondatabase/framed-websockets%60)

Note how the "update azure-sdk-for-rust repository" step took about 150 s.

Proposed solution

Ideally, cargo build would make a shallow clone of the repository; the build doesn't actually need the history. A shallow clone would be only about 1 MB. There's an unstable cargo feature to use a different library for downloading git dependencies, which would do just that and fix this issue. Unfortunately it's unstable so it doesn't help us right now. I tested it locally though and it's great.

One easy quick fix we could do is to create a branch in our 'neondatabase/azure-sdk-for-rust' repository which would not include the history, and use that in the CI.

@hlinnaka hlinnaka added a/ci Area: related to continuous integration a/docker Area: related to docker images labels Feb 9, 2025
@hlinnaka
Copy link
Contributor Author

hlinnaka commented Feb 9, 2025

note @arpad-m and @conradludgate since you touched this last.

@arpad-m
Copy link
Member

arpad-m commented Feb 11, 2025

Yeah it's quite slow indeed (and there is no progress indicator or anything).

Ideally the SDK fork is temporary, see #10404. But in the meantime I suppose we could try out making a new branch with the history reset in the meantime. I'll make a PR to test if it improves things.

@arpad-m
Copy link
Member

arpad-m commented Feb 12, 2025

PR filed: #10790

github-merge-queue bot pushed a commit that referenced this issue Feb 12, 2025
Switch the Azure SDK git fork to one with a compressed git history. This
helps with download speed of the git repository.

closes #10732
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a/ci Area: related to continuous integration a/docker Area: related to docker images
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants