Repository navigation
post: fstrim the buildkit sticky disk before unmount at commit - #143
Open
magma-beef wants to merge 2 commits into
Open
magma-beef wants to merge 2 commits into
magma-beef wants to merge 2 commits into
Conversation
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
This was referenced Oct 20, 2026
|
Pruned layers keep their RBD extents allocated on the backing store until the guest discards them. Run a best-effort fstrim on /var/lib/buildkit before unmount, only when the run is still on track to commit (integrity check passed, no early deny, no SIGKILL, no failed steps) and only when the host enabled it: the VM agent returns GetStickyDiskResponse.fstrim_timeout_secs (fa live config guest_fstrim_timeout_secs), saved in action state at mount time; 0 means no trim. Any failure or timeout only logs. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> (cherry picked from commit 3d2979f)
…ackage predates it The bundled GetStickyDiskResponse has no fstrim_timeout_secs yet, and protobuf-es keeps fields it does not know in $unknown (the gRPC transport is binary), so decode field 8 from there when the typed field is absent. Releases built before the field existed therefore honour the host budget once the agent sends it. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> (cherry picked from commit 56214f0)
devin-ai-integration
Bot
force-pushed
the
devin/1792451281-buildkit-fstrim
branch
from
October 22, 2026 21:27
56214f0 to
1b5022b
Compare
|
This PR is too large for Bugbot to review. It changes 9 lines and 1,709,694 characters. Split the change into smaller pull requests to get a review. |
Contributor
There was a problem hiding this comment.
✅ Devin addressed Devin Review findings on 1b5022b
No findings needed changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


In the post step, run
fstrimon the buildkit sticky disk before it is unmounted and committed, so freed blocks are discarded from the backing image.GetStickyDiskResponse.fstrim_timeout_secs(field 8). Setup reads it (from the typed field, or from unknown field 8 when the bundled proto package predates it) and stores it in action state;0/absent disables the trim.sync, before the usage sample andumount.timeout <budget> sudo fstrim -v; a missing binary, unsupported discard, or timeout only logs and never fails the step.Start here:
src/main.ts(post step), thensrc/setup_builder.ts(fstrimTimeoutSecsFrom,trimFilesystem).dist/is regenerated.Checks:
npm run lint,npx tsc --noEmit -p .,npx vitest run,npm run build.Need help on this PR? Tag
@codesmith-botwith what you need. (Staging)Need help on this PR? Tag
@codesmith-botwith what you need.