feat: implement all 15 fxt CLI commands with real gRPC calls
- 13 commands with full gRPC implementations: service, train, tune, model, trade, broker, agent, data, risk, config, cluster, auth, backtest - Streaming support: train logs --follow, broker executions --follow - --json output on every command via OutputFormat/HumanReadable - Fix web-gateway monitoring URL default (50057 → 50051, API Gateway) - Rewire 7 remaining build.rs to consolidated proto/ root (web-gateway, backtesting_service, training_uploader, 3 test crates, e2e) - Fix web-gateway ml_training.proto new fields (mode, max_epochs, resume) - 75 fxt tests + 139 web-gateway tests, 0 clippy warnings, workspace clean Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,9 +2,6 @@ use std::io::Result;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
// Build gRPC service definitions for E2E test clients (Tonic 0.14+)
|
||||
//
|
||||
// NOTE: Building TLI trading.proto separately to avoid naming conflicts
|
||||
// with trading_service trading.proto (both define trading.proto but with different packages)
|
||||
tonic_prost_build::configure()
|
||||
.build_server(false) // We only need clients for E2E tests
|
||||
.build_client(true)
|
||||
@@ -14,15 +11,12 @@ fn main() -> Result<()> {
|
||||
.client_mod_attribute(".", "#[allow(unused_qualifications)]")
|
||||
.compile_protos(
|
||||
&[
|
||||
"../../services/trading_service/proto/trading.proto",
|
||||
"../../services/trading_service/proto/config.proto",
|
||||
"../../services/trading_service/proto/risk.proto",
|
||||
"../../services/ml_training_service/proto/ml_training.proto",
|
||||
],
|
||||
&[
|
||||
"../../services/trading_service/proto",
|
||||
"../../services/ml_training_service/proto",
|
||||
"../../proto/trading.proto",
|
||||
"../../proto/config.proto",
|
||||
"../../proto/risk.proto",
|
||||
"../../proto/ml_training.proto",
|
||||
],
|
||||
&["../../proto"],
|
||||
)?;
|
||||
|
||||
// Build TLI protos separately (backtesting service uses TLI proto)
|
||||
@@ -32,8 +26,8 @@ fn main() -> Result<()> {
|
||||
.out_dir("src/proto")
|
||||
.server_mod_attribute(".", "#[allow(unused_qualifications)]")
|
||||
.client_mod_attribute(".", "#[allow(unused_qualifications)]")
|
||||
.compile_protos(&["../../bin/fxt/proto/trading.proto"], &["../../bin/fxt/proto"])?;
|
||||
.compile_protos(&["../../proto/fxt_trading.proto"], &["../../proto"])?;
|
||||
|
||||
println!("cargo:rerun-if-changed=../../services/");
|
||||
println!("cargo:rerun-if-changed=../../proto/");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
// Find proto files in the services directory
|
||||
let proto_file = "../../services/trading_service/proto/trading.proto";
|
||||
// Find proto files in the consolidated proto directory
|
||||
let proto_file = "../../proto/trading.proto";
|
||||
|
||||
tonic_prost_build::compile_protos(proto_file)?;
|
||||
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
// Compile TLI proto files for client testing (Tonic 0.14+)
|
||||
// Compile proto files for client testing (Tonic 0.14+)
|
||||
tonic_prost_build::configure()
|
||||
.build_server(false)
|
||||
.build_client(true)
|
||||
.compile_protos(
|
||||
&[
|
||||
"../../bin/fxt/proto/trading.proto",
|
||||
"../../bin/fxt/proto/ml.proto",
|
||||
"../../bin/fxt/proto/config.proto",
|
||||
"../../bin/fxt/proto/health.proto",
|
||||
"../../proto/trading.proto",
|
||||
"../../proto/ml.proto",
|
||||
"../../proto/config.proto",
|
||||
"../../proto/health.proto",
|
||||
],
|
||||
&["../../bin/fxt/proto"],
|
||||
&["../../proto"],
|
||||
)?;
|
||||
|
||||
// Tell cargo to recompile if proto files change
|
||||
println!("cargo:rerun-if-changed=../../bin/fxt/proto/trading.proto");
|
||||
println!("cargo:rerun-if-changed=../../bin/fxt/proto/ml.proto");
|
||||
println!("cargo:rerun-if-changed=../../bin/fxt/proto/config.proto");
|
||||
println!("cargo:rerun-if-changed=../../bin/fxt/proto/health.proto");
|
||||
println!("cargo:rerun-if-changed=../../proto/trading.proto");
|
||||
println!("cargo:rerun-if-changed=../../proto/ml.proto");
|
||||
println!("cargo:rerun-if-changed=../../proto/config.proto");
|
||||
println!("cargo:rerun-if-changed=../../proto/health.proto");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
// Build proto files from trading service
|
||||
tonic_prost_build::compile_protos("../../services/trading_service/proto/trading.proto")?;
|
||||
// Build proto files from consolidated proto directory
|
||||
tonic_prost_build::compile_protos("../../proto/trading.proto")?;
|
||||
|
||||
println!("cargo:rerun-if-changed=../../services/trading_service/proto/trading.proto");
|
||||
println!("cargo:rerun-if-changed=../../proto/trading.proto");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user