Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

always return file policy for same id #625

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions policy/file/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"context"
"crypto/md5"
"fmt"
"reflect"
"sync"

hclog "github.com/hashicorp/go-hclog"
Expand Down Expand Up @@ -212,16 +211,6 @@ func (s *Source) handleIndividualPolicyRead(ID policy.PolicyID, path, name strin
s.policyProcessor.CanonicalizeCheck(c, newPolicy.Target)
}

val, ok := s.policyMap[ID]
if !ok || val.policy == nil {
return newPolicy, nil
}

// Check the new policy against the stored. If they are the same, and
// therefore the policy has not changed indicate that to the caller.
if reflect.DeepEqual(newPolicy, val.policy) {
return nil, nil
}
return newPolicy, nil
}

Expand Down