@@ -891,6 +891,9 @@ fn print_task_details(bgtask: &BackgroundTask, details: &serde_json::Value) {
891
891
"blueprint_loader" => {
892
892
print_task_blueprint_loader ( details) ;
893
893
}
894
+ "blueprint_rendezvous" => {
895
+ print_task_blueprint_rendezvous ( details) ;
896
+ }
894
897
"dns_config_external" | "dns_config_internal" => {
895
898
print_task_dns_config ( details) ;
896
899
}
@@ -1112,6 +1115,54 @@ fn print_task_blueprint_loader(details: &serde_json::Value) {
1112
1115
}
1113
1116
}
1114
1117
1118
+ fn print_task_blueprint_rendezvous ( details : & serde_json:: Value ) {
1119
+ #[ derive( Deserialize ) ]
1120
+ struct CrucibleDatasetStats {
1121
+ num_inserted : usize ,
1122
+ num_already_exist : usize ,
1123
+ num_not_in_inventory : usize ,
1124
+ }
1125
+
1126
+ #[ derive( Deserialize ) ]
1127
+ struct Stats {
1128
+ crucible_dataset : CrucibleDatasetStats ,
1129
+ }
1130
+
1131
+ #[ derive( Deserialize ) ]
1132
+ struct BlueprintRendezvousStatus {
1133
+ blueprint_id : Uuid ,
1134
+ inventory_collection_id : Uuid ,
1135
+ stats : Stats ,
1136
+ }
1137
+
1138
+ match serde_json:: from_value :: < BlueprintRendezvousStatus > ( details. clone ( ) ) {
1139
+ Err ( error) => eprintln ! (
1140
+ "warning: failed to interpret task details: {:?}: {:?}" ,
1141
+ error, details
1142
+ ) ,
1143
+ Ok ( status) => {
1144
+ println ! ( " target blueprint: {}" , status. blueprint_id) ;
1145
+ println ! (
1146
+ " inventory collection: {}" ,
1147
+ status. inventory_collection_id
1148
+ ) ;
1149
+ println ! ( " crucible_dataset rendezvous counts:" ) ;
1150
+ println ! (
1151
+ " num_inserted: {}" ,
1152
+ status. stats. crucible_dataset. num_inserted
1153
+ ) ;
1154
+ println ! (
1155
+ " num_already_exist: {}" ,
1156
+ status. stats. crucible_dataset. num_already_exist
1157
+ ) ;
1158
+ println ! (
1159
+ " num_not_in_inventory: {}" ,
1160
+ status. stats. crucible_dataset. num_not_in_inventory
1161
+ ) ;
1162
+ }
1163
+ }
1164
+ }
1165
+
1115
1166
fn print_task_dns_config ( details : & serde_json:: Value ) {
1116
1167
// The "dns_config" tasks emit the generation number of the config that
1117
1168
// they read.
0 commit comments