Skip to content

s3proxy: cut every build tool off MinIO, and store compressed blobs once - #60

Merged
shreyas-blacksmith merged 2 commits into
patchsetfrom
shreyas/l1-cut-all-tools
Oct 21, 2026
Merged

shreyas-blacksmith merged 2 commits into
patchsetfrom
shreyas/l1-cut-all-tools

Conversation

@shreyas-blacksmith

@shreyas-blacksmith shreyas-blacksmith commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • A non-empty BAZEL_REMOTE_BACKEND_DISCONNECT_TOOLS set now skips MinIO for every build-tool read and every tool's LRU artifacts, not only the names in the set. Named tools keep their existing reason labels (go_disconnect, and so on). Any other tool counts as tool_disconnect. A request with no build-tool identity still reads the backend, which is the quarantine prefix.
  • Gzip members and zstd frames uploaded as identity blobs are stored as identity casblobs. Plain blobs are still zstd-compressed at rest. A read returns the original bytes, so the digest does not change.
  • Production inventories already set the disconnect list, so this takes effect on the next L1 binary roll. No inventory edit. Rolling back the binary restores the named-tool cut.

Test plan

  • go test ./cache/s3proxy/ ./cache/disk/casblob/ ./config/
  • After a roll, bazel_remote_s3_backend_lookups_skipped_total{reason="tool_disconnect"} climbs for any tool that is not one of the named labels, and bazel_remote_s3_cache_hits stays at zero for build-tool traffic.

Made with Cursor


View with [code]smith Test with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


View with [code]smith View full Proof
Need help on this PR? Tag @codesmith-bot with what you need. (Staging)

shreyas-blacksmith and others added 2 commits October 21, 2026 13:21
A non-empty disconnect set used to skip only the named tools, so the next tool read MinIO until somebody appended it. Naming any tool now skips every build-tool read and every tool's LRU artifacts. Named tools keep their existing reason labels; the rest count as tool_disconnect. A request with no tool identity still reads the backend.

Co-authored-by: Cursor <cursoragent@cursor.com>
Identity uploads of an already-framed gzip or zstd body were zstd-encoded into the casblob. The digest is of those bytes, so the second pass only spent CPU. Those blobs are now stored as identity casblobs, and a read returns the original bytes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@blacksmith-staging

blacksmith-staging Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Matches Unlisted tool skips MinIO

With only go named, nx and bazel reads now miss without touching MinIO and count as tool_disconnect; before they were served from MinIO.

Merge-base

MinIO hits before

This PR c653b7a9

tool_disconnect after

Also checked · 4 match

Matches Named tool keeps its label
Matches No-identity request still reads MinIO
Matches Gzip blob stored as identity
Matches LRU artifacts cut for every tool

Proof on c653b7a9

View full Proof report

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c653b7a. Configure here.

if err = binary.Write(f, binary.LittleEndian, h.chunkOffsets); err != nil {
return -1, fmt.Errorf("failed to write chunk offsets: %w", err)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Identity writes skip durability sync

Low Severity

The new Identity store path rewrites the casblob offset table after the body, then closes without an f.Sync. The zstd branch in this function and WriteZstdFrameAndClose both sync after that same seek-back. A crash can persist the body with the placeholder offsets, so readHeader rejects the blob and the guest-cache object is lost.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c653b7a. Configure here.

@shreyas-blacksmith
shreyas-blacksmith merged commit 3494b19 into patchset Oct 21, 2026
6 checks passed
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.

1 participant