Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a376033
test(ofrep): adopt the conformance suite in the OFREP provider
aepfli Aug 24, 2026
fbf8f55
test(ofrep): follow the base's capability model
aepfli Sep 11, 2026
eb2dac6
docs(ofrep): note in the Compose header which canonical flags the tes…
aepfli Sep 11, 2026
ef14cbb
test(ofrep): follow the flag rename and settle @numeric-coercion by e…
aepfli Sep 11, 2026
60651f0
test(ofrep): withhold @reinitialization, which the provider cannot offer
aepfli Sep 11, 2026
a4ff573
test(ofrep): withhold @large-integers explicitly
aepfli Sep 11, 2026
9bbe17e
docs(ofrep): say what the new tags gate here, and follow the testbed gap
aepfli Sep 12, 2026
440d7e7
test(ofrep): withhold @disabled-flags, and say why it is a defect
aepfli Sep 12, 2026
8dc45f7
test(ofrep): follow the provider-tck -> tck rename
aepfli Sep 12, 2026
8a8b39a
build(ofrep): gate the TCK suite behind Docker, and bring own testcon…
aepfli Sep 12, 2026
005b2ce
docs(ofrep): say that the TCK suite is Docker-gated and hand-run
aepfli Sep 12, 2026
5a87771
docs(ofrep): point at Appendix F for the CI-exclusion reasoning
aepfli Sep 12, 2026
dd29b94
test(ofrep): record what @standard-reasons does and does not claim here
aepfli Sep 13, 2026
2d7740a
test(ofrep): drop the one omission that was never about OFREP
aepfli Sep 13, 2026
9515b38
docs(ofrep): separate the reason a tag is withheld from the notes bes…
aepfli Sep 13, 2026
f966cc3
test(ofrep): run the conformance suite from a step of its own
aepfli Sep 13, 2026
09640cd
test(ofrep): give the conformance adoption a package of its own
aepfli Sep 13, 2026
c54c7fb
docs(ofrep): cut the conformance section to what is this adoption's
aepfli Sep 14, 2026
d6a5582
test(ofrep): run against the shared Compose file, and cut what Append…
aepfli Sep 14, 2026
f4fdf5e
test(ofrep): say what the codeDefaultFlag reading establishes
aepfli Sep 14, 2026
ecc8197
test(ofrep): declare @string-typing, confirmed by a run
aepfli Sep 15, 2026
3221da7
test(ofrep): declare @fully-typed-values too, confirmed by a run
aepfli Sep 16, 2026
780c5c3
test(ofrep): trim the TCK comments to this adoption's own facts
aepfli Oct 7, 2026
b8214e9
test(ofrep): run the conformance suite from the root tck profile
aepfli Oct 20, 2026
1baad0e
docs(ofrep): follow the merged Provider TCK job name
aepfli Oct 20, 2026
58c46c9
fix(ofrep): run the TCK against the testbed's own compose file
aepfli Nov 2, 2026
847dfee
docs(ofrep): cut the TCK comments to what the code cannot say
aepfli Nov 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions providers/ofrep/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,15 @@ Given below are the supported configurations:
| proxySelector | ProxySelector | ProxySelector.getDefault() | The proxy selector used by HTTP Client.
| executor | Executor | Thread Pool of size 5 | The executor used by HTTP Client.


## Provider conformance (TCK)

`OfrepTest` in `src/test/java/.../ofrep/tck/` runs the [OpenFeature Provider TCK](../../tools/tck/README.md)
against flagd's OFREP endpoint, using the flagd-testbed image and its control API. It needs Docker:

```bash
mvn -Ptck -pl providers/ofrep -am test
```

CI runs it in the `Provider TCK` job. Set `tck.testFailureIgnore` to `true` in this module's pom to
report failures without failing the build.
25 changes: 25 additions & 0 deletions providers/ofrep/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
<description>OFREP Provider</description>
<url>https://openfeature.dev</url>

