Repository navigation
feat!: add evaluation details to finally hook - #280
Merged
Merged
Conversation
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
aepfli
approved these changes
Nov 21, 2024
beeme1mr
marked this pull request as ready for review
November 21, 2024 14:57
beeme1mr
requested review from
askpt,
djosephsen,
dominikhaska,
gruebel,
jonathannorris,
kinyoklion,
lukas-reining,
maxveldink,
moredip,
nicklasl and
thomaspoignant
November 21, 2024 17:14
askpt
approved these changes
Nov 21, 2024
lukas-reining
approved these changes
Nov 22, 2024
lukas-reining
left a comment
Member
There was a problem hiding this comment.
I really like the change, I am just wondering if we should make this a breaking change.
Maybe we could avoid it as stated in the comment.
nicklasl
approved these changes
Nov 22, 2024
Signed-off-by: Michael Beemer <michael.beemer@dynatrace.com>
Member
Author
|
I'm going to merge on Friday unless there's an objection. Thanks! |
toddbaert
self-requested a review
December 5, 2024 21:01
toddbaert
approved these changes
Dec 5, 2024
toddbaert
left a comment
Member
There was a problem hiding this comment.
Approving, and for the record, I think we should generally implement this in SDKs as a breaking change without incrementing the major version, using the leeway this policy gives us. I really don't think many will be impacted, and I think it's an easy and clear fix for those few who are.
beeme1mr
enabled auto-merge (squash)
December 6, 2024 15:46
This was referenced Dec 11, 2024
github-merge-queue Bot
pushed a commit
to open-feature/js-sdk
that referenced
this pull request
Dec 12, 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
## 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>
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>
This was referenced Feb 24, 2025
toddbaert
added a commit
that referenced
this pull request
Oct 7, 2026
> Reopens [#431](#431), which could not be reopened after its branch moved. Same change, plus a second package. **Base of the provider-conformance stack**: [#423](#423) (assets) → [#439](#439) (Appendix F) → [#425](#425) (report schema) stack on this, but it stands on its own and can merge alone. ## What Sets up [release-please](https://github.com/googleapis/release-please) to cut the specification's releases, replacing the manual tagging step. ## Why The `vX.Y.Z` tags are created by hand. That is easy to postpone — v0.9.0 went out in July and the commits since it are unreleased — and it assembles the changelog from whoever's memory is handy. release-please proposes the version and the notes as a pull request, and tags once that pull request is merged. ## What does not change | | before | after | |---|---|---| | tag | `v0.9.0` | `v0.9.1`, `v0.10.0`, … | | next version after a breaking change | minor, while < 1.0.0 | unchanged | | who decides a release goes out | a maintainer merging | a maintainer merging the release PR | `include-component-in-tag: false` keeps the bare `vX.Y.Z` shape rather than `spec/vX.Y.Z`, and `.release-please-manifest.json` starts at `0.9.0` so numbering continues rather than restarting. `release-type: simple` because the root `package.json` is `private: true` and carries no version of its own; `simple` tracks the version in `version.txt`, which is why that file is added here. ## Scope: the specification package only One package, `.`, tagged `vX.Y.Z` as it always has been. The conformance assets under `specification/assets/provider-tck` need their own tags too — a Go consumer cannot name a version without one — but that configuration belongs beside the assets, so it is added in [#423](#423) along with the files it describes. This PR stays the general setup and can merge on its own. ## What does change, and needs a decision **Release notes become generated from conventional commits.** v0.9.0's notes were written by hand, including the `⚠️ This release contains breaking changes` callout linking #280, #306 and #360. Anything beyond the commit subjects now has to be added to the release pull request before it is merged. If the TSC would rather keep the old shape, `changelog-sections` can be tuned in a follow-up — the defaults are left here so the first release is easy to eyeball. ## What to expect on merge release-please runs on push to `main` and should open a release pull request proposing **v0.9.1**; the non-chore commits since v0.9.0 are #416, #419, #429 and #408, all `fix:` or `docs:`. Nothing is tagged until that pull request is merged, so the first run is reviewable before it has any effect. The action configuration is the shape v5 actually reads: `command` and `default-branch` are not v5 inputs, `target-branch` is, and `signoff` is a configuration-file option rather than an action input — which matters because this repository enforces DCO on the bot's own commits. --------- Signed-off-by: Simon Schrottner <simon.schrottner@flagsmith.com> Signed-off-by: Todd Baert <todd.baert@dynatrace.com> Co-authored-by: Todd Baert <todd.baert@dynatrace.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 to include evaluation details.Related Issues
#281
Notes
This is a breaking change but will significantly enhance the usefulness of the
finallystage. Currently, thefinallystage is used to perform end-of-transaction or clean-up tasks. If this proposal is accepted, thefinallystage will have access to the same evaluation details that are returned to the application author.This change will make implementing the OpenTelemetry Feature Flag Semantic Convention changes easier because the evaluation details in the
finallystage can contain all the telemetry we'll need. Values likeflag set idandflag set versioncan be supplied via flag metadata, which isn't accessible in theerroror currentfinallystages.Here's a draft PR showing how this could be implemented in JavaScript.
Follow-up Tasks
Implement the changes in all SDKs.