Skip to content

Commit ccf5120

Browse files
Merge branch 'main' into fix/flagd-infinite-connection-retries
2 parents 07195a7 + 26276ca commit ccf5120

File tree

40 files changed

+172
-146
lines changed

40 files changed

+172
-146
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@ jobs:
4343
${{ runner.os }}${{ matrix.build.java }}-maven-
4444
4545
- name: Maven Verify
46-
run: mvn --batch-mode --activate-profiles e2e,${{ matrix.build.profile }} clean verify
46+
# Run Maven build with e2e and specific profile, using parallel threads (if some provider decides to use a different toolchain version, this might break)
47+
run: mvn -T 2C --batch-mode --activate-profiles e2e,${{ matrix.build.profile }} clean verify

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"hooks/open-telemetry": "3.3.1",
33
"providers/flagd": "0.11.18",
4-
"providers/go-feature-flag": "1.0.1",
4+
"providers/go-feature-flag": "1.1.0",
55
"providers/flagsmith": "0.0.12",
66
"providers/env-var": "0.0.12",
77
"providers/jsonlogic-eval-provider": "1.2.1",

pom.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@
8080
<dependency>
8181
<groupId>io.cucumber</groupId>
8282
<artifactId>cucumber-bom</artifactId>
83-
<version>7.29.0</version>
83+
<version>7.33.0</version>
8484
<type>pom</type>
8585
<scope>import</scope>
8686
</dependency>
8787
<dependency>
8888
<groupId>org.mockito</groupId>
8989
<artifactId>mockito-bom</artifactId>
90-
<version>5.20.0</version>
90+
<version>5.21.0</version>
9191
<type>pom</type>
9292
<scope>import</scope>
9393
</dependency>
@@ -109,15 +109,15 @@
109109
<dependency>
110110
<groupId>org.projectlombok</groupId>
111111
<artifactId>lombok</artifactId>
112-
<version>1.18.40</version>
112+
<version>1.18.42</version>
113113
<scope>provided</scope>
114114
</dependency>
115115

116116
<dependency>
117117
<!-- used so that lombok can generate suppressions for spotbugs. It needs to find it on the relevant classpath -->
118118
<groupId>com.github.spotbugs</groupId>
119119
<artifactId>spotbugs</artifactId>
120-
<version>4.8.6</version>
120+
<version>4.9.8</version>
121121
<scope>provided</scope>
122122
</dependency>
123123

@@ -415,7 +415,7 @@
415415
<dependency>
416416
<groupId>com.puppycrawl.tools</groupId>
417417
<artifactId>checkstyle</artifactId>
418-
<version>11.1.0</version>
418+
<version>12.1.2</version>
419419
</dependency>
420420
</dependencies>
421421
<executions>
@@ -467,7 +467,7 @@
467467
<dependency>
468468
<groupId>com.github.spotbugs</groupId>
469469
<artifactId>spotbugs</artifactId>
470-
<version>4.9.0</version>
470+
<version>4.9.8</version>
471471
</dependency>
472472
</dependencies>
473473
<executions>
@@ -485,7 +485,7 @@
485485
<plugin>
486486
<groupId>com.diffplug.spotless</groupId>
487487
<artifactId>spotless-maven-plugin</artifactId>
488-
<version>3.0.0</version>
488+
<version>3.1.0</version>
489489
<configuration>
490490
<!-- optional: limit format enforcement to just the files changed by this feature branch -->
491491
<!-- <ratchetFrom>origin/main</ratchetFrom>-->

providers/configcat/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<dependency>
3333
<groupId>org.apache.logging.log4j</groupId>
3434
<artifactId>log4j-slf4j2-impl</artifactId>
35-
<version>2.25.1</version>
35+
<version>2.25.2</version>
3636
<scope>test</scope>
3737
</dependency>
3838

providers/env-var/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<dependency>
3232
<groupId>org.apache.commons</groupId>
3333
<artifactId>commons-lang3</artifactId>
34-
<version>3.18.0</version>
34+
<version>3.20.0</version>
3535
</dependency>
3636
</dependencies>
3737
</project>

providers/flagd/README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -106,27 +106,27 @@ variables.
106106

107107
Given below are the supported configurations:
108108

