Repository navigation
feat(contracts): stream file content in the executor FileService - #2832
Merged
Merged
Conversation
blkt
force-pushed
the
feat/2770-chunked-file-transfer
branch
from
November 17, 2026 15:37
251a637 to
175bf4c
Compare
rdimitrov
reviewed
Nov 17, 2026
rdimitrov
left a comment
Member
There was a problem hiding this comment.
Streaming looks right to me: first-message-carries-metadata, commit on client close, and the proxy authorizing from the first message all hang together. One thing I'd want settled in the doc before the server side lands (inline).
blkt
force-pushed
the
feat/2770-chunked-file-transfer
branch
3 times, most recently
from
November 17, 2026 21:02
7c4711c to
5d30a87
Compare
5 of 14 tasks
5 of 14 tasks
`ReadFile` streams its response and `CreateFile` and `ReplaceFile` stream their requests, in chunks of at most 3 MiB, so every end keeps gRPC's default 4 MiB message limit and the protocol sets no file size limit. The decision is recorded in the executor protocol draft. Closes #2770
A streamed read carries its version in the last message, covering exactly the bytes sent. Writes spool to a temporary file and rename into place on commit. Unbuffered transfers go through an optional `WorkspaceStreamer` extension that fails soft when a workspace lacks it; the agent tools keep the whole-file `Workspace` methods.
blkt
force-pushed
the
feat/2770-chunked-file-transfer
branch
from
November 18, 2026 09:03
5d30a87 to
483338f
Compare
rdimitrov
approved these changes
Nov 18, 2026
rdimitrov
left a comment
Member
There was a problem hiding this comment.
Spooling writes to a temp file and renaming on close resolves the memory concern, and the reasoning for leaving disk use bounded by the volume makes sense. Non-blocking for the server PRs: temp files live in the workspace, so a crash mid-write can leave them visible to ReadDir and shell programs; worth a recognisable name and cleanup on startup. LGTM.
Merged
2 tasks
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.
Closes #2770.
FileServicemoved whole files in single unary messages, so every server, proxy, and client had to raise gRPC's 4 MiB default message limit to carry a file. This changes file content to chunked streaming before #2691, #2694, #2701, and #2710 build on the unary shape.Changes
ReadFilestreams its response;CreateFileandReplaceFilestream their requests. Message fields are unchanged; only thestreamkeywords differ.data. A read's last message carries the version, the hash of exactly the bytes sent, so the server never buffers the file to compute it.Workspaceport keeps its whole-file methods for the agent tools. Unbuffered transfers go through an optionalWorkspaceStreamerextension (ReadVersionTo,CreateFileFrom,ReplaceFileFrom), discovered by type assertion and failing soft when absent; it is documented here and implemented in a follow-up. The authorizing proxy relays chunks without assembling the file.docs/drafts/kubernetes-execution/executor-protocol.md, and theReadFilelimit comment is removed fromfiles.proto.API compatibility
mecatl.executor.v1(ReadFile,CreateFile, andReplaceFilechange from unary to streaming).FileServiceyet, and the executor server is not used by the running system, so no conforming client exists to break.executor/v1is a private protocol with no deployed consumers.Expected CI failure
The "Lint the executor protocol and check it for breaking changes" step fails on
buf breakingfor the three RPCs above (RPC_SAME_CLIENT_STREAMING/RPC_SAME_SERVER_STREAMING). The break is intentional; it was decided to leave the job red rather than add abuf.yamlignore.