Skip to content

feat: add disabled flag evaluation test scenarios#376

Merged
toddbaert merged 8 commits into
mainfrom
feat/disabled-flag-evaluation
Jun 1, 2026
Merged

feat: add disabled flag evaluation test scenarios#376
toddbaert merged 8 commits into
mainfrom
feat/disabled-flag-evaluation

Conversation

@jonathannorris

@jonathannorris jonathannorris commented May 21, 2026

Copy link
Copy Markdown
Member

Summary

  • New flags/disabled-flags.json: 5 typed disabled flags (boolean, string, integer, float, object) + cross-flagset-flag
  • flags/selector-flags.json: adds cross-flagset-flag (ENABLED) and metadata.flagSetId: "selector-set" for cross-flag-set coverage
  • evaluator/flags/testkit-flags.json: appends the 5 disabled flag definitions
  • gherkin/disabled.feature: provider-level scenarios (@in-process @rpc)
    • disabled flag resolves with reason=DISABLED and the caller-provided default
    • same flag DISABLED in one flag set, ENABLED in another (via selector)
  • evaluator/gherkin/disabled.feature: matching evaluator-level scenario
  • flagd/Dockerfile: bump base image to flagd:v0.16.0

Motivation

Part of open-feature/flagd#1965. ADR: docs/architecture-decisions/disabled-flag-evaluation.md.

Previously a disabled flag returned reason=ERROR / errorCode=FLAG_DISABLED. As of open-feature/flagd#1968 it returns reason=DISABLED with the caller's default value; this PR adds the testbed coverage to verify that across providers.

Related

Part of: open-feature/flagd#1965
Closes: #375

@jonathannorris jonathannorris requested a review from a team as a code owner May 21, 2026 17:42
Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
@jonathannorris jonathannorris force-pushed the feat/disabled-flag-evaluation branch from 776534e to e13251e Compare May 21, 2026 17:45

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces new flag definitions and Gherkin test scenarios to verify the behavior of disabled flags, ensuring they return a 'DISABLED' reason and the provided default value. The review feedback highlights several necessary improvements to the test suite: adding missing selectors to point to the correct flag source files, correcting a reference to a non-existent flag in the bulk evaluation scenario, and expanding test coverage to include object-type flags. Additionally, it was noted that 'fallback value' should be used instead of 'default' in the Gherkin tables to maintain consistency with project conventions.

Comment thread gherkin/disabled.feature
Comment thread gherkin/disabled.feature Outdated
Comment thread gherkin/disabled.feature
Comment thread flags/disabled-flags.json

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new flag definitions and Gherkin scenarios to validate the upcoming “disabled flag evaluates successfully with reason=DISABLED and code default” behavior across single-flag, bulk, and selector-based evaluations in the flagd testbed.

Changes:

  • Added gherkin/disabled.feature with scenarios for disabled single-flag evaluation, bulk evaluation inclusion, and cross-flagset selection.
  • Added flags/disabled-flags.json containing disabled flag definitions (including a cross-flagset key).
  • Updated flags/selector-flags.json to include an enabled cross-flagset-flag for selector-based testing.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
gherkin/disabled.feature Introduces disabled-flag evaluation scenarios (single, bulk, selector-based).
flags/selector-flags.json Adds cross-flagset-flag enabled definition for selector scenarios.
flags/disabled-flags.json Adds disabled flag definitions used by the new disabled evaluation scenarios.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread gherkin/disabled.feature
Comment thread gherkin/disabled.feature Outdated
Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
Comment thread gherkin/disabled.feature
Comment thread gherkin/disabled.feature Outdated
Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
@aepfli

aepfli commented Jun 1, 2026

Copy link
Copy Markdown
Member

should we also add this to the evaluator gherkin tests - currently this is the big suite, but i feel like we still want to slowely migrate to the core specific tests, to be not bothered with connections, etc. when testing the core logic

toddbaert added a commit that referenced this pull request Jun 1, 2026
Mirrors the top-level disabled flag coverage in the evaluator-only
suite per Simon's review feedback on #376. Adds disabled-{boolean,
string,integer,float,object}-flag fixtures to testkit-flags.json and
a new disabled.feature asserting reason=DISABLED with absent value.

Relates to: open-feature/flagd#1965

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
@toddbaert toddbaert force-pushed the feat/disabled-flag-evaluation branch from 11cb483 to 53697b2 Compare June 1, 2026 14:08
toddbaert added 2 commits June 1, 2026 10:31
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
@toddbaert toddbaert marked this pull request as draft June 1, 2026 14:36
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
@toddbaert toddbaert force-pushed the feat/disabled-flag-evaluation branch from 9eb3647 to 87928ac Compare June 1, 2026 16:53
@toddbaert toddbaert marked this pull request as ready for review June 1, 2026 16:56
@toddbaert

Copy link
Copy Markdown
Member

I've tested this end-to-end with a locally built flagd against a locally updated Java provider. 👍 . Will merge/release.

@toddbaert toddbaert merged commit b771775 into main Jun 1, 2026
3 of 4 checks passed
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: add disabled flag evaluation test scenarios

4 participants