109-
| Option name | Environment variable name | Type & Values | Default | Compatible resolver |
110-
|-----------------------|--------------------------------|--------------------------|-----------|-------------------------|
111-
| resolver | FLAGD_RESOLVER | String - rpc, in-process | rpc | |
112-
| host | FLAGD_HOST | String | localhost | rpc & in-process |
113-
| port | FLAGD_PORT | int | 8013 | rpc & in-process |
114-
| targetUri | FLAGD_TARGET_URI | string | null | rpc & in-process |
115-
| tls | FLAGD_TLS | boolean | false | rpc & in-process |
116-
| defaultAuthority | FLAGD_DEFAULT_AUTHORITY | String | null | rpc & in-process |
117-
| socketPath | FLAGD_SOCKET_PATH | String | null | rpc & in-process |
118-
| certPath | FLAGD_SERVER_CERT_PATH | String | null | rpc & in-process |
119-
| deadline | FLAGD_DEADLINE_MS | int | 500 | rpc & in-process & file |
120-
| streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | int | 600000 | rpc & in-process |
121-
| keepAliveTime | FLAGD_KEEP_ALIVE_TIME_MS | long | 0 | rpc & in-process |
122-
| selector | FLAGD_SOURCE_SELECTOR | String | null | in-process |
123-
| providerId | FLAGD_SOURCE_PROVIDER_ID | String | null | in-process |
124-
| cache | FLAGD_CACHE | String - lru, disabled | lru | rpc |
125-
| maxCacheSize | FLAGD_MAX_CACHE_SIZE | int | 1000 | rpc |
126-
| maxEventStreamRetries | FLAGD_MAX_EVENT_STREAM_RETRIES | int | 5 | rpc |
127-
| retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | int | 1000 | rpc |
128-
| offlineFlagSourcePath | FLAGD_OFFLINE_FLAG_SOURCE_PATH | String | null | file |
129-
| offlinePollIntervalMs | FLAGD_OFFLINE_POLL_MS | int | 5000 | file |
109+
| Option name | Environment variable name | Type & Values | Default | Compatible resolver |
110+
|-----------------------|------------------------------------------------------------------------|--------------------------|-------------------------------|-------------------------|
111+
| resolver | FLAGD_RESOLVER | String - rpc, in-process | rpc | |
112+
| host | FLAGD_HOST | String | localhost | rpc & in-process |
113+
| port | FLAGD_PORT (rpc), FLAGD_SYNC_PORT (in-process, FLAGD_PORT as fallback) | int | 8013 (rpc), 8015 (in-process) | rpc & in-process |
114+
| targetUri | FLAGD_TARGET_URI | string | null | rpc & in-process |
115+
| tls | FLAGD_TLS | boolean | false | rpc & in-process |
116+
| defaultAuthority | FLAGD_DEFAULT_AUTHORITY | String | null | rpc & in-process |
117+
| socketPath | FLAGD_SOCKET_PATH | String | null | rpc & in-process |
118+
| certPath | FLAGD_SERVER_CERT_PATH | String | null | rpc & in-process |
119+
| deadline | FLAGD_DEADLINE_MS | int | 500 | rpc & in-process & file |
120+
| streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | int | 600000 | rpc & in-process |
121+
| keepAliveTime | FLAGD_KEEP_ALIVE_TIME_MS | long | 0 | rpc & in-process |
122+
| selector | FLAGD_SOURCE_SELECTOR | String | null | in-process |
123+
| providerId | FLAGD_SOURCE_PROVIDER_ID | String | null | in-process |
124+
| cache | FLAGD_CACHE | String - lru, disabled | lru | rpc |
125+
| maxCacheSize | FLAGD_MAX_CACHE_SIZE | int | 1000 | rpc |
126+
| maxEventStreamRetries | FLAGD_MAX_EVENT_STREAM_RETRIES | int | 5 | rpc |
127+
| retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | int | 1000 | rpc |
128+
| offlineFlagSourcePath | FLAGD_OFFLINE_FLAG_SOURCE_PATH | String | null | file |
129+
| offlinePollIntervalMs | FLAGD_OFFLINE_POLL_MS | int | 5000 | file |
130130

131131
> [!NOTE]
132132
> Some configurations are only applicable for RPC resolver.

