api.shutdown() currently just calls provider_registry.shutdown(), which shuts down the providers but doesn't even reset them back to no-op. Hooks, event handlers, evaluation context, transaction context propagators, and provider references are all left in place.
clear_providers() does a bit more (resets providers to no-op, clears event handlers), but it also doesn't touch hooks, evaluation context, or transaction context propagators.
Most other SDKs do a full reset on shutdown: shut down providers, reset to no-op, clear hooks, clear event handlers, clear evaluation context, and reset transaction context propagators. We should do the same.
Spec 1.6.2 says the API's shutdown MUST reset all state (see open-feature/spec#375 for a pending clarification to explicitly list evaluation context and transaction context propagators).
Related to 1.0 readiness: #522
api.shutdown()currently just callsprovider_registry.shutdown(), which shuts down the providers but doesn't even reset them back to no-op. Hooks, event handlers, evaluation context, transaction context propagators, and provider references are all left in place.clear_providers()does a bit more (resets providers to no-op, clears event handlers), but it also doesn't touch hooks, evaluation context, or transaction context propagators.Most other SDKs do a full reset on shutdown: shut down providers, reset to no-op, clear hooks, clear event handlers, clear evaluation context, and reset transaction context propagators. We should do the same.
Spec 1.6.2 says the API's shutdown MUST reset all state (see open-feature/spec#375 for a pending clarification to explicitly list evaluation context and transaction context propagators).
Related to 1.0 readiness: #522