-
Notifications
You must be signed in to change notification settings - Fork 33
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: add evaluation details to finally hook #1087
Conversation
Signed-off-by: Michael Beemer <[email protected]>
Signed-off-by: Michael Beemer <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks good to me!
I am with @toddbaert regarding the IIFEs, and I could live with duplicated lines or mutations.
Signed-off-by: Michael Beemer <[email protected]>
Signed-off-by: Michael Beemer <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, looks good @beeme1mr :)
🤖 I have created a release *beep* *boop* --- ## [1.6.0](core-v1.5.0...core-v1.6.0) (2024-12-12) ### ⚠ BREAKING CHANGES The signature of the `finally` hook stage has been changed. The signature now includes the `evaluation details`, as per the [OpenFeature specification](https://openfeature.dev/specification/sections/hooks#requirement-438). Note that since hooks are still `experimental,` this does not constitute a change requiring a new major version. To migrate, update any hook that implements the `finally` stage to accept `evaluation details` as the second argument. * add evaluation details to finally hook ([#1087](#1087)) ([2135254](2135254)) ### ✨ New Features * add evaluation details to finally hook ([#1087](#1087)) ([2135254](2135254)) ### 🔄 Refactoring * improve track interface for providers ([#1100](#1100)) ([5e5b160](5e5b160)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: OpenFeature Bot <[email protected]> Signed-off-by: Michael Beemer <[email protected]> Co-authored-by: Michael Beemer <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [1.4.0](web-sdk-v1.3.2...web-sdk-v1.4.0) (2024-12-18) ### ⚠ BREAKING CHANGES The signature of the `finally` hook stage has been changed. The signature now includes the `evaluation details`, as per the [OpenFeature specification](https://openfeature.dev/specification/sections/hooks#requirement-438). Note that since hooks are still `experimental,` this does not constitute a change requiring a new major version. To migrate, update any hook that implements the `finally` stage to accept `evaluation details` as the second argument. * add evaluation details to finally hook ([#1087](#1087)) ([2135254](2135254)) ### ✨ New Features * add evaluation details to finally hook ([#1087](#1087)) ([2135254](2135254)) ### 📚 Documentation * fix comment in README for Hook’s after method ([#1102](#1102)) ([ba8d1ae](ba8d1ae)) ### 🔄 Refactoring * improve track interface for providers ([#1100](#1100)) ([5e5b160](5e5b160)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: OpenFeature Bot <[email protected]> Signed-off-by: Michael Beemer <[email protected]> Co-authored-by: Michael Beemer <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [1.17.0](server-sdk-v1.16.2...server-sdk-v1.17.0) (2024-12-18) ### ⚠ BREAKING CHANGES The signature of the `finally` hook stage has been changed. The signature now includes the `evaluation details`, as per the [OpenFeature specification](https://openfeature.dev/specification/sections/hooks#requirement-438). Note that since hooks are still `experimental,` this does not constitute a change requiring a new major version. To migrate, update any hook that implements the `finally` stage to accept `evaluation details` as the second argument. * add evaluation details to finally hook ([#1087](#1087)) ([2135254](2135254)) ### ✨ New Features * add evaluation details to finally hook ([#1087](#1087)) ([2135254](2135254)) ### 📚 Documentation * fix comment in README for Hook’s after method ([#1103](#1103)) ([e335615](e335615)) ### 🔄 Refactoring * improve track interface for providers ([#1100](#1100)) ([5e5b160](5e5b160)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: OpenFeature Bot <[email protected]> Signed-off-by: Michael Beemer <[email protected]> Co-authored-by: Michael Beemer <[email protected]>
## This PR - adds evaluation details to the `finally` stage in hooks. ### Notes This breaks the signature of the `finally` stages based on [this spec enhancement](open-feature/spec#280). It is **not** considered a breaking change to the SDK because hooks are marked as experimental in the spec, and the change has no impact on known hooks. The noteworthy change to the interface is: ```diff - finally?(hookContext: Readonly<HookContext<T>>, hookHints?: HookHints): HooksReturn; + finally?(hookContext: Readonly<HookContext<T>>, evaluationDetails: EvaluationDetails<T>, hookHints?: HookHints): HooksReturn; ``` ### Follow-up Tasks - Update the JS contribs repo --------- Signed-off-by: Michael Beemer <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [1.6.0](open-feature/js-sdk@core-v1.5.0...core-v1.6.0) (2024-12-12) ### ⚠ BREAKING CHANGES The signature of the `finally` hook stage has been changed. The signature now includes the `evaluation details`, as per the [OpenFeature specification](https://openfeature.dev/specification/sections/hooks#requirement-438). Note that since hooks are still `experimental,` this does not constitute a change requiring a new major version. To migrate, update any hook that implements the `finally` stage to accept `evaluation details` as the second argument. * add evaluation details to finally hook ([open-feature#1087](open-feature#1087)) ([2135254](open-feature@2135254)) ### ✨ New Features * add evaluation details to finally hook ([open-feature#1087](open-feature#1087)) ([2135254](open-feature@2135254)) ### 🔄 Refactoring * improve track interface for providers ([open-feature#1100](open-feature#1100)) ([5e5b160](open-feature@5e5b160)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: OpenFeature Bot <[email protected]> Signed-off-by: Michael Beemer <[email protected]> Co-authored-by: Michael Beemer <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [1.4.0](open-feature/js-sdk@web-sdk-v1.3.2...web-sdk-v1.4.0) (2024-12-18) ### ⚠ BREAKING CHANGES The signature of the `finally` hook stage has been changed. The signature now includes the `evaluation details`, as per the [OpenFeature specification](https://openfeature.dev/specification/sections/hooks#requirement-438). Note that since hooks are still `experimental,` this does not constitute a change requiring a new major version. To migrate, update any hook that implements the `finally` stage to accept `evaluation details` as the second argument. * add evaluation details to finally hook ([open-feature#1087](open-feature#1087)) ([2135254](open-feature@2135254)) ### ✨ New Features * add evaluation details to finally hook ([open-feature#1087](open-feature#1087)) ([2135254](open-feature@2135254)) ### 📚 Documentation * fix comment in README for Hook’s after method ([open-feature#1102](open-feature#1102)) ([ba8d1ae](open-feature@ba8d1ae)) ### 🔄 Refactoring * improve track interface for providers ([open-feature#1100](open-feature#1100)) ([5e5b160](open-feature@5e5b160)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: OpenFeature Bot <[email protected]> Signed-off-by: Michael Beemer <[email protected]> Co-authored-by: Michael Beemer <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [1.17.0](open-feature/js-sdk@server-sdk-v1.16.2...server-sdk-v1.17.0) (2024-12-18) ### ⚠ BREAKING CHANGES The signature of the `finally` hook stage has been changed. The signature now includes the `evaluation details`, as per the [OpenFeature specification](https://openfeature.dev/specification/sections/hooks#requirement-438). Note that since hooks are still `experimental,` this does not constitute a change requiring a new major version. To migrate, update any hook that implements the `finally` stage to accept `evaluation details` as the second argument. * add evaluation details to finally hook ([open-feature#1087](open-feature#1087)) ([2135254](open-feature@2135254)) ### ✨ New Features * add evaluation details to finally hook ([open-feature#1087](open-feature#1087)) ([2135254](open-feature@2135254)) ### 📚 Documentation * fix comment in README for Hook’s after method ([open-feature#1103](open-feature#1103)) ([e335615](open-feature@e335615)) ### 🔄 Refactoring * improve track interface for providers ([open-feature#1100](open-feature#1100)) ([5e5b160](open-feature@5e5b160)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: OpenFeature Bot <[email protected]> Signed-off-by: Michael Beemer <[email protected]> Co-authored-by: Michael Beemer <[email protected]>
## This PR - adds evaluation details to the `finally` stage in hooks. ### Notes This breaks the signature of the `finally` stages based on [this spec enhancement](open-feature/spec#280). It is **not** considered a breaking change to the SDK because hooks are marked as experimental in the spec, and the change has no impact on known hooks. The noteworthy change to the interface is: ```diff - finally?(hookContext: Readonly<HookContext<T>>, hookHints?: HookHints): HooksReturn; + finally?(hookContext: Readonly<HookContext<T>>, evaluationDetails: EvaluationDetails<T>, hookHints?: HookHints): HooksReturn; ``` ### Follow-up Tasks - Update the JS contribs repo --------- Signed-off-by: Michael Beemer <[email protected]> Signed-off-by: Will Chou <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [1.6.0](open-feature/js-sdk@core-v1.5.0...core-v1.6.0) (2024-12-12) ### ⚠ BREAKING CHANGES The signature of the `finally` hook stage has been changed. The signature now includes the `evaluation details`, as per the [OpenFeature specification](https://openfeature.dev/specification/sections/hooks#requirement-438). Note that since hooks are still `experimental,` this does not constitute a change requiring a new major version. To migrate, update any hook that implements the `finally` stage to accept `evaluation details` as the second argument. * add evaluation details to finally hook ([open-feature#1087](open-feature#1087)) ([2135254](open-feature@2135254)) ### ✨ New Features * add evaluation details to finally hook ([open-feature#1087](open-feature#1087)) ([2135254](open-feature@2135254)) ### 🔄 Refactoring * improve track interface for providers ([open-feature#1100](open-feature#1100)) ([5e5b160](open-feature@5e5b160)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: OpenFeature Bot <[email protected]> Signed-off-by: Michael Beemer <[email protected]> Co-authored-by: Michael Beemer <[email protected]> Signed-off-by: Will Chou <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [1.4.0](open-feature/js-sdk@web-sdk-v1.3.2...web-sdk-v1.4.0) (2024-12-18) ### ⚠ BREAKING CHANGES The signature of the `finally` hook stage has been changed. The signature now includes the `evaluation details`, as per the [OpenFeature specification](https://openfeature.dev/specification/sections/hooks#requirement-438). Note that since hooks are still `experimental,` this does not constitute a change requiring a new major version. To migrate, update any hook that implements the `finally` stage to accept `evaluation details` as the second argument. * add evaluation details to finally hook ([open-feature#1087](open-feature#1087)) ([2135254](open-feature@2135254)) ### ✨ New Features * add evaluation details to finally hook ([open-feature#1087](open-feature#1087)) ([2135254](open-feature@2135254)) ### 📚 Documentation * fix comment in README for Hook’s after method ([open-feature#1102](open-feature#1102)) ([ba8d1ae](open-feature@ba8d1ae)) ### 🔄 Refactoring * improve track interface for providers ([open-feature#1100](open-feature#1100)) ([5e5b160](open-feature@5e5b160)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: OpenFeature Bot <[email protected]> Signed-off-by: Michael Beemer <[email protected]> Co-authored-by: Michael Beemer <[email protected]> Signed-off-by: Will Chou <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [1.17.0](open-feature/js-sdk@server-sdk-v1.16.2...server-sdk-v1.17.0) (2024-12-18) ### ⚠ BREAKING CHANGES The signature of the `finally` hook stage has been changed. The signature now includes the `evaluation details`, as per the [OpenFeature specification](https://openfeature.dev/specification/sections/hooks#requirement-438). Note that since hooks are still `experimental,` this does not constitute a change requiring a new major version. To migrate, update any hook that implements the `finally` stage to accept `evaluation details` as the second argument. * add evaluation details to finally hook ([open-feature#1087](open-feature#1087)) ([2135254](open-feature@2135254)) ### ✨ New Features * add evaluation details to finally hook ([open-feature#1087](open-feature#1087)) ([2135254](open-feature@2135254)) ### 📚 Documentation * fix comment in README for Hook’s after method ([open-feature#1103](open-feature#1103)) ([e335615](open-feature@e335615)) ### 🔄 Refactoring * improve track interface for providers ([open-feature#1100](open-feature#1100)) ([5e5b160](open-feature@5e5b160)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: OpenFeature Bot <[email protected]> Signed-off-by: Michael Beemer <[email protected]> Co-authored-by: Michael Beemer <[email protected]> Signed-off-by: Will Chou <[email protected]>
This PR
finally
stage in hooks.Notes
This breaks the signature of the
finally
stages based on this spec enhancement. It is not considered a breaking change to the SDK because hooks are marked as experimental in the spec, and the change has no impact on known hooks.The noteworthy change to the interface is:
Follow-up Tasks