mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-13 03:42:35 -06:00
883dc8817f
With this change, the manager will respect the shutdown period if it was supplied, otherwise it will use the passed context. This way, SDK users can rely on the context (because the SDK doesn't set the graceful shutdown period), but other callers are unaffected. The added test is in the SDK, because that's where the problem had manifested (#3980): when calling Stop(ctx) through the SDK, the plugins.Manager's Stop function had set a smaller timeout (0, due to the structs default value that hadn't been set to anything else), and that would effectively leave the plugins zero time to cleanup. Fixes #3980. Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>