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

Fix buildkit pauses at the end of builds #20

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

dchw
Copy link
Contributor

@dchw dchw commented Jul 21, 2023

Looks like the provenance feature does some hard-coded, extensive caching at the end of a build, regardless of if you use the sbom or provenance features.

This option appears to be un-bypassable, and is hard coded. Change it to min to avoid the cache delays at the ends of builds.

I've attached a profile. Anecdotally, I have seen some targets that went from ~40s runtime to ~10m runtime on v0.7.4 go back to their expected durations with this fix. No other immediately apparent reprercussions were seen... but admittedly my testing was not extensive.

@dchw dchw requested review from nelsam and alexcb July 21, 2023 20:19
@dchw dchw self-assigned this Jul 21, 2023
Copy link
Contributor

@nelsam nelsam left a comment

Choose a reason for hiding this comment

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

It's truly astounding that this makes such a big difference.

Copy link
Contributor

@alexcb alexcb left a comment

Choose a reason for hiding this comment

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

nice find!

@dchw
Copy link
Contributor Author

dchw commented Jul 24, 2023

Is this safe to merge with these failing checks? Or are those just always failing?

@nelsam
Copy link
Contributor

nelsam commented Jul 24, 2023

Is this safe to merge with these failing checks? Or are those just always failing?

These checks will always fail, but we do at least need to create a PR to bump the buildkit version in earthly core to get the core tests to run against this code. I can put one together.

@alexcb
Copy link
Contributor

alexcb commented Jul 24, 2023

a nitpicky request: can you manually squash your commits before merging this (and once you've done that, you can also do a fast-forward merge via the cli).

@dchw dchw force-pushed the corey/fix-buildkit-delays branch from 45f84ad to 2b7fc7d Compare July 25, 2023 17:33
@dchw dchw merged commit 2b7fc7d into earthly-main Jul 25, 2023
45 of 51 checks passed
dchw added a commit to earthly/earthly that referenced this pull request Jul 26, 2023
This tests, and implements earthly/buildkit#20
as a partial performance resolution to #3085. Some of the higher
resource utilization at the end exists (per user reports testing this
fix), but the pauses appear to be gone.
@alexcb alexcb deleted the corey/fix-buildkit-delays branch January 26, 2024 20:57
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.

None yet

3 participants