solstice-ci/crates/common/proto/runner.proto
Till Wegmueller 855aecbb10
Add gRPC support for VM runner log streaming and orchestrator integration
This commit introduces gRPC-based log streaming between the VM runner (`solstice-runner`) and orchestrator. Key updates include:
- Implemented gRPC server in the orchestrator for receiving and processing runner logs.
- Added log streaming and job result reporting in the `solstice-runner` client.
- Defined `runner.proto` with messages (`LogItem`, `JobEnd`) and the `Runner` service.
- Updated orchestrator to accept gRPC settings and start the server.
- Modified cloud-init user data to include gRPC endpoint and request ID for runners.
- Enhanced message queue logic to handle job results via `publish_job_result`.
- Configured `Cross.toml` for cross-compilation of the runner.
2025-11-01 12:14:50 +01:00

30 lines
857 B
Protocol Buffer

syntax = "proto3";
package runner.v1;
// Messages sent from the VM runner agent to the orchestrator.
message LogChunk {
string line = 1; // One line of log output (stdout/stderr)
bool stderr = 2; // True if this line came from stderr
}
message JobEnd {
int32 exit_code = 1; // Exit code of the job script/process
bool success = 2; // Convenience flag
string repo_url = 3; // Convenience context for Integration layer
string commit_sha = 4; // Convenience context for Integration layer
}
message LogItem {
string request_id = 1; // UUID string to correlate the job
oneof event {
LogChunk log = 2;
JobEnd end = 3;
}
}
message Ack { bool ok = 1; }
service Runner {
// Client-streaming RPC: runner sends a stream of LogItem; orchestrator returns Ack
rpc StreamLogs (stream LogItem) returns (Ack);
}