Skip to content

shutdown() doesn't fully reset state #585

@toddbaert

Description

@toddbaert

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    1.0-releaseRequired for a 1.0 release

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions