diff --git a/gen/go/infracost/parser/cache/cache.pb.go b/gen/go/infracost/parser/cache/cache.pb.go index 915b1b9..f2085d4 100644 --- a/gen/go/infracost/parser/cache/cache.pb.go +++ b/gen/go/infracost/parser/cache/cache.pb.go @@ -315,16 +315,30 @@ func (x *DependencyPaths) GetPaths() []string { return nil } -// BranchSummary is a summary of the cache for a branch. For a given branch, it contains a map of SHA to breakdown ID. +// BranchSummary caches per-project data for a branch so that a later run of the same branch, or a +// pull request opened against it, can look each project up by name to reuse its breakdown ID, detect +// whether it changed via its stored hash, and recover its dependency paths without re-parsing. type BranchSummary struct { - state protoimpl.MessageState `protogen:"open.v1"` - Branch string `protobuf:"bytes,1,opt,name=branch,proto3" json:"branch,omitempty"` - ShaToIdMap map[string]string `protobuf:"bytes,2,rep,name=sha_to_id_map,json=shaToIdMap,proto3" json:"sha_to_id_map,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - ShaToProjectNameMap map[string]string `protobuf:"bytes,3,rep,name=sha_to_project_name_map,json=shaToProjectNameMap,proto3" json:"sha_to_project_name_map,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - ShaToFlavorMap map[string]Flavor `protobuf:"bytes,4,rep,name=sha_to_flavor_map,json=shaToFlavorMap,proto3" json:"sha_to_flavor_map,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=infracost.parser.cache.Flavor"` + state protoimpl.MessageState `protogen:"open.v1"` + Branch string `protobuf:"bytes,1,opt,name=branch,proto3" json:"branch,omitempty"` + // Deprecated: superseded by the projects field below. New code must not write these; they remain + // only so that summaries written by older code can still be read. When projects is empty (an old + // summary), reconstruct it by joining these maps on their shared SHA key - sha_to_project_name_map + // gives each SHA its project name, and the others supply that project's id, flavor, and deps. + // + // Deprecated: Marked as deprecated in infracost/parser/cache/cache.proto. + ShaToIdMap map[string]string `protobuf:"bytes,2,rep,name=sha_to_id_map,json=shaToIdMap,proto3" json:"sha_to_id_map,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Deprecated: Marked as deprecated in infracost/parser/cache/cache.proto. + ShaToProjectNameMap map[string]string `protobuf:"bytes,3,rep,name=sha_to_project_name_map,json=shaToProjectNameMap,proto3" json:"sha_to_project_name_map,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Deprecated: Marked as deprecated in infracost/parser/cache/cache.proto. + ShaToFlavorMap map[string]Flavor `protobuf:"bytes,4,rep,name=sha_to_flavor_map,json=shaToFlavorMap,proto3" json:"sha_to_flavor_map,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=infracost.parser.cache.Flavor"` + // Deprecated: Marked as deprecated in infracost/parser/cache/cache.proto. ShaToDependencyPathsMap map[string]*DependencyPaths `protobuf:"bytes,5,rep,name=sha_to_dependency_paths_map,json=shaToDependencyPathsMap,proto3" json:"sha_to_dependency_paths_map,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // Projects holds the summarised data for each project discovered in this branch, keyed by project + // name (which is unique within a branch). + Projects map[string]*ProjectSummary `protobuf:"bytes,6,rep,name=projects,proto3" json:"projects,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *BranchSummary) Reset() { @@ -364,6 +378,7 @@ func (x *BranchSummary) GetBranch() string { return "" } +// Deprecated: Marked as deprecated in infracost/parser/cache/cache.proto. func (x *BranchSummary) GetShaToIdMap() map[string]string { if x != nil { return x.ShaToIdMap @@ -371,6 +386,7 @@ func (x *BranchSummary) GetShaToIdMap() map[string]string { return nil } +// Deprecated: Marked as deprecated in infracost/parser/cache/cache.proto. func (x *BranchSummary) GetShaToProjectNameMap() map[string]string { if x != nil { return x.ShaToProjectNameMap @@ -378,6 +394,7 @@ func (x *BranchSummary) GetShaToProjectNameMap() map[string]string { return nil } +// Deprecated: Marked as deprecated in infracost/parser/cache/cache.proto. func (x *BranchSummary) GetShaToFlavorMap() map[string]Flavor { if x != nil { return x.ShaToFlavorMap @@ -385,6 +402,7 @@ func (x *BranchSummary) GetShaToFlavorMap() map[string]Flavor { return nil } +// Deprecated: Marked as deprecated in infracost/parser/cache/cache.proto. func (x *BranchSummary) GetShaToDependencyPathsMap() map[string]*DependencyPaths { if x != nil { return x.ShaToDependencyPathsMap @@ -392,6 +410,89 @@ func (x *BranchSummary) GetShaToDependencyPathsMap() map[string]*DependencyPaths return nil } +func (x *BranchSummary) GetProjects() map[string]*ProjectSummary { + if x != nil { + return x.Projects + } + return nil +} + +// ProjectSummary is the cached per-project data recorded for one project on the run that produced the +// enclosing BranchSummary. +type ProjectSummary struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Breakdown ID assigned by the dashboard, reused across runs while the project is unchanged. + BreakdownId string `protobuf:"bytes,1,opt,name=breakdown_id,json=breakdownId,proto3" json:"breakdown_id,omitempty"` + // The project's BreakdownSHA from that run - the content hash used as the parse-cache key. A later + // run compares its freshly computed hash against this to decide whether the project changed. + BreakdownHash string `protobuf:"bytes,2,opt,name=breakdown_hash,json=breakdownHash,proto3" json:"breakdown_hash,omitempty"` + // The project's flavor (Terraform, CloudFormation, or agnostic). + Flavor Flavor `protobuf:"varint,3,opt,name=flavor,proto3,enum=infracost.parser.cache.Flavor" json:"flavor,omitempty"` + // The files this project depended on during its last parse, including files outside the project + // directory. Used to decide whether changed files are relevant and to invalidate caches. + DependencyPaths *DependencyPaths `protobuf:"bytes,4,opt,name=dependency_paths,json=dependencyPaths,proto3" json:"dependency_paths,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ProjectSummary) Reset() { + *x = ProjectSummary{} + mi := &file_infracost_parser_cache_cache_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ProjectSummary) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProjectSummary) ProtoMessage() {} + +func (x *ProjectSummary) ProtoReflect() protoreflect.Message { + mi := &file_infracost_parser_cache_cache_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProjectSummary.ProtoReflect.Descriptor instead. +func (*ProjectSummary) Descriptor() ([]byte, []int) { + return file_infracost_parser_cache_cache_proto_rawDescGZIP(), []int{4} +} + +func (x *ProjectSummary) GetBreakdownId() string { + if x != nil { + return x.BreakdownId + } + return "" +} + +func (x *ProjectSummary) GetBreakdownHash() string { + if x != nil { + return x.BreakdownHash + } + return "" +} + +func (x *ProjectSummary) GetFlavor() Flavor { + if x != nil { + return x.Flavor + } + return Flavor_FLAVOR_UNSPECIFIED +} + +func (x *ProjectSummary) GetDependencyPaths() *DependencyPaths { + if x != nil { + return x.DependencyPaths + } + return nil +} + type EncryptionEnvelope struct { state protoimpl.MessageState `protogen:"open.v1"` EncryptedDek []byte `protobuf:"bytes,1,opt,name=encrypted_dek,json=encryptedDek,proto3" json:"encrypted_dek,omitempty"` @@ -403,7 +504,7 @@ type EncryptionEnvelope struct { func (x *EncryptionEnvelope) Reset() { *x = EncryptionEnvelope{} - mi := &file_infracost_parser_cache_cache_proto_msgTypes[4] + mi := &file_infracost_parser_cache_cache_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -415,7 +516,7 @@ func (x *EncryptionEnvelope) String() string { func (*EncryptionEnvelope) ProtoMessage() {} func (x *EncryptionEnvelope) ProtoReflect() protoreflect.Message { - mi := &file_infracost_parser_cache_cache_proto_msgTypes[4] + mi := &file_infracost_parser_cache_cache_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -428,7 +529,7 @@ func (x *EncryptionEnvelope) ProtoReflect() protoreflect.Message { // Deprecated: Use EncryptionEnvelope.ProtoReflect.Descriptor instead. func (*EncryptionEnvelope) Descriptor() ([]byte, []int) { - return file_infracost_parser_cache_cache_proto_rawDescGZIP(), []int{4} + return file_infracost_parser_cache_cache_proto_rawDescGZIP(), []int{5} } func (x *EncryptionEnvelope) GetEncryptedDek() []byte { @@ -467,7 +568,7 @@ type CloudFormationProject struct { func (x *CloudFormationProject) Reset() { *x = CloudFormationProject{} - mi := &file_infracost_parser_cache_cache_proto_msgTypes[5] + mi := &file_infracost_parser_cache_cache_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -479,7 +580,7 @@ func (x *CloudFormationProject) String() string { func (*CloudFormationProject) ProtoMessage() {} func (x *CloudFormationProject) ProtoReflect() protoreflect.Message { - mi := &file_infracost_parser_cache_cache_proto_msgTypes[5] + mi := &file_infracost_parser_cache_cache_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -492,7 +593,7 @@ func (x *CloudFormationProject) ProtoReflect() protoreflect.Message { // Deprecated: Use CloudFormationProject.ProtoReflect.Descriptor instead. func (*CloudFormationProject) Descriptor() ([]byte, []int) { - return file_infracost_parser_cache_cache_proto_rawDescGZIP(), []int{5} + return file_infracost_parser_cache_cache_proto_rawDescGZIP(), []int{6} } func (x *CloudFormationProject) GetResult() *cloudformation.Result { @@ -560,7 +661,7 @@ type TreeProject struct { func (x *TreeProject) Reset() { *x = TreeProject{} - mi := &file_infracost_parser_cache_cache_proto_msgTypes[6] + mi := &file_infracost_parser_cache_cache_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -572,7 +673,7 @@ func (x *TreeProject) String() string { func (*TreeProject) ProtoMessage() {} func (x *TreeProject) ProtoReflect() protoreflect.Message { - mi := &file_infracost_parser_cache_cache_proto_msgTypes[6] + mi := &file_infracost_parser_cache_cache_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -585,7 +686,7 @@ func (x *TreeProject) ProtoReflect() protoreflect.Message { // Deprecated: Use TreeProject.ProtoReflect.Descriptor instead. func (*TreeProject) Descriptor() ([]byte, []int) { - return file_infracost_parser_cache_cache_proto_rawDescGZIP(), []int{6} + return file_infracost_parser_cache_cache_proto_rawDescGZIP(), []int{7} } func (x *TreeProject) GetTree() *tree.Tree { @@ -671,14 +772,15 @@ const file_infracost_parser_cache_cache_proto_rawDesc = "" + "\n" + "created_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\"'\n" + "\x0fDependencyPaths\x12\x14\n" + - "\x05paths\x18\x01 \x03(\tR\x05paths\"\xbf\x06\n" + + "\x05paths\x18\x01 \x03(\tR\x05paths\"\x85\b\n" + "\rBranchSummary\x12\x16\n" + - "\x06branch\x18\x01 \x01(\tR\x06branch\x12X\n" + - "\rsha_to_id_map\x18\x02 \x03(\v25.infracost.parser.cache.BranchSummary.ShaToIdMapEntryR\n" + - "shaToIdMap\x12t\n" + - "\x17sha_to_project_name_map\x18\x03 \x03(\v2>.infracost.parser.cache.BranchSummary.ShaToProjectNameMapEntryR\x13shaToProjectNameMap\x12d\n" + - "\x11sha_to_flavor_map\x18\x04 \x03(\v29.infracost.parser.cache.BranchSummary.ShaToFlavorMapEntryR\x0eshaToFlavorMap\x12\x80\x01\n" + - "\x1bsha_to_dependency_paths_map\x18\x05 \x03(\v2B.infracost.parser.cache.BranchSummary.ShaToDependencyPathsMapEntryR\x17shaToDependencyPathsMap\x1a=\n" + + "\x06branch\x18\x01 \x01(\tR\x06branch\x12\\\n" + + "\rsha_to_id_map\x18\x02 \x03(\v25.infracost.parser.cache.BranchSummary.ShaToIdMapEntryB\x02\x18\x01R\n" + + "shaToIdMap\x12x\n" + + "\x17sha_to_project_name_map\x18\x03 \x03(\v2>.infracost.parser.cache.BranchSummary.ShaToProjectNameMapEntryB\x02\x18\x01R\x13shaToProjectNameMap\x12h\n" + + "\x11sha_to_flavor_map\x18\x04 \x03(\v29.infracost.parser.cache.BranchSummary.ShaToFlavorMapEntryB\x02\x18\x01R\x0eshaToFlavorMap\x12\x84\x01\n" + + "\x1bsha_to_dependency_paths_map\x18\x05 \x03(\v2B.infracost.parser.cache.BranchSummary.ShaToDependencyPathsMapEntryB\x02\x18\x01R\x17shaToDependencyPathsMap\x12O\n" + + "\bprojects\x18\x06 \x03(\v23.infracost.parser.cache.BranchSummary.ProjectsEntryR\bprojects\x1a=\n" + "\x0fShaToIdMapEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1aF\n" + @@ -690,7 +792,15 @@ const file_infracost_parser_cache_cache_proto_rawDesc = "" + "\x05value\x18\x02 \x01(\x0e2\x1e.infracost.parser.cache.FlavorR\x05value:\x028\x01\x1as\n" + "\x1cShaToDependencyPathsMapEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12=\n" + - "\x05value\x18\x02 \x01(\v2'.infracost.parser.cache.DependencyPathsR\x05value:\x028\x01\"p\n" + + "\x05value\x18\x02 \x01(\v2'.infracost.parser.cache.DependencyPathsR\x05value:\x028\x01\x1ac\n" + + "\rProjectsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12<\n" + + "\x05value\x18\x02 \x01(\v2&.infracost.parser.cache.ProjectSummaryR\x05value:\x028\x01\"\xe6\x01\n" + + "\x0eProjectSummary\x12!\n" + + "\fbreakdown_id\x18\x01 \x01(\tR\vbreakdownId\x12%\n" + + "\x0ebreakdown_hash\x18\x02 \x01(\tR\rbreakdownHash\x126\n" + + "\x06flavor\x18\x03 \x01(\x0e2\x1e.infracost.parser.cache.FlavorR\x06flavor\x12R\n" + + "\x10dependency_paths\x18\x04 \x01(\v2'.infracost.parser.cache.DependencyPathsR\x0fdependencyPaths\"p\n" + "\x12EncryptionEnvelope\x12#\n" + "\rencrypted_dek\x18\x01 \x01(\fR\fencryptedDek\x12\x0e\n" + "\x02iv\x18\x02 \x01(\fR\x02iv\x12%\n" + @@ -737,53 +847,59 @@ func file_infracost_parser_cache_cache_proto_rawDescGZIP() []byte { } var file_infracost_parser_cache_cache_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_infracost_parser_cache_cache_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_infracost_parser_cache_cache_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_infracost_parser_cache_cache_proto_goTypes = []any{ (Flavor)(0), // 0: infracost.parser.cache.Flavor (*TerraformProject)(nil), // 1: infracost.parser.cache.TerraformProject (*Metadata)(nil), // 2: infracost.parser.cache.Metadata (*DependencyPaths)(nil), // 3: infracost.parser.cache.DependencyPaths (*BranchSummary)(nil), // 4: infracost.parser.cache.BranchSummary - (*EncryptionEnvelope)(nil), // 5: infracost.parser.cache.EncryptionEnvelope - (*CloudFormationProject)(nil), // 6: infracost.parser.cache.CloudFormationProject - (*TreeProject)(nil), // 7: infracost.parser.cache.TreeProject - nil, // 8: infracost.parser.cache.BranchSummary.ShaToIdMapEntry - nil, // 9: infracost.parser.cache.BranchSummary.ShaToProjectNameMapEntry - nil, // 10: infracost.parser.cache.BranchSummary.ShaToFlavorMapEntry - nil, // 11: infracost.parser.cache.BranchSummary.ShaToDependencyPathsMapEntry - (*terraform.ModuleResult)(nil), // 12: infracost.parser.terraform.ModuleResult - (*parser.Diagnostic)(nil), // 13: infracost.parser.Diagnostic - (*usage.Usage)(nil), // 14: infracost.usage.Usage - (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp - (*cloudformation.Result)(nil), // 16: infracost.parser.cloudformation.Result - (*tree.Tree)(nil), // 17: infracost.tree.Tree + (*ProjectSummary)(nil), // 5: infracost.parser.cache.ProjectSummary + (*EncryptionEnvelope)(nil), // 6: infracost.parser.cache.EncryptionEnvelope + (*CloudFormationProject)(nil), // 7: infracost.parser.cache.CloudFormationProject + (*TreeProject)(nil), // 8: infracost.parser.cache.TreeProject + nil, // 9: infracost.parser.cache.BranchSummary.ShaToIdMapEntry + nil, // 10: infracost.parser.cache.BranchSummary.ShaToProjectNameMapEntry + nil, // 11: infracost.parser.cache.BranchSummary.ShaToFlavorMapEntry + nil, // 12: infracost.parser.cache.BranchSummary.ShaToDependencyPathsMapEntry + nil, // 13: infracost.parser.cache.BranchSummary.ProjectsEntry + (*terraform.ModuleResult)(nil), // 14: infracost.parser.terraform.ModuleResult + (*parser.Diagnostic)(nil), // 15: infracost.parser.Diagnostic + (*usage.Usage)(nil), // 16: infracost.usage.Usage + (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp + (*cloudformation.Result)(nil), // 18: infracost.parser.cloudformation.Result + (*tree.Tree)(nil), // 19: infracost.tree.Tree } var file_infracost_parser_cache_cache_proto_depIdxs = []int32{ - 12, // 0: infracost.parser.cache.TerraformProject.result:type_name -> infracost.parser.terraform.ModuleResult + 14, // 0: infracost.parser.cache.TerraformProject.result:type_name -> infracost.parser.terraform.ModuleResult 2, // 1: infracost.parser.cache.TerraformProject.metadata:type_name -> infracost.parser.cache.Metadata - 13, // 2: infracost.parser.cache.TerraformProject.diags:type_name -> infracost.parser.Diagnostic - 14, // 3: infracost.parser.cache.TerraformProject.usage:type_name -> infracost.usage.Usage + 15, // 2: infracost.parser.cache.TerraformProject.diags:type_name -> infracost.parser.Diagnostic + 16, // 3: infracost.parser.cache.TerraformProject.usage:type_name -> infracost.usage.Usage 0, // 4: infracost.parser.cache.Metadata.flavor:type_name -> infracost.parser.cache.Flavor - 15, // 5: infracost.parser.cache.Metadata.created_at:type_name -> google.protobuf.Timestamp - 8, // 6: infracost.parser.cache.BranchSummary.sha_to_id_map:type_name -> infracost.parser.cache.BranchSummary.ShaToIdMapEntry - 9, // 7: infracost.parser.cache.BranchSummary.sha_to_project_name_map:type_name -> infracost.parser.cache.BranchSummary.ShaToProjectNameMapEntry - 10, // 8: infracost.parser.cache.BranchSummary.sha_to_flavor_map:type_name -> infracost.parser.cache.BranchSummary.ShaToFlavorMapEntry - 11, // 9: infracost.parser.cache.BranchSummary.sha_to_dependency_paths_map:type_name -> infracost.parser.cache.BranchSummary.ShaToDependencyPathsMapEntry - 16, // 10: infracost.parser.cache.CloudFormationProject.result:type_name -> infracost.parser.cloudformation.Result - 2, // 11: infracost.parser.cache.CloudFormationProject.metadata:type_name -> infracost.parser.cache.Metadata - 13, // 12: infracost.parser.cache.CloudFormationProject.diags:type_name -> infracost.parser.Diagnostic - 14, // 13: infracost.parser.cache.CloudFormationProject.usage:type_name -> infracost.usage.Usage - 17, // 14: infracost.parser.cache.TreeProject.tree:type_name -> infracost.tree.Tree - 2, // 15: infracost.parser.cache.TreeProject.metadata:type_name -> infracost.parser.cache.Metadata - 13, // 16: infracost.parser.cache.TreeProject.diags:type_name -> infracost.parser.Diagnostic - 14, // 17: infracost.parser.cache.TreeProject.usage:type_name -> infracost.usage.Usage - 0, // 18: infracost.parser.cache.BranchSummary.ShaToFlavorMapEntry.value:type_name -> infracost.parser.cache.Flavor - 3, // 19: infracost.parser.cache.BranchSummary.ShaToDependencyPathsMapEntry.value:type_name -> infracost.parser.cache.DependencyPaths - 20, // [20:20] is the sub-list for method output_type - 20, // [20:20] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name + 17, // 5: infracost.parser.cache.Metadata.created_at:type_name -> google.protobuf.Timestamp + 9, // 6: infracost.parser.cache.BranchSummary.sha_to_id_map:type_name -> infracost.parser.cache.BranchSummary.ShaToIdMapEntry + 10, // 7: infracost.parser.cache.BranchSummary.sha_to_project_name_map:type_name -> infracost.parser.cache.BranchSummary.ShaToProjectNameMapEntry + 11, // 8: infracost.parser.cache.BranchSummary.sha_to_flavor_map:type_name -> infracost.parser.cache.BranchSummary.ShaToFlavorMapEntry + 12, // 9: infracost.parser.cache.BranchSummary.sha_to_dependency_paths_map:type_name -> infracost.parser.cache.BranchSummary.ShaToDependencyPathsMapEntry + 13, // 10: infracost.parser.cache.BranchSummary.projects:type_name -> infracost.parser.cache.BranchSummary.ProjectsEntry + 0, // 11: infracost.parser.cache.ProjectSummary.flavor:type_name -> infracost.parser.cache.Flavor + 3, // 12: infracost.parser.cache.ProjectSummary.dependency_paths:type_name -> infracost.parser.cache.DependencyPaths + 18, // 13: infracost.parser.cache.CloudFormationProject.result:type_name -> infracost.parser.cloudformation.Result + 2, // 14: infracost.parser.cache.CloudFormationProject.metadata:type_name -> infracost.parser.cache.Metadata + 15, // 15: infracost.parser.cache.CloudFormationProject.diags:type_name -> infracost.parser.Diagnostic + 16, // 16: infracost.parser.cache.CloudFormationProject.usage:type_name -> infracost.usage.Usage + 19, // 17: infracost.parser.cache.TreeProject.tree:type_name -> infracost.tree.Tree + 2, // 18: infracost.parser.cache.TreeProject.metadata:type_name -> infracost.parser.cache.Metadata + 15, // 19: infracost.parser.cache.TreeProject.diags:type_name -> infracost.parser.Diagnostic + 16, // 20: infracost.parser.cache.TreeProject.usage:type_name -> infracost.usage.Usage + 0, // 21: infracost.parser.cache.BranchSummary.ShaToFlavorMapEntry.value:type_name -> infracost.parser.cache.Flavor + 3, // 22: infracost.parser.cache.BranchSummary.ShaToDependencyPathsMapEntry.value:type_name -> infracost.parser.cache.DependencyPaths + 5, // 23: infracost.parser.cache.BranchSummary.ProjectsEntry.value:type_name -> infracost.parser.cache.ProjectSummary + 24, // [24:24] is the sub-list for method output_type + 24, // [24:24] is the sub-list for method input_type + 24, // [24:24] is the sub-list for extension type_name + 24, // [24:24] is the sub-list for extension extendee + 0, // [0:24] is the sub-list for field type_name } func init() { file_infracost_parser_cache_cache_proto_init() } @@ -797,7 +913,7 @@ func file_infracost_parser_cache_cache_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_infracost_parser_cache_cache_proto_rawDesc), len(file_infracost_parser_cache_cache_proto_rawDesc)), NumEnums: 1, - NumMessages: 11, + NumMessages: 13, NumExtensions: 0, NumServices: 0, }, diff --git a/gen/ts/infracost/parser/cache/cache_pb.d.ts b/gen/ts/infracost/parser/cache/cache_pb.d.ts index d3b51a6..2222b1a 100644 --- a/gen/ts/infracost/parser/cache/cache_pb.d.ts +++ b/gen/ts/infracost/parser/cache/cache_pb.d.ts @@ -130,7 +130,9 @@ export declare type DependencyPaths = Message<"infracost.parser.cache.Dependency export declare const DependencyPathsSchema: GenMessage; /** - * BranchSummary is a summary of the cache for a branch. For a given branch, it contains a map of SHA to breakdown ID. + * BranchSummary caches per-project data for a branch so that a later run of the same branch, or a + * pull request opened against it, can look each project up by name to reuse its breakdown ID, detect + * whether it changed via its stored hash, and recover its dependency paths without re-parsing. * * @generated from message infracost.parser.cache.BranchSummary */ @@ -141,24 +143,41 @@ export declare type BranchSummary = Message<"infracost.parser.cache.BranchSummar branch: string; /** - * @generated from field: map sha_to_id_map = 2; + * Deprecated: superseded by the projects field below. New code must not write these; they remain + * only so that summaries written by older code can still be read. When projects is empty (an old + * summary), reconstruct it by joining these maps on their shared SHA key - sha_to_project_name_map + * gives each SHA its project name, and the others supply that project's id, flavor, and deps. + * + * @generated from field: map sha_to_id_map = 2 [deprecated = true]; + * @deprecated */ shaToIdMap: { [key: string]: string }; /** - * @generated from field: map sha_to_project_name_map = 3; + * @generated from field: map sha_to_project_name_map = 3 [deprecated = true]; + * @deprecated */ shaToProjectNameMap: { [key: string]: string }; /** - * @generated from field: map sha_to_flavor_map = 4; + * @generated from field: map sha_to_flavor_map = 4 [deprecated = true]; + * @deprecated */ shaToFlavorMap: { [key: string]: Flavor }; /** - * @generated from field: map sha_to_dependency_paths_map = 5; + * @generated from field: map sha_to_dependency_paths_map = 5 [deprecated = true]; + * @deprecated */ shaToDependencyPathsMap: { [key: string]: DependencyPaths }; + + /** + * Projects holds the summarised data for each project discovered in this branch, keyed by project + * name (which is unique within a branch). + * + * @generated from field: map projects = 6; + */ + projects: { [key: string]: ProjectSummary }; }; /** @@ -167,6 +186,50 @@ export declare type BranchSummary = Message<"infracost.parser.cache.BranchSummar */ export declare const BranchSummarySchema: GenMessage; +/** + * ProjectSummary is the cached per-project data recorded for one project on the run that produced the + * enclosing BranchSummary. + * + * @generated from message infracost.parser.cache.ProjectSummary + */ +export declare type ProjectSummary = Message<"infracost.parser.cache.ProjectSummary"> & { + /** + * Breakdown ID assigned by the dashboard, reused across runs while the project is unchanged. + * + * @generated from field: string breakdown_id = 1; + */ + breakdownId: string; + + /** + * The project's BreakdownSHA from that run - the content hash used as the parse-cache key. A later + * run compares its freshly computed hash against this to decide whether the project changed. + * + * @generated from field: string breakdown_hash = 2; + */ + breakdownHash: string; + + /** + * The project's flavor (Terraform, CloudFormation, or agnostic). + * + * @generated from field: infracost.parser.cache.Flavor flavor = 3; + */ + flavor: Flavor; + + /** + * The files this project depended on during its last parse, including files outside the project + * directory. Used to decide whether changed files are relevant and to invalidate caches. + * + * @generated from field: infracost.parser.cache.DependencyPaths dependency_paths = 4; + */ + dependencyPaths?: DependencyPaths; +}; + +/** + * Describes the message infracost.parser.cache.ProjectSummary. + * Use `create(ProjectSummarySchema)` to create a new message. + */ +export declare const ProjectSummarySchema: GenMessage; + /** * @generated from message infracost.parser.cache.EncryptionEnvelope */ diff --git a/gen/ts/infracost/parser/cache/cache_pb.js b/gen/ts/infracost/parser/cache/cache_pb.js index 7206589..242e27f 100644 --- a/gen/ts/infracost/parser/cache/cache_pb.js +++ b/gen/ts/infracost/parser/cache/cache_pb.js @@ -14,7 +14,7 @@ import { file_infracost_usage_usage } from "../../usage/usage_pb.js"; * Describes the file infracost/parser/cache/cache.proto. */ export const file_infracost_parser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Fyc2VyOjpDYWNoZWIGcHJvdG8z", [file_google_protobuf_timestamp, file_infracost_parser_cloudformation_result, file_infracost_parser_diagnostic, file_infracost_parser_terraform_module, file_infracost_tree_tree, file_infracost_usage_usage]); + fileDesc("CiJpbmZyYWNvc3QvcGFyc2VyL2NhY2hlL2NhY2hlLnByb3RvEhZpbmZyYWNvc3QucGFyc2VyLmNhY2hlIpcDChBUZXJyYWZvcm1Qcm9qZWN0EjgKBnJlc3VsdBgBIAEoCzIoLmluZnJhY29zdC5wYXJzZXIudGVycmFmb3JtLk1vZHVsZVJlc3VsdBIyCghtZXRhZGF0YRgCIAEoCzIgLmluZnJhY29zdC5wYXJzZXIuY2FjaGUuTWV0YWRhdGESKwoFZGlhZ3MYAyADKAsyHC5pbmZyYWNvc3QucGFyc2VyLkRpYWdub3N0aWMSFQoNaXNfdGVycmFncnVudBgGIAEoCBIfChd0ZXJyYWZvcm1fbW9kdWxlX3N1ZmZpeBgHIAEoCRIlCgV1c2FnZRgJIAEoCzIWLmluZnJhY29zdC51c2FnZS5Vc2FnZRIUCgxwcm9qZWN0X3R5cGUYCiABKAkSEgoKY29uZmlnX3NoYRgLIAEoCRIMCgRwYXRoGAwgASgJEhEKCXdvcmtzcGFjZRgNIAEoCUoECAQQBUoECAUQBkoECAgQCVIKdXNhZ2VfZmlsZVIOcHJvamVjdF9jb25maWdSEGRlcGVuZGVuY3lfcGF0aHMipwEKCE1ldGFkYXRhEgsKA2tleRgBIAEoCRIuCgZmbGF2b3IYAiABKA4yHi5pbmZyYWNvc3QucGFyc2VyLmNhY2hlLkZsYXZvchIWCg5ydW5uZXJfdmVyc2lvbhgDIAEoCRIWCg5wYXJzZXJfdmVyc2lvbhgEIAEoCRIuCgpjcmVhdGVkX2F0GAUgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCIgCg9EZXBlbmRlbmN5UGF0aHMSDQoFcGF0aHMYASADKAki7AYKDUJyYW5jaFN1bW1hcnkSDgoGYnJhbmNoG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iUKBXVzYWdlGAQgASgLMhYuaW5mcmFjb3N0LnVzYWdlLlVzYWdlEhQKDHByb2plY3RfdHlwZRgFIAEoCRISCgpjb25maWdfc2hhGAYgASgJEgwKBHBhdGgYByABKAkSEQoJd29ya3NwYWNlGAggASgJKmYKBkZsYXZvchIWChJGTEFWT1JfVU5TUEVDSUZJRUQQABIUChBGTEFWT1JfVEVSUkFGT1JNEAESGQoVRkxBVk9SX0NMT1VERk9STUFUSU9OEAISEwoPRkxBVk9SX0FHTk9TVElDEANC3AEKGmNvbS5pbmZyYWNvc3QucGFyc2VyLmNhY2hlQgpDYWNoZVByb3RvUAFaOGdpdGh1Yi5jb20vaW5mcmFjb3N0L3Byb3RvL2dlbi9nby9pbmZyYWNvc3QvcGFyc2VyL2NhY2hlogIDSVBDqgIWSW5mcmFjb3N0LlBhcnNlci5DYWNoZcoCFkluZnJhY29zdFxQYXJzZXJcQ2FjaGXiAiJJbmZyYWNvc3RcUGFyc2VyXENhY2hlXEdQQk1ldGFkYXRh6gIYSW5mcmFjb3N0OjpQYXJzZXI6OkNhY2hlYgZwcm90bzM", [file_google_protobuf_timestamp, file_infracost_parser_cloudformation_result, file_infracost_parser_diagnostic, file_infracost_parser_terraform_module, file_infracost_tree_tree, file_infracost_usage_usage]); /** * Describes the message infracost.parser.cache.TerraformProject. @@ -44,26 +44,33 @@ export const DependencyPathsSchema = /*@__PURE__*/ export const BranchSummarySchema = /*@__PURE__*/ messageDesc(file_infracost_parser_cache_cache, 3); +/** + * Describes the message infracost.parser.cache.ProjectSummary. + * Use `create(ProjectSummarySchema)` to create a new message. + */ +export const ProjectSummarySchema = /*@__PURE__*/ + messageDesc(file_infracost_parser_cache_cache, 4); + /** * Describes the message infracost.parser.cache.EncryptionEnvelope. * Use `create(EncryptionEnvelopeSchema)` to create a new message. */ export const EncryptionEnvelopeSchema = /*@__PURE__*/ - messageDesc(file_infracost_parser_cache_cache, 4); + messageDesc(file_infracost_parser_cache_cache, 5); /** * Describes the message infracost.parser.cache.CloudFormationProject. * Use `create(CloudFormationProjectSchema)` to create a new message. */ export const CloudFormationProjectSchema = /*@__PURE__*/ - messageDesc(file_infracost_parser_cache_cache, 5); + messageDesc(file_infracost_parser_cache_cache, 6); /** * Describes the message infracost.parser.cache.TreeProject. * Use `create(TreeProjectSchema)` to create a new message. */ export const TreeProjectSchema = /*@__PURE__*/ - messageDesc(file_infracost_parser_cache_cache, 6); + messageDesc(file_infracost_parser_cache_cache, 7); /** * Describes the enum infracost.parser.cache.Flavor. diff --git a/gen/ts/infracost/parser/cache/cache_pb.ts b/gen/ts/infracost/parser/cache/cache_pb.ts index 052eb1a..feee0f6 100644 --- a/gen/ts/infracost/parser/cache/cache_pb.ts +++ b/gen/ts/infracost/parser/cache/cache_pb.ts @@ -22,7 +22,7 @@ import type { Message } from "@bufbuild/protobuf"; * Describes the file infracost/parser/cache/cache.proto. */ export const file_infracost_parser_cache_cache: GenFile = /*@__PURE__*/ - fileDesc("CiJpbmZyYWNvc3QvcGFyc2VyL2NhY2hlL2NhY2hlLnByb3RvEhZpbmZyYWNvc3QucGFyc2VyLmNhY2hlIpcDChBUZXJyYWZvcm1Qcm9qZWN0EjgKBnJlc3VsdBgBIAEoCzIoLmluZnJhY29zdC5wYXJzZXIudGVycmFmb3JtLk1vZHVsZVJlc3VsdBIyCghtZXRhZGF0YRgCIAEoCzIgLmluZnJhY29zdC5wYXJzZXIuY2FjaGUuTWV0YWRhdGESKwoFZGlhZ3MYAyADKAsyHC5pbmZyYWNvc3QucGFyc2VyLkRpYWdub3N0aWMSFQoNaXNfdGVycmFncnVudBgGIAEoCBIfChd0ZXJyYWZvcm1fbW9kdWxlX3N1ZmZpeBgHIAEoCRIlCgV1c2FnZRgJIAEoCzIWLmluZnJhY29zdC51c2FnZS5Vc2FnZRIUCgxwcm9qZWN0X3R5cGUYCiABKAkSEgoKY29uZmlnX3NoYRgLIAEoCRIMCgRwYXRoGAwgASgJEhEKCXdvcmtzcGFjZRgNIAEoCUoECAQQ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ABKAkSEgoKY29uZmlnX3NoYRgGIAEoCRIMCgRwYXRoGAcgASgJEhEKCXdvcmtzcGFjZRgIIAEoCSpmCgZGbGF2b3ISFgoSRkxBVk9SX1VOU1BFQ0lGSUVEEAASFAoQRkxBVk9SX1RFUlJBRk9STRABEhkKFUZMQVZPUl9DTE9VREZPUk1BVElPThACEhMKD0ZMQVZPUl9BR05PU1RJQxADQtwBChpjb20uaW5mcmFjb3N0LnBhcnNlci5jYWNoZUIKQ2FjaGVQcm90b1ABWjhnaXRodWIuY29tL2luZnJhY29zdC9wcm90by9nZW4vZ28vaW5mcmFjb3N0L3BhcnNlci9jYWNoZaICA0lQQ6oCFkluZnJhY29zdC5QYXJzZXIuQ2FjaGXKAhZJbmZyYWNvc3RcUGFyc2VyXENhY2hl4gIiSW5mcmFjb3N0XFBhcnNlclxDYWNoZVxHUEJNZXRhZGF0YeoCGEluZnJhY29zdDo6UGFyc2VyOjpDYWNoZWIGcHJvdG8z", [file_google_protobuf_timestamp, file_infracost_parser_cloudformation_result, file_infracost_parser_diagnostic, file_infracost_parser_terraform_module, file_infracost_tree_tree, file_infracost_usage_usage]); + fileDesc("CiJpbmZyYWNvc3QvcGFyc2VyL2NhY2hlL2NhY2hlLnByb3RvEhZpbmZyYWNvc3QucGFyc2VyLmNhY2hlIpcDChBUZXJyYWZvcm1Qcm9qZWN0EjgKBnJlc3VsdBgBIAEoCzIoLmluZnJhY29zdC5wYXJzZXIudGVycmFmb3JtLk1vZHVsZVJlc3VsdBIyCghtZXRhZGF0YRgCIAEoCzIgLmluZnJhY29zdC5wYXJzZXIuY2FjaGUuTWV0YWRhdGESKwoFZGlhZ3MYAyADKAsyHC5pbmZyYWNvc3QucGFyc2VyLkRpYWdub3N0aWMSFQoNaXNfdGVycmFncnVudBgGIAEoCBIfChd0ZXJyYWZvcm1fbW9kdWxlX3N1ZmZpeBgHIAEoCRIlCgV1c2FnZRgJIAEoCzIWLmluZnJhY29zdC51c2FnZS5Vc2FnZRIUCgxw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hY2hlYgZwcm90bzM", [file_google_protobuf_timestamp, file_infracost_parser_cloudformation_result, file_infracost_parser_diagnostic, file_infracost_parser_terraform_module, file_infracost_tree_tree, file_infracost_usage_usage]); /** * @generated from message infracost.parser.cache.TerraformProject @@ -141,7 +141,9 @@ export const DependencyPathsSchema: GenMessage = /*@__PURE__*/ messageDesc(file_infracost_parser_cache_cache, 2); /** - * BranchSummary is a summary of the cache for a branch. For a given branch, it contains a map of SHA to breakdown ID. + * BranchSummary caches per-project data for a branch so that a later run of the same branch, or a + * pull request opened against it, can look each project up by name to reuse its breakdown ID, detect + * whether it changed via its stored hash, and recover its dependency paths without re-parsing. * * @generated from message infracost.parser.cache.BranchSummary */ @@ -152,24 +154,41 @@ export type BranchSummary = Message<"infracost.parser.cache.BranchSummary"> & { branch: string; /** - * @generated from field: map sha_to_id_map = 2; + * Deprecated: superseded by the projects field below. New code must not write these; they remain + * only so that summaries written by older code can still be read. When projects is empty (an old + * summary), reconstruct it by joining these maps on their shared SHA key - sha_to_project_name_map + * gives each SHA its project name, and the others supply that project's id, flavor, and deps. + * + * @generated from field: map sha_to_id_map = 2 [deprecated = true]; + * @deprecated */ shaToIdMap: { [key: string]: string }; /** - * @generated from field: map sha_to_project_name_map = 3; + * @generated from field: map sha_to_project_name_map = 3 [deprecated = true]; + * @deprecated */ shaToProjectNameMap: { [key: string]: string }; /** - * @generated from field: map sha_to_flavor_map = 4; + * @generated from field: map sha_to_flavor_map = 4 [deprecated = true]; + * @deprecated */ shaToFlavorMap: { [key: string]: Flavor }; /** - * @generated from field: map sha_to_dependency_paths_map = 5; + * @generated from field: map sha_to_dependency_paths_map = 5 [deprecated = true]; + * @deprecated */ shaToDependencyPathsMap: { [key: string]: DependencyPaths }; + + /** + * Projects holds the summarised data for each project discovered in this branch, keyed by project + * name (which is unique within a branch). + * + * @generated from field: map projects = 6; + */ + projects: { [key: string]: ProjectSummary }; }; /** @@ -179,6 +198,51 @@ export type BranchSummary = Message<"infracost.parser.cache.BranchSummary"> & { export const BranchSummarySchema: GenMessage = /*@__PURE__*/ messageDesc(file_infracost_parser_cache_cache, 3); +/** + * ProjectSummary is the cached per-project data recorded for one project on the run that produced the + * enclosing BranchSummary. + * + * @generated from message infracost.parser.cache.ProjectSummary + */ +export type ProjectSummary = Message<"infracost.parser.cache.ProjectSummary"> & { + /** + * Breakdown ID assigned by the dashboard, reused across runs while the project is unchanged. + * + * @generated from field: string breakdown_id = 1; + */ + breakdownId: string; + + /** + * The project's BreakdownSHA from that run - the content hash used as the parse-cache key. A later + * run compares its freshly computed hash against this to decide whether the project changed. + * + * @generated from field: string breakdown_hash = 2; + */ + breakdownHash: string; + + /** + * The project's flavor (Terraform, CloudFormation, or agnostic). + * + * @generated from field: infracost.parser.cache.Flavor flavor = 3; + */ + flavor: Flavor; + + /** + * The files this project depended on during its last parse, including files outside the project + * directory. Used to decide whether changed files are relevant and to invalidate caches. + * + * @generated from field: infracost.parser.cache.DependencyPaths dependency_paths = 4; + */ + dependencyPaths?: DependencyPaths; +}; + +/** + * Describes the message infracost.parser.cache.ProjectSummary. + * Use `create(ProjectSummarySchema)` to create a new message. + */ +export const ProjectSummarySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_infracost_parser_cache_cache, 4); + /** * @generated from message infracost.parser.cache.EncryptionEnvelope */ @@ -206,7 +270,7 @@ export type EncryptionEnvelope = Message<"infracost.parser.cache.EncryptionEnvel * Use `create(EncryptionEnvelopeSchema)` to create a new message. */ export const EncryptionEnvelopeSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_infracost_parser_cache_cache, 4); + messageDesc(file_infracost_parser_cache_cache, 5); /** * @generated from message infracost.parser.cache.CloudFormationProject @@ -253,7 +317,7 @@ export type CloudFormationProject = Message<"infracost.parser.cache.CloudFormati * Use `create(CloudFormationProjectSchema)` to create a new message. */ export const CloudFormationProjectSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_infracost_parser_cache_cache, 5); + messageDesc(file_infracost_parser_cache_cache, 6); /** * @generated from message infracost.parser.cache.TreeProject @@ -305,7 +369,7 @@ export type TreeProject = Message<"infracost.parser.cache.TreeProject"> & { * Use `create(TreeProjectSchema)` to create a new message. */ export const TreeProjectSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_infracost_parser_cache_cache, 6); + messageDesc(file_infracost_parser_cache_cache, 7); /** * @generated from enum infracost.parser.cache.Flavor diff --git a/package-lock.json b/package-lock.json index 1eaec1e..2185e7f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@infracost/proto", - "version": "1.158.0", + "version": "1.158.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@infracost/proto", - "version": "1.158.0", + "version": "1.158.1", "license": "Apache-2.0", "dependencies": { "@bufbuild/protobuf": "^2.10.1" diff --git a/proto/infracost/parser/cache/cache.proto b/proto/infracost/parser/cache/cache.proto index 03282e7..87e048f 100644 --- a/proto/infracost/parser/cache/cache.proto +++ b/proto/infracost/parser/cache/cache.proto @@ -47,13 +47,42 @@ message DependencyPaths { repeated string paths = 1; } -// BranchSummary is a summary of the cache for a branch. For a given branch, it contains a map of SHA to breakdown ID. +// BranchSummary caches per-project data for a branch so that a later run of the same branch, or a +// pull request opened against it, can look each project up by name to reuse its breakdown ID, detect +// whether it changed via its stored hash, and recover its dependency paths without re-parsing. message BranchSummary { string branch = 1; - map sha_to_id_map = 2; - map sha_to_project_name_map = 3; - map sha_to_flavor_map = 4; - map sha_to_dependency_paths_map = 5; + + // Deprecated: superseded by the projects field below. New code must not write these; they remain + // only so that summaries written by older code can still be read. When projects is empty (an old + // summary), reconstruct it by joining these maps on their shared SHA key - sha_to_project_name_map + // gives each SHA its project name, and the others supply that project's id, flavor, and deps. + map sha_to_id_map = 2 [deprecated = true]; + map sha_to_project_name_map = 3 [deprecated = true]; + map sha_to_flavor_map = 4 [deprecated = true]; + map sha_to_dependency_paths_map = 5 [deprecated = true]; + + // Projects holds the summarised data for each project discovered in this branch, keyed by project + // name (which is unique within a branch). + map projects = 6; +} + +// ProjectSummary is the cached per-project data recorded for one project on the run that produced the +// enclosing BranchSummary. +message ProjectSummary { + // Breakdown ID assigned by the dashboard, reused across runs while the project is unchanged. + string breakdown_id = 1; + + // The project's BreakdownSHA from that run - the content hash used as the parse-cache key. A later + // run compares its freshly computed hash against this to decide whether the project changed. + string breakdown_hash = 2; + + // The project's flavor (Terraform, CloudFormation, or agnostic). + Flavor flavor = 3; + + // The files this project depended on during its last parse, including files outside the project + // directory. Used to decide whether changed files are relevant and to invalidate caches. + DependencyPaths dependency_paths = 4; } message EncryptionEnvelope {