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

refactor: improve track interface for providers #1100

Merged
merged 2 commits into from
Dec 11, 2024
Merged

Conversation

beeme1mr
Copy link
Member

@beeme1mr beeme1mr commented Dec 9, 2024

This PR

  • updates the context and trackingEventDetails on the tracking interface to not be optional since they're always supplied by the SDK.

Notes

This is a small QoL improvement for provider devs implementing the tracking interface.

How to test

The SDK still compiles, and the tests don't need to be modified.

@beeme1mr beeme1mr requested a review from a team as a code owner December 9, 2024 22:36
@toddbaert toddbaert self-requested a review December 10, 2024 19:32
@toddbaert
Copy link
Member

I pushed up some changes to actually default the tracking contents to match your types. I thought we were doing this, but we weren't. I also added a test.

@toddbaert toddbaert force-pushed the improve-track-signature branch from 592e41e to 801f4ca Compare December 10, 2024 19:43
@beeme1mr beeme1mr added this pull request to the merge queue Dec 11, 2024
Merged via the queue into main with commit 5e5b160 Dec 11, 2024
8 checks passed
@beeme1mr beeme1mr deleted the improve-track-signature branch December 11, 2024 20:11
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 <[email protected]>
Signed-off-by: Michael Beemer <[email protected]>
Co-authored-by: Michael Beemer <[email protected]>
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 <[email protected]>
Signed-off-by: Michael Beemer <[email protected]>
Co-authored-by: Michael Beemer <[email protected]>
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 <[email protected]>
Signed-off-by: Michael Beemer <[email protected]>
Co-authored-by: Michael Beemer <[email protected]>
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 <[email protected]>
Signed-off-by: Michael Beemer <[email protected]>
Co-authored-by: Michael Beemer <[email protected]>
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 <[email protected]>
Signed-off-by: Michael Beemer <[email protected]>
Co-authored-by: Michael Beemer <[email protected]>
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 <[email protected]>
Signed-off-by: Michael Beemer <[email protected]>
Co-authored-by: Michael Beemer <[email protected]>
wichopy pushed a commit to wichopy/openfeature-js-sdk that referenced this pull request Dec 31, 2024
## This PR

- updates the context and trackingEventDetails on the tracking interface
to not be optional since they're always supplied by the SDK.

### Notes

This is a small QoL improvement for provider devs implementing the
tracking interface.

### How to test

The SDK still compiles, and the tests don't need to be modified.

---------

Signed-off-by: Michael Beemer <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Co-authored-by: Todd Baert <[email protected]>
Signed-off-by: Will Chou <[email protected]>
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 <[email protected]>
Signed-off-by: Michael Beemer <[email protected]>
Co-authored-by: Michael Beemer <[email protected]>
Signed-off-by: Will Chou <[email protected]>
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 <[email protected]>
Signed-off-by: Michael Beemer <[email protected]>
Co-authored-by: Michael Beemer <[email protected]>
Signed-off-by: Will Chou <[email protected]>
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 <[email protected]>
Signed-off-by: Michael Beemer <[email protected]>
Co-authored-by: Michael Beemer <[email protected]>
Signed-off-by: Will Chou <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants