Skip to content

feat: the flagd scenarios as Provider TCK extensions - #445

Draft
aepfli wants to merge 5 commits into
mainfrom
feat/tck-extensions
Draft

aepfli wants to merge 5 commits into
mainfrom
feat/tck-extensions

Conversation

@aepfli

@aepfli aepfli commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Adds tck-extensions/: the gherkin/ scenarios rewritten as extensions for the Provider TCK, so every flagd provider that adopts the TCK runs the same files instead of keeping its own copy. gherkin/ is unchanged for SDKs that still run it directly.

  • Each file's header names its source feature and the scenarios it leaves out, mostly because the TCK's canonical scenarios already ask them.

  • Written in the TCK's step vocabulary plus flagd extension glue (provider options, connection control). Feature names carry a TCK extension: prefix, because the lint rejects duplicate feature names across the repository.

  • scenario-size limits go up by one step (Background 4, Scenario 17). The TCK form sets the reconnect options in rpc-caching.feature as explicit steps, where gherkin/ folds them into its provider step.

  • tck-extensions/ is also a Go module, github.com/open-feature/flagd-testbed/tck-extensions, whose FS embeds the feature files. A Go module zip carries a submodule without its files, so Go can't read them the way the other languages do. Same pattern as the spec's specification/assets/provider-tck. Vetted locally; it embeds all 11 files.

The first consumer is Java: java-sdk-contrib#1951 will read these through its test-harness submodule and drop its legacy e2e suites. Its CI run is the verification for these files; npm run gherkin-lint passes locally.

Adds tck-extensions/, the gherkin/ scenarios rewritten in the Provider TCK's
step vocabulary, so every flagd provider adopting the TCK runs the same files
instead of porting its own copy. Java ports them first, in
open-feature/java-sdk-contrib#1951. gherkin/ is unchanged.

The scenario-size limits go up by one step: the TCK form sets the reconnect
options as explicit steps where gherkin/ folds them into its provider step.

Signed-off-by: Simon Schrottner <simon.schrottner@flagsmith.com>
@coderabbitai

coderabbitai Bot commented Nov 2, 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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

aepfli added a commit to open-feature/java-sdk-contrib that referenced this pull request Nov 2, 2026
The extension scenarios now live in flagd-testbed's tck-extensions/, so every
flagd provider adopting the TCK runs the same files. The test-harness
submodule is pinned to open-feature/flagd-testbed#445 until it is released,
and the module puts tck-extensions/ on the test classpath as extensions/,
where the TCK looks; the local copies go.

Signed-off-by: Simon Schrottner <simon.schrottner@flagsmith.com>
A Go module zip carries a submodule only as a gitlink, so a Go flagd adoption
cannot read tck-extensions/ the way the other languages do. The directory
becomes a module whose FS embeds the feature files, so Go pins a revision in
go.mod and reads the same bytes.

Signed-off-by: Simon Schrottner <simon.schrottner@flagsmith.com>
aepfli added a commit to open-feature/go-sdk-contrib that referenced this pull request Nov 2, 2026
…lvers

Each suite now also runs the tck-extensions module from flagd-testbed
(pinned to a pseudo-version of open-feature/flagd-testbed#445), selecting
the scenarios tagged with its resolver and dropping @fractional-v2. The
flagd steps set provider options per scenario through the step context,
reusing the e2e framework's option mapping, and route through the
testbed's envoy sidecar, now part of the shared Compose file.

The shared stack moves to flagd-testbed v3.11.0, and the in-process
provider gets a 15s init deadline: syncing the larger ruleset missed 1s
intermittently.

Signed-off-by: Simon Schrottner <simon.schrottner@flagsmith.com>
certPath is relative to the testbed root instead of Java's submodule path, the
comments no longer name the Java evaluator, and the cached object scenario
asserts with the TCK's object table instead of a quoted JSON argument, which a
regex-based runner cannot match. Found by the Go adoption.

Signed-off-by: Simon Schrottner <simon.schrottner@flagsmith.com>
aepfli added a commit to open-feature/python-sdk-contrib that referenced this pull request Nov 3, 2026
…ites

flagd-testbed now carries its scenarios as Provider TCK extensions in
tck-extensions/ (open-feature/flagd-testbed#445), as Java and Go read them.
The test-harness submodule moves to that commit, and both resolvers run
the extensions beside the canonical scenarios, 364 per resolver.

The TCK takes extension scenarios from an extensions/ directory beside the
test module, so tests/tck/conftest.py copies the feature files there, as
Java's build does. Each resolver includes its own tag and excludes
@targetURI, which this provider has no option for, and @fractional-v2.
The stack is the testbed's own Compose file, for the envoy sidecar the
@forbidden scenario connects through.

tests/tck/steps.py holds the flagd steps: provider options, applied over
the suite's defaults when the TCK builds the provider, and envoy's
forbidden listener. It also defines three generic steps the extensions use
that the TCK does not have yet: a typed context key, a nested context
property and the fatal client state.

tests/e2e is deleted; the extensions replace it. config.feature needs no
backend and runs in the default build from tests/test_config_feature.py.

Signed-off-by: Simon Schrottner <simon.schrottner@flagsmith.com>
The events, context-enrichment and sync-payload headers explained their
retry timing against Java's defaults and a Java class. State what the
scenarios set and why, which holds for every adoption. Found by the Python
adoption.

Signed-off-by: Simon Schrottner <simon.schrottner@flagsmith.com>
Gherkin keeps them as written in a table cell, and the expected buckets hash
them that way; a runner that decodes them or doubles the backslash gets
other buckets, as pytest-bdd 8.1 did.

Signed-off-by: Simon Schrottner <simon.schrottner@flagsmith.com>
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.

1 participant