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

chore: make nightly build pipeline faster #1958

Merged
merged 20 commits into from
Aug 21, 2024

Conversation

BulkBeing
Copy link
Contributor

@BulkBeing BulkBeing commented Aug 19, 2024

closes #1943
Same as #1949 . Trying smaller changes at a time, since I'm not able to figure out why tests for monovertex is failing in CI #1949
UPDATE: The CI was failing becuase the Rust binary within the image didn't had executable permission.

Summary

  • GH Actions uses Ubuntu VM with x86_64 architecture. This results in very slow build for arm64 binary within buildkit's emulation.
  • This PR moves Rust builds out of buildkit. The binaries will be built natively in the GH Actions VM in separate jobs.
  • These binaries will be made available within the dist/ directory when numaflow container image is built (same as the pattern we follow for Go binary).
  • Uses cargo-chef to build the image on laptop. This avoids recreating Rust project directory structure in Dockerfile if we add/remove a cargo workspace.
  • sccache is not used in the release pipeline.
  • The image target in Makefile is modified to work in both amd64 and arm64 hosts.

These changes should reduce the nightly builds time from current average of 1hr 30 minutes to around 5 minutes.
In my testing of the nightly build pipeline, a fresh build completes in under 7 minutes. Subsequent builds (with high sccache hits) finishes in under 4 minutes.

Current nightly builds:
Screenshot 2024-08-21 at 10 23 02 AM

Fresh nightly build with the changes:
Screenshot 2024-08-21 at 10 36 12 AM

Nightly build with high sccache hit rate:
Screenshot 2024-08-21 at 10 36 33 AM

Copy link

codecov bot commented Aug 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.64%. Comparing base (33bbbad) to head (724c222).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1958      +/-   ##
==========================================
- Coverage   60.66%   53.64%   -7.03%     
==========================================
  Files         317      286      -31     
  Lines       28159    22319    -5840     
==========================================
- Hits        17084    11974    -5110     
+ Misses      10137     9400     -737     
- Partials      938      945       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BulkBeing BulkBeing marked this pull request as ready for review August 21, 2024 05:11
@whynowy whynowy changed the title Make nightly build pipeline faster chore: make nightly build pipeline faster Aug 21, 2024
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Signed-off-by: Vigith Maurice <[email protected]>
Copy link
Member

@vigith vigith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome 🎉

@vigith vigith merged commit b21e0bf into numaproj:main Aug 21, 2024
28 of 29 checks passed
whynowy added a commit that referenced this pull request Sep 3, 2024
Signed-off-by: Sreekanth <[email protected]>
Signed-off-by: Derek Wang <[email protected]>
Signed-off-by: Vigith Maurice <[email protected]>
Co-authored-by: Vigith Maurice <[email protected]>
Co-authored-by: Derek Wang <[email protected]>
SaniyaKalamkar pushed a commit to SaniyaKalamkar/numaflow that referenced this pull request Jan 19, 2025
Signed-off-by: Sreekanth <[email protected]>
Signed-off-by: Derek Wang <[email protected]>
Signed-off-by: Vigith Maurice <[email protected]>
Co-authored-by: Vigith Maurice <[email protected]>
Co-authored-by: Derek Wang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

improve build time for Rust compilation
3 participants