From 738bb41a3e5002d037d4ef91f71a7d0c7d3893c3 Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Mon, 5 Feb 2024 09:29:50 -0800 Subject: [PATCH 1/3] chore: Clarify resolution detail reason. (#239) Signed-off-by: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Co-authored-by: Michael Beemer --- specification/types.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/specification/types.md b/specification/types.md index 054f8d30..e69f283d 100644 --- a/specification/types.md +++ b/specification/types.md @@ -72,6 +72,28 @@ A set of pre-defined reasons is enumerated below: | STALE | The resolved value is non-authoritative or possibly out of date | | ERROR | The resolved value was the result of an error. | +> [!NOTE] +> The `reason` should not be limited to the reasons enumerated above. It can be any of the pre-defined reasons, or +> any string value. Some type systems have features which can increase the ergonomics of `reason`, for instance a union +> of pre-defined types with a string, or a rust-style enumeration which allows for enumerated values to have associated +> content. + +```rust +enum Reason { + Static, + Default, + TargetingMatch, + Split, + Cached, + Unknown, + Stale, + Error, + Other(String) +} + +let myReason = Reason::Other("my-reason".to_string()); +``` + > [!NOTE] > The `resolution details` structure is not exposed to the Application Author. > It defines the data which Provider Authors must return when resolving the value of flags. From ffd555254ad12a26d69514790ba6be7472b3d50b Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Tue, 6 Feb 2024 15:20:24 -0500 Subject: [PATCH 2/3] fix: language-neutral verbiage for set-and-wait (#242) Signed-off-by: Todd Baert --- specification.json | 2 +- specification/sections/01-flag-evaluation.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/specification.json b/specification.json index fcb882e7..14e4cf6d 100644 --- a/specification.json +++ b/specification.json @@ -31,7 +31,7 @@ { "id": "Requirement 1.1.2.4", "machine_id": "requirement_1_1_2_4", - "content": "The `API` SHOULD provide functions to set a provider and wait for the `initialize` function to return or throw.", + "content": "The `API` SHOULD provide functions to set a provider and wait for the `initialize` function to complete or abnormally terminate.", "RFC 2119 keyword": "SHOULD", "children": [] }, diff --git a/specification/sections/01-flag-evaluation.md b/specification/sections/01-flag-evaluation.md index b1b47c3e..25e147c3 100644 --- a/specification/sections/01-flag-evaluation.md +++ b/specification/sections/01-flag-evaluation.md @@ -57,7 +57,7 @@ see [shutdown](./02-providers.md#25-shutdown), [setting a provider](#setting-a-p #### Requirement 1.1.2.4 -> The `API` **SHOULD** provide functions to set a provider and wait for the `initialize` function to return or throw. +> The `API` **SHOULD** provide functions to set a provider and wait for the `initialize` function to complete or abnormally terminate. This function not only sets the provider, but ensures that the provider is ready (or in error) before returning or settling. @@ -74,6 +74,7 @@ Client client = OpenFeatureAPI.getInstance().getClient('domain-1'); ``` Though it's possible to use [events](./05-events.md) to await provider readiness, such functions can make things simpler for `application authors` and `integrators`. +Implementations indicate an error in a manner idiomatic to the language in use (returning an error, throwing an exception, etc). #### Requirement 1.1.3 From dc29976ef1aaa921fe62f64fd3fd13809c25ce7a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 7 Feb 2024 12:25:20 +0000 Subject: [PATCH 3/3] chore(deps): update dependency prettier to v3.2.5 (#243) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7ada736f..4dcc54a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1252,9 +1252,9 @@ } }, "node_modules/prettier": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.4.tgz", - "integrity": "sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -2693,9 +2693,9 @@ } }, "prettier": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.4.tgz", - "integrity": "sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true }, "process-nextick-args": {