providers/flagd/pom.xml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<properties>
1717
<!-- exclusion expression for e2e tests -->
1818
<testExclusions>**/e2e/*.java</testExclusions>
19-
<io.grpc.version>1.76.0</io.grpc.version>
19+
<io.grpc.version>1.77.0</io.grpc.version>
2020
<!-- caution - updating this will break compatibility with older protobuf-java versions -->
2121
<protobuf-java.min.version>3.25.6</protobuf-java.min.version>
2222
</properties>
@@ -64,15 +64,15 @@
6464
<!-- we only support unix sockets on linux, via epoll native lib -->
6565
<groupId>io.netty</groupId>
6666
<artifactId>netty-transport-native-epoll</artifactId>
67-
<version>4.2.6.Final</version>
67+
<version>4.2.7.Final</version>
6868
<!-- TODO: with 5+ (still alpha), arm is support and we should package multiple versions -->
6969
<classifier>linux-x86_64</classifier>
7070
</dependency>
7171

7272
<dependency>
7373
<groupId>com.fasterxml.jackson.core</groupId>
7474
<artifactId>jackson-databind</artifactId>
75-
<version>2.20.0</version>
75+
<version>2.20.1</version>
7676
</dependency>
7777

7878
<dependency>
@@ -117,7 +117,7 @@
117117
<dependency>
118118
<groupId>org.apache.commons</groupId>
119119
<artifactId>commons-lang3</artifactId>
120-
<version>3.18.0</version>
120+
<version>3.20.0</version>
121121
</dependency>
122122

123123
<dependency>
@@ -135,7 +135,7 @@
135135
<dependency>
136136
<groupId>commons-codec</groupId>
137137
<artifactId>commons-codec</artifactId>
138-
<version>1.18.0</version>
138+
<version>1.20.0</version>
139139
</dependency>
140140

141141
<dependency>
@@ -147,13 +147,13 @@
147147
<dependency>
148148
<groupId>org.testcontainers</groupId>
149149
<artifactId>testcontainers</artifactId>
150-
<version>1.21.3</version>
150+
<version>2.0.2</version>
151151
<scope>test</scope>
152152
</dependency>
153153
<dependency>
154154
<groupId>org.testcontainers</groupId>
155-
<artifactId>junit-jupiter</artifactId>
156-
<version>1.21.3</version>
155+
<artifactId>testcontainers-junit-jupiter</artifactId>
156+
<version>2.0.2</version>
157157
<scope>test</scope>
158158
</dependency>
159159
<dependency>
@@ -162,6 +162,12 @@
162162
<version>5.5.6</version>
163163
<scope>test</scope>
164164
</dependency>
165+
<dependency>
166+
<groupId>commons-io</groupId>
167+
<artifactId>commons-io</artifactId>
168+
<version>2.21.0</version>
169+
<scope>test</scope>
170+
</dependency>
165171
<!-- uncomment for logoutput during test runs -->
166172
<dependency>
167173
<groupId>org.slf4j</groupId>
@@ -180,15 +186,7 @@
180186
<!-- caution - updating this will break compatibility with older protobuf-java versions -->
181187
<version>${protobuf-java.min.version}</version>
182188
</dependency>
183-
184-
<!-- temporary override for https://www.cve.org/CVERecord?id=CVE-2025-58057 -->
185-
<dependency>
186-
<groupId>io.netty</groupId>
187-
<artifactId>netty-codec-http2</artifactId>
188-
<version>4.1.125.Final</version>
189-
</dependency>
190189
</dependencies>
191-
192190
</dependencyManagement>
193191

194192
<build>
@@ -205,7 +203,7 @@
205203
<plugin>
206204
<groupId>org.codehaus.mojo</groupId>
207205
<artifactId>exec-maven-plugin</artifactId>
208-
<version>3.6.0</version>
206+
<version>3.6.2</version>
209207
<executions>
210208
<execution>
211209
<id>update-schemas-submodule</id>
@@ -306,7 +304,7 @@
306304
<plugin>
307305
<groupId>org.codehaus.mojo</groupId>
308306
<artifactId>exec-maven-plugin</artifactId>
309-
<version>3.6.0</version>
307+
<version>3.6.2</version>
310308
<executions>
311309
<execution>
312310
<id>update-test-harness-submodule</id>

providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/Config.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public final class Config {
2424
static final String RESOLVER_ENV_VAR = "FLAGD_RESOLVER";
2525
static final String HOST_ENV_VAR_NAME = "FLAGD_HOST";
2626
static final String PORT_ENV_VAR_NAME = "FLAGD_PORT";
27+
static final String SYNC_PORT_ENV_VAR_NAME = "FLAGD_SYNC_PORT";
2728
static final String TLS_ENV_VAR_NAME = "FLAGD_TLS";
2829
static final String DEFAULT_AUTHORITY_ENV_VAR_NAME = "FLAGD_DEFAULT_AUTHORITY";
2930
static final String SOCKET_PATH_ENV_VAR_NAME = "FLAGD_SOCKET_PATH";

providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/FlagdOptions.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,14 @@ void prebuild() {
263263
}
264264

265265
if (port == 0 && resolverType != Config.Resolver.FILE) {
266-
port = Integer.parseInt(
267-
fallBackToEnvOrDefault(Config.PORT_ENV_VAR_NAME, determineDefaultPortForResolver()));
266+
String defaultPort = determineDefaultPortForResolver();
267+
String fromPortEnv = fallBackToEnvOrDefault(Config.PORT_ENV_VAR_NAME, defaultPort);
268+
269+
String portValue = resolverType == Config.Resolver.IN_PROCESS
270+
? fallBackToEnvOrDefault(Config.SYNC_PORT_ENV_VAR_NAME, fromPortEnv)
271+
: fromPortEnv;
272+
273+
port = Integer.parseInt(portValue);
268274
}
269275
}
270276

providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/resolver/common/QueueingStreamObserver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
@Slf4j
1212
@SuppressFBWarnings(
13-
value = {"EI_EXPOSE_REP", "EI_EXPOSE_REP2"},
13+
value = {"EI_EXPOSE_REP"},
1414
justification = "Internal class")
1515
public class QueueingStreamObserver<T> implements StreamObserver<T> {
1616
private final BlockingQueue<StreamResponseModel<T>> blockingQueue;

0 commit comments

Comments
 (0)