Skip to content

Commit 9dfbf37

Browse files
Merge branch 'main' into goff-back-default-releaseplease-config
2 parents 6d37cd8 + 40f77f3 commit 9dfbf37

File tree

7 files changed

+29
-28
lines changed

7 files changed

+29
-28
lines changed

pom.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -307,11 +307,8 @@
307307
<version>3.11.3</version>
308308
<configuration>
309309
<failOnWarnings>${javadoc.failOnWarnings}</failOnWarnings>
310-
<sourceFileExcludes>
311-
<sourceFileExclude>**/GoFeatureFlagProviderOptions.java</sourceFileExclude>
312-
</sourceFileExcludes>
313310
<excludePackageNames>
314-
dev.openfeature.flagd.grpc,dev.openfeature.contrib.providers.gofeatureflag.exception,dev.openfeature.contrib.providers.gofeatureflag.bean
311+
dev.openfeature.flagd.grpc
315312
</excludePackageNames>
316313
<doclint>all,-missing
317314
</doclint> <!-- ignore missing javadoc, these are enforced with more customizability in the checkstyle plugin -->

providers/go-feature-flag/CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,45 @@
11
# Changelog
22

3-
## [1.0.0](https://github.com/open-feature/java-sdk-contrib/compare/dev.openfeature.contrib.providers.go-feature-flag-v0.4.3...dev.openfeature.contrib.providers.go-feature-flag-v1.0.0) (2025-09-13)
3+
## [1.0.0](https://github.com/open-feature/java-sdk-contrib/compare/dev.openfeature.contrib.providers.go-feature-flag-v1.0.0...dev.openfeature.contrib.providers.go-feature-flag-v1.0.0) (2025-09-19)
44

55

66
### ⚠ BREAKING CHANGES
77

