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

fix: minor corrections around FATAL state #247

Merged
merged 1 commit into from
Feb 22, 2024
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
2 changes: 1 addition & 1 deletion specification.json
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@
{
"id": "Requirement 1.7.7",
"machine_id": "requirement_1_7_7",
"content": "The client MUST default, run error hooks, and indicate an error if flag resolution is attempted while the provider is in `PROVIDER_FATAL`.",
"content": "The client MUST default, run error hooks, and indicate an error if flag resolution is attempted while the provider is in `FATAL`.",
"RFC 2119 keyword": "MUST",
"children": []
},
Expand Down
2 changes: 1 addition & 1 deletion specification/sections/01-flag-evaluation.md
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ see: [error codes](../types.md#error-code), [flag value resolution](./02-provide

#### Requirement 1.7.7

> The client **MUST** default, run error hooks, and indicate an error if flag resolution is attempted while the provider is in `PROVIDER_FATAL`.
> The client **MUST** default, run error hooks, and indicate an error if flag resolution is attempted while the provider is in `FATAL`.
toddbaert marked this conversation as resolved.
Show resolved Hide resolved

The client defaults and returns the `PROVIDER_FATAL` `error code` if evaluation is attempted after the provider has transitioned to an irrecoverable error state.
The SDK avoids calling the provider's resolver functions entirely ("short-circuits") if the provider is in this state.
Expand Down
6 changes: 4 additions & 2 deletions specification/sections/05-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,11 @@ The SDK must update it's internal representation of the provider's state accordi
| -------------------------------- | ------------------------------------------------------- |
| `PROVIDER_READY` | `READY` |
| `PROVIDER_STALE` | `STALE` |
| `PROVIDER_ERROR` | `ERROR` |
| `PROVIDER_ERROR` | `ERROR`/`FATAL`* |
| `PROVIDER_CONFIGURATION_CHANGED` | N/A (provider remains in its current state) |
| `PROVIDER_CONTEXT_CHANGED` | N/A (only emitted by SDK during context reconciliation) |
| `PROVIDER_RECONCILING` | N/A (only emitted by SDK during context reconciliation) |

see: [provider lifecycle management](01-flag-evaluation.md#17-provider-lifecycle-management)
\* If the `error code` associated with the error indicates `PROVIDER_FATAL`, the state is set to `FATAL`

see: [provider lifecycle management](01-flag-evaluation.md#17-provider-lifecycle-management), [provider status](../types.md#provider-status) [error codes](../types.md#error-code)
1 change: 1 addition & 0 deletions specification/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ An enumeration of possible provider states.
| READY | The provider has been initialized, and is able to reliably resolve flag values. |
| ERROR | The provider is initialized but is not able to reliably resolve flag values. |
| STALE | The provider's cached state is no longer valid and may not be up-to-date with the source of truth. |
| FATAL | The provider has entered an irrecoverable error state. |
toddbaert marked this conversation as resolved.
Show resolved Hide resolved
| RECONCILING* | The provider is reconciling its state with a context change. |

\* [static context (client-side) paradigm](./glossary.md#static-context-paradigm) only
Expand Down
Loading