<properties>
<!-- Match any tck version locally; CI resolves it from the reactor -->
<tck.version>[0.1.0,)</tck.version>
<testcontainers.version>2.0.4</testcontainers.version>
<!-- set true to report conformance failures without failing the tck build -->
<tck.testFailureIgnore>false</tck.testFailureIgnore>
</properties>

<developers>
<developer>
<id>Rahul-Baradol</id>
Expand Down Expand Up @@ -81,5 +89,22 @@
<version>4.12.0</version>
<scope>test</scope>
</dependency>

<!-- OpenFeature Provider TCK -->
<dependency>
<groupId>dev.openfeature.contrib.tools</groupId>
<artifactId>tck</artifactId>
<version>${tck.version}</version>
<scope>test</scope>
</dependency>

<!-- the TCK declares Testcontainers optional, so a containerised adopter brings its own -->
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
package dev.openfeature.contrib.providers.ofrep.tck;

import dev.openfeature.contrib.providers.ofrep.OfrepProvider;
import dev.openfeature.contrib.providers.ofrep.OfrepProviderOptions;
import dev.openfeature.contrib.tools.tck.BackendEndpoint;
import dev.openfeature.contrib.tools.tck.Capability;
import dev.openfeature.contrib.tools.tck.ContainerizedProviderTckTest;
import dev.openfeature.contrib.tools.tck.KnownDeviation;
import dev.openfeature.sdk.FeatureProvider;
import java.io.File;
import java.time.Duration;
import java.util.Collections;
import java.util.List;
import java.util.Set;

/** Runs the OpenFeature Provider TCK against the OFREP provider, backed by flagd's OFREP endpoint. */
public class OfrepTest extends ContainerizedProviderTckTest {

private static final int OFREP_PORT = 8016;

/** Nothing listens here; outages on the Compose stack belong to the control API. */
private static final int UNAVAILABLE_PORT = 9999;

/** The flagd-testbed's own stack, so this suite and the flagd adoption share one image pin. */
@Override
public File composeFile() {
return new File("../flagd/test-harness/docker-compose.yaml");
}

@Override
public String backendService() {
return "flagd";
}

@Override
public List<Integer> backendPorts() {
return Collections.singletonList(OFREP_PORT);
}

@Override
public FeatureProvider createProvider(BackendEndpoint endpoint) {
return OfrepProvider.constructProvider(OfrepProviderOptions.builder()
.baseUrl("http://" + endpoint.host() + ":" + endpoint.port(OFREP_PORT))
.build());
}

@Override
public FeatureProvider createUnavailableProvider() {
return OfrepProvider.constructProvider(OfrepProviderOptions.builder()
.baseUrl("http://localhost:" + UNAVAILABLE_PORT)
.connectTimeout(Duration.ofMillis(500))
.requestTimeout(Duration.ofMillis(500))
.build());
}

/**
* {@inheritDoc}
*
* <p>The provider has no lifecycle of its own: no {@code initialize()}, no events, no state
* between calls, and an executor {@code shutdown()} never recreates. That withholds lifecycle,
* reinitialization, events, stale, configuration change and unavailable init. Numeric coercion
* is withheld because the provider keeps integers and doubles strictly apart, which the rule
* allows. Disabled flags is a defect; see {@link #knownDeviations()}.
*/
@Override
public Set<Capability> capabilities() {
return Capability.declarableExcept(
Capability.LIFECYCLE,
Capability.REINITIALIZATION,
Capability.EVENTS,
Capability.STALE,
Capability.CONFIGURATION_CHANGE,
Capability.DISABLED_FLAGS,
Capability.UNAVAILABLE_INIT,
Capability.NUMERIC_COERCION);
}

@Override
public List<KnownDeviation> knownDeviations() {
return Collections.singletonList(KnownDeviation.untracked(
Capability.DISABLED_FLAGS,
"A value-less OFREP evaluation success (codeDefaultFlag) is reported as FLAG_NOT_FOUND "
+ "instead of the code default with the server's reason; flagd answers a "
+ "disabled flag that way."));
}
}
Loading