Skip to content

Conversation

@frhuelsz
Copy link
Contributor

@frhuelsz frhuelsz commented Dec 9, 2025

🔍 Description

Introduce Harpoon gRPC proto file

@frhuelsz frhuelsz force-pushed the user/frhuelsz/grpc/proto branch from 2293c03 to fc7dd46 Compare December 9, 2025 02:22
@frhuelsz frhuelsz marked this pull request as ready for review December 11, 2025 07:58
@frhuelsz frhuelsz requested a review from a team as a code owner December 11, 2025 07:58
Copilot AI review requested due to automatic review settings December 11, 2025 07:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new Harpoon gRPC protobuf definition file and integrates it with the trident_cli crate. The changes enable gRPC-based communication for Trident servicing operations through a well-structured service interface.

Key Changes

  • Added comprehensive gRPC service definition in proto/harpoon.proto with TridentService covering installation, update, validation, and configuration operations
  • Integrated protobuf compilation into trident_cli build process with tonic/prost dependencies
  • Refactored version handling to support environment-based version override via TRIDENT_VERSION

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
proto/harpoon.proto New protobuf file defining TridentService with 15 RPC methods, message types, enums for servicing operations
crates/trident_cli/build.rs New build script to compile protobuf definitions using tonic-build
crates/trident_cli/src/main.rs Added protobuf module inclusion and refactored version constant to support environment override
crates/trident_cli/src/cli.rs Updated to use new TRIDENT_VERSION constant
crates/trident_cli/Cargo.toml Added gRPC dependencies (tonic, prost, tokio) and build dependencies; updated version and edition
crates/trident/Cargo.toml Reorganized dependencies, moved optional dependencies to main section
Cargo.lock Updated dependency versions for trident_cli and zstd-related crates

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@frhuelsz frhuelsz linked an issue Dec 11, 2025 that may be closed by this pull request
@frhuelsz frhuelsz moved this from Backlog to In review in Trident gRPC API Dec 11, 2025
Copilot AI review requested due to automatic review settings December 11, 2025 21:58
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 9 changed files in this pull request and generated 16 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


// TridentService provides methods for managing Trident servicing operations
service TridentService {
// Install performs a Trident installation operation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we phasing out the "clean install" term? I think we tend to use "install"/"installation" now more

Copy link
Contributor

@ayaegashi ayaegashi Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our documentation uses "clean install" everywhere so I'm in favor of keeping "clean install" in use

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think install is a more generic name, and "clean install" is a specific subset of installs that was used because we only supported clean installs at the beginning. I'd rather not perpetuate the pattern in new apis, this is also shorter.

// filesystem.
rpc CheckRoot(CheckRootRequest) returns (stream ServicingResponse);

// Attempts to commit a finalized update.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no CommitInstall?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good q, perhaps there should be just 1 commit? will ask in sync meeting

FAILURE = 1;
}

message FinalStatus {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this essentially be the Host Status? Or, also some other things?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basically the final result of the servicing operation, we may edit it to include host status if needed.

message FinalStatus {
// Final status of the servicing operation.
StatusCode status = 1;
// Message associated with the final status.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the message in this context? Is that the HS?...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh this we may need to revise as we go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 12, 2025 01:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@frhuelsz frhuelsz self-assigned this Dec 14, 2025
Copilot AI review requested due to automatic review settings December 16, 2025 00:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +17 to +18
tonic = "0.14.2"
tonic-prost = "0.14.2"
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The trident_cli crate uses tonic version 0.14.2, while the trident crate uses tonic version 0.12.3. This version mismatch could lead to compatibility issues if types from the generated protobuf code need to be shared between these crates or if they interact with common dependencies.

Copilot uses AI. Check for mistakes.
Comment on lines +14 to +15
prost = "0.14.1"
prost-types = "0.14.1"
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The trident_cli crate uses prost version 0.14.1, while the trident crate uses prost version 0.13.4. This version mismatch could lead to compatibility issues if protobuf types need to be shared between these crates or if they interact with common dependencies that expect a specific prost version.

Suggested change
prost = "0.14.1"
prost-types = "0.14.1"
prost = "0.13.4"
prost-types = "0.13.4"

Copilot uses AI. Check for mistakes.
None => env!("CARGO_PKG_VERSION"),
};

pub mod protobufs {
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The protobufs module is declared as public but is not being used anywhere in the visible code. Consider making it private with 'mod protobufs' unless it needs to be exported for use by other modules or crates.

Suggested change
pub mod protobufs {
mod protobufs {

Copilot uses AI. Check for mistakes.
ndubchak
ndubchak previously approved these changes Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

RFC 0379: gRPC API: Merge Protos

4 participants