Skip to content

Commit

Permalink
🧹 Don't unnecessarily recalculate framework dep checksums
Browse files Browse the repository at this point in the history
This causes us to load frameworks to calculate checksums we already
have. If checksums need to be recalculated, they get cleared first
  • Loading branch information
jaym committed Jul 26, 2023
1 parent 9f15ecf commit 41a5464
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions policy/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,10 @@ func (f *Framework) updateGraphChecksums(
depObj.FrameworkMaps = frameworkMaps
}

if err := depObj.UpdateChecksums(ctx, getFramework, getFrameworkMaps, bundle); err != nil {
return err
if depObj.LocalExecutionChecksum == "" || depObj.LocalContentChecksum == "" || depObj.GraphExecutionChecksum == "" || depObj.GraphContentChecksum == "" {
if err := depObj.UpdateChecksums(ctx, getFramework, getFrameworkMaps, bundle); err != nil {
return err
}
}

graphExecutionChecksum = graphExecutionChecksum.
Expand Down

0 comments on commit 41a5464

Please sign in to comment.