feat: add evaluation details to finally hook#1087
Merged
Conversation
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
toddbaert
reviewed
Dec 10, 2024
lukas-reining
approved these changes
Dec 11, 2024
Member
lukas-reining
left a comment
There was a problem hiding this comment.
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 <beeme1mr@users.noreply.github.com>
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
toddbaert
approved these changes
Dec 11, 2024
lukas-reining
approved these changes
Dec 11, 2024
Member
lukas-reining
left a comment
There was a problem hiding this comment.
Yes, looks good @beeme1mr :)
kinyoklion
approved these changes
Dec 11, 2024
This was referenced Dec 11, 2024
github-merge-queue bot
pushed a commit
that referenced
this pull request
Dec 18, 2024
🤖 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 <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com> Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
beeme1mr
added a commit
that referenced
this pull request
Dec 18, 2024
🤖 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 <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com> Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
beeme1mr
added a commit
that referenced
this pull request
Dec 18, 2024
🤖 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 <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com> Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Draft
kevinmlong
pushed a commit
to kevinmlong/openfeature-js-sdk
that referenced
this pull request
Dec 21, 2024
## 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 <beeme1mr@users.noreply.github.com>
kevinmlong
pushed a commit
to kevinmlong/openfeature-js-sdk
that referenced
this pull request
Dec 21, 2024
🤖 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 <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com> Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
kevinmlong
pushed a commit
to kevinmlong/openfeature-js-sdk
that referenced
this pull request
Dec 21, 2024
🤖 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 <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com> Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
kevinmlong
pushed a commit
to kevinmlong/openfeature-js-sdk
that referenced
this pull request
Dec 21, 2024
🤖 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 <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com> Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
wichopy
pushed a commit
to wichopy/openfeature-js-sdk
that referenced
this pull request
Dec 31, 2024
## 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 <beeme1mr@users.noreply.github.com> Signed-off-by: Will Chou <w.chou06@gmail.com>
wichopy
pushed a commit
to wichopy/openfeature-js-sdk
that referenced
this pull request
Dec 31, 2024
🤖 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 <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com> Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com> Signed-off-by: Will Chou <w.chou06@gmail.com>
wichopy
pushed a commit
to wichopy/openfeature-js-sdk
that referenced
this pull request
Dec 31, 2024
🤖 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 <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com> Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com> Signed-off-by: Will Chou <w.chou06@gmail.com>
wichopy
pushed a commit
to wichopy/openfeature-js-sdk
that referenced
this pull request
Dec 31, 2024
🤖 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 <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com> Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com> Signed-off-by: Will Chou <w.chou06@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR
finallystage in hooks.Notes
This breaks the signature of the
finallystages 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