From 103d2eb90936e7897c20a9db96782aab5b9334e1 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Thu, 18 May 2023 21:34:22 +0300 Subject: refactor(tvix/store): bump CalculateNARResponse.nar_size to u64 Change-Id: I5f41981820363a5eb9982c3d19830916207c62cc Reviewed-on: https://cl.tvl.fyi/c/depot/+/8591 Tested-by: BuildkiteCI Reviewed-by: tazjin --- tvix/store/protos/pathinfo.pb.go | 6 +++--- tvix/store/protos/pathinfo.proto | 2 +- tvix/store/protos/rpc_pathinfo.pb.go | 6 +++--- tvix/store/protos/rpc_pathinfo.proto | 2 +- tvix/store/src/nar/non_caching_calculation_service.rs | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'tvix/store') diff --git a/tvix/store/protos/pathinfo.pb.go b/tvix/store/protos/pathinfo.pb.go index 91d4209477e2..f8c66014eaa7 100644 --- a/tvix/store/protos/pathinfo.pb.go +++ b/tvix/store/protos/pathinfo.pb.go @@ -203,7 +203,7 @@ type NARInfo struct { unknownFields protoimpl.UnknownFields // This size of the NAR file, in bytes. - NarSize uint32 `protobuf:"varint,1,opt,name=nar_size,json=narSize,proto3" json:"nar_size,omitempty"` + NarSize uint64 `protobuf:"varint,1,opt,name=nar_size,json=narSize,proto3" json:"nar_size,omitempty"` // The sha256 of the NAR file representation. NarSha256 []byte `protobuf:"bytes,2,opt,name=nar_sha256,json=narSha256,proto3" json:"nar_sha256,omitempty"` // The signatures in a .narinfo file. @@ -248,7 +248,7 @@ func (*NARInfo) Descriptor() ([]byte, []int) { return file_tvix_store_protos_pathinfo_proto_rawDescGZIP(), []int{2} } -func (x *NARInfo) GetNarSize() uint32 { +func (x *NARInfo) GetNarSize() uint64 { if x != nil { return x.NarSize } @@ -361,7 +361,7 @@ var file_tvix_store_protos_pathinfo_proto_rawDesc = []byte{ 0x31, 0x2e, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x07, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x42, 0x06, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x22, 0xe3, 0x01, 0x0a, 0x07, 0x4e, 0x41, 0x52, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x0a, 0x08, - 0x6e, 0x61, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, + 0x6e, 0x61, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6e, 0x61, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x61, 0x72, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x6e, 0x61, 0x72, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x12, 0x40, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, diff --git a/tvix/store/protos/pathinfo.proto b/tvix/store/protos/pathinfo.proto index 74b75c2b5ddd..896d4aa225ac 100644 --- a/tvix/store/protos/pathinfo.proto +++ b/tvix/store/protos/pathinfo.proto @@ -48,7 +48,7 @@ message NARInfo { }; // This size of the NAR file, in bytes. - uint32 nar_size = 1; + uint64 nar_size = 1; // The sha256 of the NAR file representation. bytes nar_sha256 = 2; diff --git a/tvix/store/protos/rpc_pathinfo.pb.go b/tvix/store/protos/rpc_pathinfo.pb.go index 27f04ed8f666..bbbf3122ba23 100644 --- a/tvix/store/protos/rpc_pathinfo.pb.go +++ b/tvix/store/protos/rpc_pathinfo.pb.go @@ -107,7 +107,7 @@ type CalculateNARResponse struct { unknownFields protoimpl.UnknownFields // This size of the NAR file, in bytes. - NarSize uint32 `protobuf:"varint,1,opt,name=nar_size,json=narSize,proto3" json:"nar_size,omitempty"` + NarSize uint64 `protobuf:"varint,1,opt,name=nar_size,json=narSize,proto3" json:"nar_size,omitempty"` // The sha256 of the NAR file representation. NarSha256 []byte `protobuf:"bytes,2,opt,name=nar_sha256,json=narSha256,proto3" json:"nar_sha256,omitempty"` } @@ -144,7 +144,7 @@ func (*CalculateNARResponse) Descriptor() ([]byte, []int) { return file_tvix_store_protos_rpc_pathinfo_proto_rawDescGZIP(), []int{1} } -func (x *CalculateNARResponse) GetNarSize() uint32 { +func (x *CalculateNARResponse) GetNarSize() uint64 { if x != nil { return x.NarSize } @@ -173,7 +173,7 @@ var file_tvix_store_protos_rpc_pathinfo_proto_rawDesc = []byte{ 0x74, 0x48, 0x61, 0x73, 0x68, 0x42, 0x09, 0x0a, 0x07, 0x62, 0x79, 0x5f, 0x77, 0x68, 0x61, 0x74, 0x22, 0x50, 0x0a, 0x14, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x41, 0x52, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x61, 0x72, 0x5f, - 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6e, 0x61, 0x72, 0x53, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6e, 0x61, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x61, 0x72, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x6e, 0x61, 0x72, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x32, 0xd7, 0x01, 0x0a, 0x0f, 0x50, 0x61, 0x74, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x53, diff --git a/tvix/store/protos/rpc_pathinfo.proto b/tvix/store/protos/rpc_pathinfo.proto index f37794c291be..991abf6efa99 100644 --- a/tvix/store/protos/rpc_pathinfo.proto +++ b/tvix/store/protos/rpc_pathinfo.proto @@ -66,7 +66,7 @@ message GetPathInfoRequest { // digest. message CalculateNARResponse { // This size of the NAR file, in bytes. - uint32 nar_size = 1; + uint64 nar_size = 1; // The sha256 of the NAR file representation. bytes nar_sha256 = 2; diff --git a/tvix/store/src/nar/non_caching_calculation_service.rs b/tvix/store/src/nar/non_caching_calculation_service.rs index 94dd51bc6a7f..ff6eb4d5d057 100644 --- a/tvix/store/src/nar/non_caching_calculation_service.rs +++ b/tvix/store/src/nar/non_caching_calculation_service.rs @@ -36,7 +36,7 @@ impl NARCalculationService self.nar_renderer.write_nar(&mut cw, root_node)?; Ok(proto::CalculateNarResponse { - nar_size: cw.count() as u32, + nar_size: cw.count() as u64, nar_sha256: cw.into_inner().finalize().to_vec(), }) } -- cgit 1.4.1