88
* **go-feature-flag:** Introduce in-process evaluation + tracking ([#1384](https://github.com/open-feature/java-sdk-contrib/issues/1384))
9+
* changing cache provider to caffeine over guava ([#1065](https://github.com/open-feature/java-sdk-contrib/issues/1065))
910

1011
### 🐛 Bug Fixes
1112

1213
* **deps:** update dependency com.dylibso.chicory:runtime to v1.4.1 ([#1408](https://github.com/open-feature/java-sdk-contrib/issues/1408)) ([352ddd8](https://github.com/open-feature/java-sdk-contrib/commit/352ddd861694459c155b21a60e2938d6a2bc97bc))
1314
* **deps:** update dependency com.dylibso.chicory:runtime to v1.5.0 ([#1462](https://github.com/open-feature/java-sdk-contrib/issues/1462)) ([93115a7](https://github.com/open-feature/java-sdk-contrib/commit/93115a7a818568109b32205535dc58211d36c151))
1415
* **deps:** update dependency com.dylibso.chicory:wasi to v1.4.1 ([#1409](https://github.com/open-feature/java-sdk-contrib/issues/1409)) ([2bc16a8](https://github.com/open-feature/java-sdk-contrib/commit/2bc16a86b54dd8a43c1af1d4e8884d9716282f8f))
1516
* **deps:** update dependency com.dylibso.chicory:wasi to v1.5.0 ([#1473](https://github.com/open-feature/java-sdk-contrib/issues/1473)) ([0030528](https://github.com/open-feature/java-sdk-contrib/commit/00305287986248262036dcb7cd4f4c384fe50052))
17+
* **deps:** update dependency com.fasterxml.jackson.core:jackson-databind to v2.18.1 ([#1047](https://github.com/open-feature/java-sdk-contrib/issues/1047)) ([a2ee3e6](https://github.com/open-feature/java-sdk-contrib/commit/a2ee3e6ed0c15c3ebaf55adc10198760f51a4a30))
18+
* **deps:** update dependency com.fasterxml.jackson.core:jackson-databind to v2.18.2 ([#1089](https://github.com/open-feature/java-sdk-contrib/issues/1089)) ([9b40e22](https://github.com/open-feature/java-sdk-contrib/commit/9b40e22e57739c7da417f834dd4f6822e6657ca8))
19+
* **deps:** update dependency com.fasterxml.jackson.datatype:jackson-datatype-jsr310 to v2.18.1 ([#1048](https://github.com/open-feature/java-sdk-contrib/issues/1048)) ([ac1a952](https://github.com/open-feature/java-sdk-contrib/commit/ac1a95239229def83a253515b4c88ee8b9186cf1))
20+
* **deps:** update dependency com.fasterxml.jackson.datatype:jackson-datatype-jsr310 to v2.18.2 ([#1088](https://github.com/open-feature/java-sdk-contrib/issues/1088)) ([34ec5a8](https://github.com/open-feature/java-sdk-contrib/commit/34ec5a83685100ac014def681286c59f0f939188))
21+
* **deps:** update dependency com.fasterxml.jackson.datatype:jackson-datatype-jsr310 to v2.18.3 ([#1253](https://github.com/open-feature/java-sdk-contrib/issues/1253)) ([9cc36dc](https://github.com/open-feature/java-sdk-contrib/commit/9cc36dc8d750cf38b55b12ea22f4c7bd56a206b3))
1622
* **deps:** update dependency com.fasterxml.jackson.datatype:jackson-datatype-jsr310 to v2.19.0 ([#1366](https://github.com/open-feature/java-sdk-contrib/issues/1366)) ([8896f50](https://github.com/open-feature/java-sdk-contrib/commit/8896f505b7e682c5954de465383b5e871cb1a8d0))
1723
* **deps:** update dependency com.fasterxml.jackson.datatype:jackson-datatype-jsr310 to v2.19.1 ([#1415](https://github.com/open-feature/java-sdk-contrib/issues/1415)) ([c038b8e](https://github.com/open-feature/java-sdk-contrib/commit/c038b8e8f897cb3524aa9053c9167368175c6680))
24+
* **deps:** update dependency io.reactivex.rxjava3:rxjava to v3.1.10 ([#1083](https://github.com/open-feature/java-sdk-contrib/issues/1083)) ([67d6308](https://github.com/open-feature/java-sdk-contrib/commit/67d63081c8b5f56ce7ac32a30f2bc1e67b6afe5d))
25+
* **deps:** update jackson monorepo to v2.18.3 ([#1254](https://github.com/open-feature/java-sdk-contrib/issues/1254)) ([24f11fd](https://github.com/open-feature/java-sdk-contrib/commit/24f11fd5338e2693d1eda0654c4ea4bc29063742))
1826
* **deps:** update jackson monorepo to v2.19.0 ([#1346](https://github.com/open-feature/java-sdk-contrib/issues/1346)) ([d4af23b](https://github.com/open-feature/java-sdk-contrib/commit/d4af23b9f2700233ea22f9132df00637820da10c))
1927
* **deps:** update jackson monorepo to v2.19.1 ([#1416](https://github.com/open-feature/java-sdk-contrib/issues/1416)) ([43630e5](https://github.com/open-feature/java-sdk-contrib/commit/43630e5da8fd1f7f8b8ccfcb2aa77cab51949be7))
28+
* **deps:** update slf4j monorepo to v2.0.17 ([#1243](https://github.com/open-feature/java-sdk-contrib/issues/1243)) ([66c6a7f](https://github.com/open-feature/java-sdk-contrib/commit/66c6a7fc1bdc3e907793d2fc1eb0d412693a4aee))
2029
* **gofeatureflag:** fix etag in tests to be around quotes ([#1432](https://github.com/open-feature/java-sdk-contrib/issues/1432)) ([80084df](https://github.com/open-feature/java-sdk-contrib/commit/80084dfa6089799e828a85774be50e5b34a4987b))
2130
* **goff:** Bump version of chicory to fix flaky tests ([#1423](https://github.com/open-feature/java-sdk-contrib/issues/1423)) ([f6996dc](https://github.com/open-feature/java-sdk-contrib/commit/f6996dcf18acb367f935569f28fc59adcb650b6f))
2231
* **goff:** remove flacky test ([#1427](https://github.com/open-feature/java-sdk-contrib/issues/1427)) ([e455cc3](https://github.com/open-feature/java-sdk-contrib/commit/e455cc3f022223a0a09d4b9afece65bf55bdfa5f))
2332
* require latest SDK ([#1488](https://github.com/open-feature/java-sdk-contrib/issues/1488)) ([71afb81](https://github.com/open-feature/java-sdk-contrib/commit/71afb81703bc2a5350ab967e478c527469fdb5d2))
33+
* Use seconds instead of milliseconds ([#1174](https://github.com/open-feature/java-sdk-contrib/issues/1174)) ([921231a](https://github.com/open-feature/java-sdk-contrib/commit/921231a2031098fb97bf96e506912e2dee2b225c))
2434

2535

2636
### ✨ New Features
2737

38+
* changing cache provider to caffeine over guava ([#1065](https://github.com/open-feature/java-sdk-contrib/issues/1065)) ([7083586](https://github.com/open-feature/java-sdk-contrib/commit/70835860090175209b6cec1cab6443d0bc4784fa))
39+
* **go-feature-flag:** Add exporterMetadata in the evaluation call ([#1193](https://github.com/open-feature/java-sdk-contrib/issues/1193)) ([16a8287](https://github.com/open-feature/java-sdk-contrib/commit/16a8287d8ac4e952f4bb934bd731e4301ce3c261))
2840
* **go-feature-flag:** Introduce in-process evaluation + tracking ([#1384](https://github.com/open-feature/java-sdk-contrib/issues/1384)) ([2ea5e68](https://github.com/open-feature/java-sdk-contrib/commit/2ea5e68e79c6c703c55cc815d223bbe66a60ea6d))
41+
* **go-feature-flag:** Support Exporter Metadata ([#1167](https://github.com/open-feature/java-sdk-contrib/issues/1167)) ([b55a52e](https://github.com/open-feature/java-sdk-contrib/commit/b55a52ecd90b53d25ea259e16fa0ef43fac9dc12))
42+
* improve error handling ([#1214](https://github.com/open-feature/java-sdk-contrib/issues/1214)) ([fd32898](https://github.com/open-feature/java-sdk-contrib/commit/fd32898c952926e5e484ea2305220b1f532d23ea))
2943
* migrate to Java 11 ([#1336](https://github.com/open-feature/java-sdk-contrib/issues/1336)) ([a4be1ff](https://github.com/open-feature/java-sdk-contrib/commit/a4be1ff66870a72189873171e83c5b65dbb9991c))
3044

3145
## [0.4.3](https://github.com/open-feature/java-sdk-contrib/compare/dev.openfeature.contrib.providers.go-feature-flag-v0.4.2...dev.openfeature.contrib.providers.go-feature-flag-v0.4.3) (2025-03-17)

providers/go-feature-flag/download-wasm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
# This script copy the wasm module from the git submodule repository and adds it to the build.
44
wasm_version="v1.45.4" # {{wasm_version}}
5-
mv ./wasm-releases/evaluation/gofeatureflag-evaluation_$wasm_version.wasi ./src/main/resources/wasm/gofeatureflag-evaluation_$wasm_version.wasi
5+
cp ./wasm-releases/evaluation/gofeatureflag-evaluation_$wasm_version.wasi ./src/main/resources/wasm/gofeatureflag-evaluation.wasi

providers/go-feature-flag/src/main/java/dev/openfeature/contrib/providers/gofeatureflag/GoFeatureFlagProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import lombok.val;
3535

3636
/**
37-
* GoFeatureFlagProvider is the JAVA provider implementation for the feature flag solution GO Feature Flag.
37+
* GoFeatureFlagProvider is the JAVA provider implementation for the feature flag management system GO Feature Flag.
3838
*/
3939
@Slf4j
4040
public final class GoFeatureFlagProvider extends EventProvider implements Tracking {

providers/go-feature-flag/src/main/java/dev/openfeature/contrib/providers/gofeatureflag/api/GoFeatureFlagApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public final class GoFeatureFlagApi {
5555
private final URI endpoint;
5656

5757
/** timeout is the timeout in milliseconds for the HTTP requests. */
58-
private int timeout;
58+
private final int timeout;
5959

6060
/**
6161
* GoFeatureFlagController is the constructor of the controller to contact the GO Feature Flag

providers/go-feature-flag/src/main/java/dev/openfeature/contrib/providers/gofeatureflag/wasm/EvaluationWasm.java

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,8 @@
1616
import dev.openfeature.contrib.providers.gofeatureflag.wasm.bean.WasmInput;
1717
import dev.openfeature.sdk.ErrorCode;
1818
import dev.openfeature.sdk.Reason;
19-
import java.io.File;
20-
import java.net.URL;
19+
import java.io.InputStream;
2120
import java.nio.charset.StandardCharsets;
22-
import java.nio.file.Files;
23-
import java.nio.file.Path;
24-
import java.nio.file.Paths;
2521
import java.util.Collections;
2622
import lombok.val;
2723

@@ -58,27 +54,21 @@ public EvaluationWasm() throws WasmFileNotFound {
5854
/**
5955
* getWasmFile is a function that returns the path to the WASM file.
6056
* It looks for the file in the classpath under the directory "wasm".
57+
* This method handles both file system resources and JAR-packaged resources.
6158
*
6259
* @return the path to the WASM file
6360
* @throws WasmFileNotFound - if the file is not found
6461
*/
65-
private File getWasmFile() throws WasmFileNotFound {
62+
private InputStream getWasmFile() throws WasmFileNotFound {
6663
try {
67-
ClassLoader classLoader = EvaluationWasm.class.getClassLoader();
68-
URL directoryUrl = classLoader.getResource("wasm");
69-
if (directoryUrl == null) {
70-
throw new RuntimeException("Directory not found");
71-
}
72-
Path dirPath = Paths.get(directoryUrl.toURI());
73-
try (val files = Files.list(dirPath)) {
74-
return files.filter(path -> path.getFileName().toString().startsWith("gofeatureflag-evaluation")
75-
&& (path.getFileName().toString().endsWith(".wasi")
76-
|| path.getFileName().toString().endsWith(".wasm")))
77-
.findFirst()
78-
.map(Path::toFile)
79-
.orElseThrow(
80-
() -> new RuntimeException("No file starting with 'gofeatureflag-evaluation' found"));
64+
final String wasmResourcePath = "wasm/gofeatureflag-evaluation.wasi";
65+
InputStream inputStream = EvaluationWasm.class.getClassLoader().getResourceAsStream(wasmResourcePath);
66+
if (inputStream == null) {
67+
throw new WasmFileNotFound("WASM resource not found in classpath: " + wasmResourcePath);
8168
}
69+
return inputStream;
70+
} catch (WasmFileNotFound e) {
71+
throw e;
8272
} catch (Exception e) {
8373
throw new WasmFileNotFound(e);
8474
}
Binary file not shown.

0 commit comments

Comments
 (0)