Skip to content

Commit

Permalink
Remove DoesNotMatter
Browse files Browse the repository at this point in the history
  • Loading branch information
kwapik committed Oct 20, 2023
1 parent 04dd666 commit 1d916d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/policies/controlplane/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ func newPolicyOptions(wrapperMessage *policysyncv1.PolicyWrapper, registry statu
}

// CompilePolicy takes policyMessage and returns a compiled policy. This is a helper method for standalone consumption of policy compiler.
func CompilePolicy(policyMessage *policylangv1.Policy, registry status.Registry) (*circuitfactory.Circuit, error) {
wrapperMessage, err := hashAndPolicyWrap(policyMessage, "DoesNotMatter")
func CompilePolicy(policyMessage *policylangv1.Policy, policyName string, registry status.Registry) (*circuitfactory.Circuit, error) {
wrapperMessage, err := hashAndPolicyWrap(policyMessage, policyName)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/policies/controlplane/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func ValidateAndCompileYAML(ctx context.Context, name string, yamlSrc []byte) (*
func ValidateAndCompileProto(ctx context.Context, name string, policy *policylangv1.Policy) (*circuitfactory.Circuit, *policylangv1.Policy, error) {
alerter := alerts.NewSimpleAlerter(100)
registry := status.NewRegistry(log.GetGlobalLogger(), alerter)
circuit, err := CompilePolicy(policy, registry)
circuit, err := CompilePolicy(policy, name, registry)
if err != nil {
return nil, nil, err
}
Expand Down

0 comments on commit 1d916d7

Please sign in to comment.