feat(tvc): add deploy debug-logs command#169
Open
daniilrrr wants to merge 14 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new tvc deploy debug-logs subcommand that fetches TVC debug deployment logs using the new unary GetEnclaveDebugLogs API, including support for follow/polling and log window flags.
Changes:
- Adds
deploy debug-logsCLI command with--deploy-id,--follow,--tail-lines,--since-seconds, and--include-platform-timestamp. - Vendors/updates proto definitions and regenerates the Rust client for the new unary debug-logs API (plus related proto updates).
- Adds CLI tests covering help text, required flags, and pre-auth flag validation.
Reviewed changes
Copilot reviewed 10 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tvc/tests/deploy_debug_logs.rs | Adds CLI tests for the new deploy debug-logs command and flag behavior. |
| tvc/src/commands/display.rs | Minor refactor of a shared display helper. |
| tvc/src/commands/deploy/mod.rs | Registers the new debug_logs deploy submodule. |
| tvc/src/commands/deploy/debug_logs.rs | Implements tvc deploy debug-logs, polling follow-mode, formatting, and dedupe. |
| tvc/src/client.rs | Import ordering adjustments for generated types. |
| tvc/src/cli.rs | Wires the new DeployCommands::DebugLogs into CLI dispatch and help text formatting. |
| proto/vendor/google/api/httpbody.proto | Adds vendored google.api.HttpBody proto dependency. |
| proto/services/coordinator/public/v1/public_api.proto | Adds unary GetEnclaveDebugLogs RPC + request/response messages; updates some network lists. |
| proto/immutable/activity/v1/activity.proto | Updates supported network lists for intents. |
| proto/external/errors/v1/errors.proto | Adds new external error codes. |
| proto/external/data/v1/tvc.proto | Adds LogLine message used by debug logs. |
| client/src/generated/services.coordinator.public.v1.rs | Generated Rust types for GetEnclaveDebugLogs*. |
| client/src/generated/external.data.v1.rs | Generated Rust type for LogLine. |
| client/src/generated/client.rs | Adds TurnkeyClient::get_enclave_debug_logs method. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
daniilrrr
commented
Jun 18, 2026
2cbfa97 to
aef00ee
Compare
Contributor
Author
|
Self-reminder to re-sync protos once backend PR in |
Comment on lines
+2024
to
+2034
| rpc CreateMfaPolicy(external.activity.v1.CreateMfaPolicyRequest) returns (ActivityResponse) { | ||
| option (google.api.http) = { | ||
| post: "/public/v1/submit/create_mfa_policy" | ||
| body: "*" | ||
| }; | ||
| option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { | ||
| description: "Create a new MFA policy for a user." | ||
| summary: "Create MFA policy" | ||
| tags: "MFA Policies" | ||
| }; | ||
| } |
Contributor
Author
There was a problem hiding this comment.
u right. I will sync protos in a separate PR.
Contributor
Author
|
will sync protos in a diff PR to reduce $GREEN_LINE_COUNT |
- try reconnecting but fail if too frequent - better help text
- remove double timestamps by default
- Sync unary debug logs protos from mono - Regenerate client types and unary query method - Remove stream-specific codegen and client helpers - Update tvc debug-logs to poll unary log windows - Add since-seconds and previous flags with focused tests
- rm `previous` flag
- PR comments from self
- sync'd latest protos from main - updated debug logs command to use correct API
- updated follow logic
- updated follow logic
- updated follow logic
- more sane DebugLogPrinter
52d0cba to
a6761b6
Compare
- update protos
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.
Depends on #171 to merge first
Summary
Adds
tvc deploy debug-logs, backed by the unaryGetTvcDeploymentDebugLogsendpoint at/public/v1/query/get_tvc_deployment_debug_logs.Sample command:
tvc deploy debug-logs --deploy-id $MY_DEPLOY_ID --since-seconds 3600 --followThe command fetches debug-mode TVC deployment logs and supports bounded history.
The recommended history control is
--since-seconds, which returns logs newer than a relative time window and is the most predictable way to inspect recent output.--tail-linesis also available for advanced scoping, but it corresponds to raw pod log history per replica, so filtered output will contain fewer visible app lines than requested.Note that debug mode deployments now only have 1 replica by default, so most users will see
replica 1/1when they use this command.Notes
Follow mode is implemented client-side by polling the unary endpoint.
Requires the corresponding mono debug-logs unary endpoint PR to land/deploy.Done.Testing
Added CLI tests for help text, required flags, flag validation, and debug-log command parsing.
cargo test -p turnkey_clientcargo test -p tvc debug_logsTested in dev by deploying a test image with extra logs, connecting to that deployment, then refreshing the
/timepage for additional logs