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

feat: NOT_READY after provider shutdown #216

Merged
merged 7 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions specification.json
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,13 @@
"RFC 2119 keyword": "MAY",
"children": []
},
{
"id": "Requirement 2.5.2",
"machine_id": "requirement_2_5_2",
"content": "After a provider's shutdown function has terminated successfully, the provider's state MUST revert to its uninitialized state.",
"RFC 2119 keyword": "MUST",
"children": []
},
{
"id": "Requirement 2.6.1",
"machine_id": "requirement_2_6_1",
Expand Down
14 changes: 13 additions & 1 deletion specification/sections/02-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,15 @@ title: Provider State
stateDiagram-v2
direction LR
[*] --> NOT_READY
NOT_READY --> READY
NOT_READY --> READY:initialize
READY --> ERROR
ERROR --> READY
READY --> STALE
STALE --> READY
STALE --> ERROR
READY --> NOT_READY:shutdown
STALE --> NOT_READY:shutdown
ERROR --> NOT_READY:shutdown
beeme1mr marked this conversation as resolved.
Show resolved Hide resolved
```

see [provider status](../types.md#provider-status)
Expand Down Expand Up @@ -250,6 +253,15 @@ class MyProvider implements Provider, AutoDisposable {
}
```

#### Requirement 2.5.2

> After a provider's shutdown function has terminated successfully, the provider's state **MUST** revert to its uninitialized state.
toddbaert marked this conversation as resolved.
Show resolved Hide resolved

If a provider requires initialization, once it's shut down, it must transition to its initial `NOT_READY` state. Some providers may allow reinitialization from this state.
Providers not requiring initialization are assumed to be ready at all times.

see: [initialization](#24-initialization)

### 2.6. Provider context reconciliation

[![experimental](https://img.shields.io/static/v1?label=Status&message=experimental&color=orange)](https://github.com/open-feature/spec/tree/main/specification#experimental)
Expand Down
Loading