Skip to content

feat(build): refactor BuildService to streaming RPC#4

Open
domenkozar wants to merge 1 commit into
canonfrom
build-streaming
Open

feat(build): refactor BuildService to streaming RPC#4
domenkozar wants to merge 1 commit into
canonfrom
build-streaming

Conversation

@domenkozar
Copy link
Copy Markdown
Member

@domenkozar domenkozar commented Dec 1, 2025

https://git.snix.dev/snix/snix/issues/132

Replace the unary DoBuild RPC with a server-side streaming RPC that yields incremental BuildEvent messages. This enables real-time log streaming and progress updates during builds.

Event types:

  • BuildStarted: emitted when build begins with build_id
  • LogOutput: stdout/stderr log lines streamed as they occur
  • RefscanResult: reference scanning results per output
  • BuildCompleted: final outputs with nodes and needles
  • BuildFailed: error message and optional exit code

Build failures are reported as BuildFailed events rather than stream errors, allowing clean stream termination. Cancellation is handled via stream drop (FuseDaemon cleanup on Drop).

Also adds comprehensive tests for proto conversions and DummyBuildService streaming behavior.

🤖 Generated with Claude Code

Change-Id: I158cb2c14828def4db6a929610219e195303896d

Replace the unary DoBuild RPC with a server-side streaming RPC that
yields incremental BuildEvent messages. This enables real-time log
streaming and progress updates during builds.

Event types:
- BuildStarted: emitted when build begins with build_id
- LogOutput: stdout/stderr log lines streamed as they occur
- RefscanResult: reference scanning results per output
- BuildCompleted: final outputs with nodes and needles
- BuildFailed: error message and optional exit code

Build failures are reported as BuildFailed events rather than stream
errors, allowing clean stream termination. Cancellation is handled
via stream drop (FuseDaemon cleanup on Drop).

Also adds comprehensive tests for proto conversions and
DummyBuildService streaming behavior.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Change-Id: I158cb2c14828def4db6a929610219e195303896d
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