@@ -22,7 +22,8 @@ use containerd_shim::{
22
22
protos:: {
23
23
api:: { CreateTaskRequest , ExecProcessRequest , ProcessInfo , StateResponse } ,
24
24
cgroups:: metrics:: Metrics ,
25
- protobuf:: { well_known_types:: any:: Any , Message } ,
25
+ protobuf:: { well_known_types:: any:: Any , Message , MessageDyn } ,
26
+ shim:: oci:: ProcessDetails ,
26
27
} ,
27
28
Error ,
28
29
} ;
@@ -190,7 +191,16 @@ where
190
191
for process_info in & mut processes_info {
191
192
for ( exec_id, process) in & self . processes {
192
193
if process_info. pid as i32 == process. pid ( ) . await {
193
- process_info. set_info ( Any :: parse_from_bytes ( exec_id. as_bytes ( ) ) ?) ;
194
+ let process_details = ProcessDetails {
195
+ exec_id : exec_id. to_string ( ) ,
196
+ special_fields : Default :: default ( ) ,
197
+ } ;
198
+ let v = Any {
199
+ type_url : process_details. descriptor_dyn ( ) . full_name ( ) . to_string ( ) ,
200
+ value : process_details. write_to_bytes ( ) ?,
201
+ special_fields : Default :: default ( ) ,
202
+ } ;
203
+ process_info. set_info ( v) ;
194
204
break ;
195
205
}
196
206
}
0 commit comments