fix: sync sticky disk implementation with stickydisk action#25
Merged
adityamaru merged 2 commits intomainfrom Nov 15, 2025
Merged
fix: sync sticky disk implementation with stickydisk action#25adityamaru merged 2 commits intomainfrom
adityamaru merged 2 commits intomainfrom
Conversation
18fd18c to
9c8ee57
Compare
This commit fixes critical drift between setup-bazel and the stickydisk action: Critical fixes: - fix: use BLACKSMITH_VM_ID instead of VM_ID environment variable (4 places) This was causing connection refused errors as the VM couldn't be properly identified Performance and reliability improvements: - increase sticky disk timeout from 15s to 45s for slower operations - add sync before unmount to flush pending writes - add drop_caches before unmount to prevent 'device is busy' errors - add lost+found directory cleanup to prevent EACCES errors with build tools - add debug logging to createStickyDiskClient for better troubleshooting - improve mount point creation to support system directories like /nix These changes bring setup-bazel in line with the tested stickydisk action and should resolve the 'connect ECONNREFUSED 192.168.127.1:5557' errors.
9c8ee57 to
29d81df
Compare
…unmount The sync and drop_caches commands are best-effort operations that shouldn't block the critical unmount operation. If they fail, the exception would propagate and prevent filesystem usage collection and unmount from executing, leaving the disk mounted. This wraps both operations in try-catch blocks to log warnings but continue with the unmount process.
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.
Problem
Users are experiencing connection errors when using setup-bazel:
Root Cause
The setup-bazel action has drifted from the stickydisk action, and is using the wrong environment variable name (
VM_IDinstead ofBLACKSMITH_VM_ID), which prevents proper VM identification.Changes
Critical Fix
VM_IDtoBLACKSMITH_VM_IDin 4 locationsReliability Improvements
Testing
These changes align setup-bazel with the tested stickydisk action implementation, which has been working successfully in production.
Related
Syncs with: https://github.com/useblacksmith/stickydisk
Note
Switch to BLACKSMITH_VM_ID and add reliability improvements (longer timeouts, safe formatting, mount ownership, sync/drop_caches, and logging) for sticky disk operations.
VM_IDwithBLACKSMITH_VM_IDin all service calls (getStickyDisk,commitStickyDisk).lost+foundaftermkfs.ext4via temporary mount to avoid permission issues.sudoand ensure ownership viachownbefore and after mount.syncbefore measuring usage.echo 3 > /proc/sys/vm/drop_caches) prior to unmount to reduce "device is busy" errors.createStickyDiskClient.Written by Cursor Bugbot for commit 2e5fa36. This will update automatically on new commits. Configure here.