Skip to content

Commit

Permalink
temporily disable bundleplugin unregister to check premature unregist…
Browse files Browse the repository at this point in the history
…ering

Signed-off-by: Pushpalanka Jayawardhana <[email protected]>
  • Loading branch information
Pushpalanka committed Oct 17, 2024
1 parent 23df108 commit ab6be1c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion filters/openpolicyagent/openpolicyagent.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,12 +504,15 @@ func (opa *OpenPolicyAgentInstance) Start(ctx context.Context, timeout time.Dura
if _, exists := status["bundle"]; exists {
bundlePlugin := bundle.Lookup(opa.manager)
if bundlePlugin != nil {
print("Registering bundle exists\n")
opa.registerBundleListenerOnce.Do(func() {
print("Registering bundle listener\n")
bundlePlugin.Register("skipper-instance-startup-bundle", func(status bundle.Status) {
print("Handling bundle status\n")
handleStatusErrors(status, failed, "bundle plugin")
})
})
defer bundlePlugin.Unregister("skipper-instance-startup-bundle")
//defer bundlePlugin.Unregister("skipper-instance-startup-bundle")
}
}
})
Expand Down

0 comments on commit ab6be1c

Please sign in to comment.