@@ -6,10 +6,10 @@ use dstack_types::AppCompose;
66use dstack_vmm_rpc as rpc;
77use dstack_vmm_rpc:: vmm_server:: { VmmRpc , VmmServer } ;
88use dstack_vmm_rpc:: {
9- AppId , GatewaySettings , GetInfoResponse , GetMetaResponse , Id , ImageInfo as RpcImageInfo ,
10- ImageListResponse , KmsSettings , ListGpusResponse , PublicKeyResponse , ResizeVmRequest ,
11- ResourcesSettings , StatusRequest , StatusResponse , UpgradeAppRequest , VersionResponse ,
12- VmConfiguration ,
9+ AppId , ComposeHash as RpcComposeHash , GatewaySettings , GetInfoResponse , GetMetaResponse , Id ,
10+ ImageInfo as RpcImageInfo , ImageListResponse , KmsSettings , ListGpusResponse ,
11+ PublicKeyResponse , ResizeVmRequest , ResourcesSettings , StatusRequest , StatusResponse ,
12+ UpgradeAppRequest , VersionResponse , VmConfiguration ,
1313} ;
1414use fs_err as fs;
1515use ra_rpc:: { CallContext , RpcCall } ;
@@ -434,15 +434,13 @@ impl VmmRpc for RpcHandler {
434434 Ok ( ListGpusResponse { gpus } )
435435 }
436436
437- async fn get_compose_hash ( self , request : VmConfiguration ) -> Result < AppId > {
437+ async fn get_compose_hash ( self , request : VmConfiguration ) -> Result < RpcComposeHash > {
438438 validate_label ( & request. name ) ?;
439439 // check the compose file is valid
440440 let _app_compose: AppCompose =
441441 serde_json:: from_str ( & request. compose_file ) . context ( "Invalid compose file" ) ?;
442- let app_id = app_id_of ( & request. compose_file ) ;
443- Ok ( AppId {
444- app_id : app_id. into ( ) ,
445- } )
442+ let hash = hex_sha256 ( & request. compose_file ) ;
443+ Ok ( RpcComposeHash { hash } )
446444 }
447445}
448446
0 commit comments