Skip to content

Commit

Permalink
fix: count children towards frameworks
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahanmmi committed Jan 22, 2025
1 parent 119b45b commit 28f6cac
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions jobs/post-install-job/job/migrations/compliance/git_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -563,9 +563,11 @@ func (g *GitParser) HandleBenchmarks(benchmarks []Benchmark) error {
}
}
for _, childID := range benchmark.Children {
for _, child := range benchmarks {
if child.ID == childID {
childrenDfs(child)
if !seenMap[childID] {
for _, child := range benchmarks {
if child.ID == childID {
childrenDfs(child)
}
}
}
for it, _ := range benchmarkIntegrationTypes[childID] {
Expand All @@ -576,6 +578,7 @@ func (g *GitParser) HandleBenchmarks(benchmarks []Benchmark) error {

children := map[string][]string{}
for _, o := range benchmarks {
childrenDfs(o)
tags := make([]db.BenchmarkTag, 0, len(o.Tags))
for tagKey, tagValue := range o.Tags {
tags = append(tags, db.BenchmarkTag{
Expand Down Expand Up @@ -683,6 +686,7 @@ func (g *GitParser) HandleFrameworks(frameworks []Framework) error {
}

for _, f := range frameworks {
childrenDfs(f)
err := g.HandleSingleFramework(benchmarkIntegrationTypes, f)
if err != nil {
return err
Expand Down

0 comments on commit 28f6cac

Please sign in to comment.