Skip to content

Commit

Permalink
Service to service and efs fixes (#963)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhsinger-klotho authored Mar 14, 2024
1 parent 66a93e4 commit 1dbc50c
Show file tree
Hide file tree
Showing 40 changed files with 637 additions and 250 deletions.
18 changes: 9 additions & 9 deletions pkg/engine/operational_eval/dependency_capture_mock_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 5 additions & 9 deletions pkg/engine/operational_eval/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,10 @@ func (eval *Evaluator) resourceVertices(
var errs error
addProp := func(prop knowledgebase.Property) error {
vertex := &propertyVertex{
Ref: construct.PropertyRef{Resource: res.ID, Property: prop.Details().Path},
Template: prop,
EdgeRules: make(map[construct.SimpleEdge][]knowledgebase.OperationalRule),
Ref: construct.PropertyRef{Resource: res.ID, Property: prop.Details().Path},
Template: prop,
EdgeRules: make(map[construct.SimpleEdge][]knowledgebase.OperationalRule),
TransformRules: make(map[construct.SimpleEdge]*set.HashedSet[string, knowledgebase.OperationalRule]),
}

errs = errors.Join(errs, changes.AddVertexAndDeps(eval, vertex))
Expand All @@ -157,15 +158,10 @@ func (eval *Evaluator) resourceVertices(
errs = errors.Join(errs, tmpl.LoopProperties(res, addProp))

for _, rule := range tmpl.AdditionalRules {
hash, err := rule.Hash()
if err != nil {
errs = errors.Join(errs, fmt.Errorf("could not hash rule for resource id %s: %w", res.ID, err))
continue
}
vertex := &resourceRuleVertex{
Resource: res.ID,
Rule: rule,
hash: hash,
hash: rule.Hash(),
}
errs = errors.Join(errs, changes.AddVertexAndDeps(eval, vertex))
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/engine/operational_eval/graph_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ func TestEvaluator_resourceVertices(t *testing.T) {
Path: "prop1",
},
},
EdgeRules: map[construct.SimpleEdge][]knowledgebase.OperationalRule{},
EdgeRules: map[construct.SimpleEdge][]knowledgebase.OperationalRule{},
TransformRules: map[construct.SimpleEdge]*set.HashedSet[string, knowledgebase.OperationalRule]{},
},
},
edges: map[Key]set.Set[Key]{},
Expand Down
15 changes: 8 additions & 7 deletions pkg/engine/operational_eval/operational_rule_mock_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions pkg/engine/operational_eval/resource_configurer_mock_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 28 additions & 28 deletions pkg/engine/operational_eval/template_kb_mock_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1dbc50c

Please sign in to comment.