guest-agent: remove EmitEvent API#768
Merged
Merged
Conversation
The RPC only meaningfully works on TDX (RTMR3 extension), is rarely used, and cannot be implemented faithfully in the simulator or across TEEs. Apps that need extra runtime measurements should use native TEE interfaces. Keep emit_runtime_event for guest boot measurements in dstack-util.
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the guest-agent EmitEvent RPC and all corresponding SDK wrappers and documentation, aligning the public surface area with a multi-TEE design and avoiding a TDX-centric runtime-measurement API.
Changes:
- Deleted
EmitEventfrom the guest-agent proto/service and removed backend + RPC handler plumbing (including simulator behavior/tests). - Removed
emit_event/EmitEvent/emitEventfrom Rust, Python, Go, and JS SDKs (plus examples and SDK docs). - Updated security and native-interface docs (and curl API docs) to reflect that runtime measurements should be done via native TDX/TSM interfaces.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/rust/src/dstack_client.rs | Removes Rust SDK emit_event wrapper calling /EmitEvent. |
| sdk/rust/README.md | Removes Rust SDK documentation for event emission. |
| sdk/rust/examples/dstack_client_usage.rs | Removes emit-event usage from example flow. |
| sdk/python/tests/test_typing.py | Updates typing expectations to drop emit_event. |
| sdk/python/tests/test_client.py | Removes emit_event tests and simulator-specific behavior assertions. |
| sdk/python/src/dstack_sdk/dstack_client.py | Removes async + sync emit_event client methods. |
| sdk/python/README.md | Removes Python docs and feature-matrix entry for emit_event. |
| sdk/js/src/index.ts | Removes JS SDK emitEvent implementation. |
| sdk/js/README.md | Removes JS docs and feature-matrix entry for emitEvent. |
| sdk/go/README.md | Removes Go SDK event logging documentation and API reference for EmitEvent. |
| sdk/go/dstack/client.go | Removes Go SDK EmitEvent method implementation. |
| sdk/curl/api.md | Removes /EmitEvent endpoint docs and renumbers subsequent sections. |
| guest-agent/src/rpc_service.rs | Drops EmitEvent RPC handler and associated state/backends wiring. |
| guest-agent/src/backend.rs | Removes PlatformBackend::emit_event and RealPlatform implementation. |
| guest-agent/rpc/proto/agent_rpc.proto | Deletes rpc EmitEvent and EmitEventArgs message from the service definition. |
| guest-agent-simulator/src/main.rs | Removes simulator-side emit_event rejection and its test; cleans imports accordingly. |
| dstack-attest/src/lib.rs | Updates concurrency docs to remove reference to concurrent emit_event RPC calls. |
| docs/security/security-model.md | Updates security-model narrative to remove “application-emitted events” from RTMR3 description. |
| docs/native-tee-interfaces.md | Updates guidance to steer apps toward native measurement interfaces instead of /EmitEvent. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ruff flagged httpx and redundant local os imports left after removing the emit_event tests.
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.
Summary
Remove the guest-agent
EmitEventRPC and matching SDK wrappers.emit_runtime_eventinsidedstack-util.Boot-time RTMR/PCR extension via
dstack_attest::emit_runtime_event(used bydstack-utilsystem setup) is unchanged. Apps that still need extra runtime measurements should use native TDX/TSM measurement interfaces and own their event-log story.Changes
rpc EmitEventandEmitEventArgsPlatformBackend::emit_eventand RPC handleremit_event/EmitEvent/emitEventfrom Rust, Python, Go, JSTest plan
cargo test -p dstack-guest-agent -p dstack-guest-agent-simulator(26 tests pass)cargo check -p dstack-guest-agent -p dstack-guest-agent-simulator -p dstack-sdkcargo fmt --checkgo build ./dstack/insdk/go/EmitEvent(expected: none or rare)