Skip to content

feat(flagd-core): add resolve operator - #1979

Draft
marcozabel wants to merge 11 commits into
open-feature:mainfrom
marcozabel:feat/flagd-core-resolve-operator
Draft

marcozabel wants to merge 11 commits into
open-feature:mainfrom
marcozabel:feat/flagd-core-resolve-operator

Conversation

@marcozabel

Copy link
Copy Markdown

Implements the terminal resolve operator from the targeting metadata ADR in flagd-core, matching open-feature/flagd#2127.

  • {"resolve": ["variant", "reason"?, [["key", value], ...]?]} selects a variant, optionally overrides the reason, and adds rule metadata (rule > flag > flag-set)
  • Valid as the whole rule, an if result, or a fractional bucket variant; placement is enforced by the targeting schema
  • Malformed computed arguments (null variant, non-string reason or key, NaN/±Inf) fall back to the default variant; a missing variant fails with GENERAL
  • The operator returns a Java object, so context data cannot forge a result
  • Provider e2e runs the @resolve scenarios for in-process and file; RPC excludes them until the harness flagd supports it

Temporarily pins the schemas and test-harness submodules to open-feature/flagd-schemas#238 and open-feature/flagd-testbed#448; they move to the released versions before merge.

Fixes #1924

Temporarily pins open-feature/flagd-schemas#238 so the targeting schema knows resolve; move to the released schema before merging.

Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
Selects a variant and optionally overrides the reason and merges rule metadata over flag and flag-set metadata. Malformed computed arguments fall back to the default variant. Part of open-feature#1924.

Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
Temporarily pins open-feature/flagd-testbed#448. RPC excludes @resolve until the harness flagd image supports it.

Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
Also splits the free-form reason case out of the placement test.

Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

The schema rejects literal reserved keys only, so computed keys need a runtime check.

Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
Picks up open-feature/flagd-schemas#238 review fixes: resolve can't be the first condition of a terminal if, and resolve mixes with plain if/fractional.

Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
Pins open-feature/flagd-testbed#448 at 91ba87a.

Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
The released test harness image has no "resolve" launchpad config, so starting it returns 500.
File mode reads the harness flag file directly and no longer needs one; in-process skips resolve until the image ships it.

Signed-off-by: marcozabel <marco.zabel@dynatrace.com>
…rios

Pins open-feature/flagd-testbed#448 at 952a05f (not pushed yet).

Signed-off-by: marcozabel <marco.zabel@dynatrace.com>

This branch has not been deployed

No deployments
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.

feat(flagd): implement resolve operator

5 participants