Report native backend blockers
This commit is contained in:
parent
ee80ff780c
commit
d9150024dd
7 changed files with 103 additions and 13 deletions
|
|
@ -1525,6 +1525,20 @@ fn print_response(response: ControlResponse, json: bool) -> Result<()> {
|
|||
}
|
||||
);
|
||||
println!("iroh: {}", status.iroh);
|
||||
for backend in status.native_backends {
|
||||
println!(
|
||||
"native backend {}: {} target {} {} ({})",
|
||||
backend.module,
|
||||
backend.current_backend,
|
||||
backend.target_crate,
|
||||
backend.target_version,
|
||||
backend.status
|
||||
);
|
||||
println!(
|
||||
"native backend {} blocker: {}",
|
||||
backend.module, backend.blocker
|
||||
);
|
||||
}
|
||||
}
|
||||
ControlResponse::NodeId(node) => {
|
||||
println!("agent: {}", node.agent_id);
|
||||
|
|
|
|||
|
|
@ -913,6 +913,18 @@ pub struct StatusResponse {
|
|||
pub iroh_relay_mode: String,
|
||||
pub iroh_local_discovery: bool,
|
||||
pub iroh: String,
|
||||
#[serde(default)]
|
||||
pub native_backends: Vec<NativeBackendStatus>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct NativeBackendStatus {
|
||||
pub module: String,
|
||||
pub current_backend: String,
|
||||
pub target_crate: String,
|
||||
pub target_version: String,
|
||||
pub status: String,
|
||||
pub blocker: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
|
|
|
|||
|
|
@ -8,9 +8,10 @@ use geth_cas::{
|
|||
};
|
||||
use geth_config::{GethConfig, GethPaths, RelayMode};
|
||||
use geth_control::{
|
||||
CasBlob, CasProvider, ControlRequest, ControlResponse, KeychainStatusResponse, NodeIdResponse,
|
||||
PeerControlRequest, PeerControlResponse, PipeWireRequest, PipeWireResponse, StatusResponse,
|
||||
SyncPeerRun, SyncPeerStatus, SyncStreamRun, SyncStreamStatus, SyncWatermark,
|
||||
CasBlob, CasProvider, ControlRequest, ControlResponse, KeychainStatusResponse,
|
||||
NativeBackendStatus, NodeIdResponse, PeerControlRequest, PeerControlResponse, PipeWireRequest,
|
||||
PipeWireResponse, StatusResponse, SyncPeerRun, SyncPeerStatus, SyncStreamRun, SyncStreamStatus,
|
||||
SyncWatermark,
|
||||
};
|
||||
use geth_crypto::AgentKey;
|
||||
use geth_db::DbResource;
|
||||
|
|
@ -5932,6 +5933,7 @@ pub fn handle_request(
|
|||
iroh_relay_mode: node.iroh_status.relay_mode.clone(),
|
||||
iroh_local_discovery: node.iroh_status.local_discovery,
|
||||
iroh: node.iroh_status.note.clone(),
|
||||
native_backends: native_backend_statuses(),
|
||||
})),
|
||||
ControlRequest::NodeId => Ok(ControlResponse::NodeId(NodeIdResponse {
|
||||
agent_id: node.agent_id.clone(),
|
||||
|
|
@ -7566,6 +7568,36 @@ pub fn handle_request(
|
|||
}
|
||||
}
|
||||
|
||||
fn native_backend_statuses() -> Vec<NativeBackendStatus> {
|
||||
let blocker = "pinned blocker: current daemon endpoint uses iroh 0.90.0; the Rust-1.85-compatible backend crates resolved from crates.io require iroh 0.95, so they cannot share the daemon-owned endpoint until geth performs a coordinated Iroh endpoint upgrade".to_owned();
|
||||
vec![
|
||||
NativeBackendStatus {
|
||||
module: "cas".to_owned(),
|
||||
current_backend: "iroh-control-alpn-bootstrap".to_owned(),
|
||||
target_crate: "iroh-blobs".to_owned(),
|
||||
target_version: "0.97.0".to_owned(),
|
||||
status: "blocked".to_owned(),
|
||||
blocker: blocker.clone(),
|
||||
},
|
||||
NativeBackendStatus {
|
||||
module: "kv".to_owned(),
|
||||
current_backend: "iroh-control-alpn-bootstrap".to_owned(),
|
||||
target_crate: "iroh-docs".to_owned(),
|
||||
target_version: "0.95.0".to_owned(),
|
||||
status: "blocked".to_owned(),
|
||||
blocker: blocker.clone(),
|
||||
},
|
||||
NativeBackendStatus {
|
||||
module: "pubsub".to_owned(),
|
||||
current_backend: "iroh-control-alpn-bootstrap".to_owned(),
|
||||
target_crate: "iroh-gossip".to_owned(),
|
||||
target_version: "0.95.0".to_owned(),
|
||||
status: "blocked".to_owned(),
|
||||
blocker,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
fn stored_resource_to_descriptor(stored: StoredResource) -> Result<ResourceDescriptor, NodeError> {
|
||||
let kind = stored
|
||||
.kind
|
||||
|
|
|
|||
|
|
@ -154,6 +154,15 @@ fn geth_status_against_running_daemon() {
|
|||
assert!(stdout.contains("endpoint:"));
|
||||
assert!(stdout.contains("iroh relay: disabled"));
|
||||
assert!(stdout.contains("iroh discovery: local-network disabled"));
|
||||
assert!(stdout.contains(
|
||||
"native backend cas: iroh-control-alpn-bootstrap target iroh-blobs 0.97.0 (blocked)"
|
||||
));
|
||||
assert!(stdout.contains(
|
||||
"native backend kv: iroh-control-alpn-bootstrap target iroh-docs 0.95.0 (blocked)"
|
||||
));
|
||||
assert!(stdout.contains(
|
||||
"native backend pubsub: iroh-control-alpn-bootstrap target iroh-gossip 0.95.0 (blocked)"
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Reference in a new issue