open-feature / open-feature/spec

Return value and `after` stage errors

Open
#174 18 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.3k
Forks
58
Avg merge
2d 18h
Merged PRs (30d)
2

Description

As pointed out here, the spec doesn't dictate whether the evaluated flag value, or the default value should be returned in the case of an error in the AFTER stage hooks (4.4.7 does say: If an error occurs in the before hooks, the default value MUST be returned.).

I think since "after" are really about side-effects, like telemetry, etc, we probably should return the evaluated value? I'd like other's thoughts. In either case, I think we should specify this behavior.

I think we should return the default value, to support the validation use-case @beeme1mr mentions below.

cc @justinabrahms @skyerus @moredip @beeme1mr @benjiro @kinyoklion @josecolella @tcarrio @cdonnellytx

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with specification section 4.4.7 and the discussion in pull request 109. Clarify the normative behavior for errors in AFTER stage hooks, specifying whether the default or evaluated value is returned, and ensure the final wording supports the validation use case described in the issue.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.