From 37ed6a424cdc013ed74c9881826cc56c93ae8228 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 02:27:14 +0000 Subject: [PATCH 001/391] chore(deps): update github/codeql-action digest to 08bc0cf (#1313) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index d7ade6207..07e669fc5 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -20,7 +20,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@0701025a8b1600e416be4f3bb5a830b1aa6af01e + uses: github/codeql-action/init@08bc0cf022445eacafaa248bf48da20f26b8fd40 with: languages: java @@ -45,4 +45,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@0701025a8b1600e416be4f3bb5a830b1aa6af01e + uses: github/codeql-action/analyze@08bc0cf022445eacafaa248bf48da20f26b8fd40 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 8e6d4ed29..818ff9c41 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@0701025a8b1600e416be4f3bb5a830b1aa6af01e + uses: github/codeql-action/init@08bc0cf022445eacafaa248bf48da20f26b8fd40 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@0701025a8b1600e416be4f3bb5a830b1aa6af01e + uses: github/codeql-action/autobuild@08bc0cf022445eacafaa248bf48da20f26b8fd40 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@0701025a8b1600e416be4f3bb5a830b1aa6af01e + uses: github/codeql-action/analyze@08bc0cf022445eacafaa248bf48da20f26b8fd40 From 46903c6f275e5f9dc8884acf3f76f76efcfc58bd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 6 Feb 2025 18:53:02 +0000 Subject: [PATCH 002/391] chore(deps): update github/codeql-action digest to 24e1c2d (#1315) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 07e669fc5..1eb8a33b3 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -20,7 +20,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@08bc0cf022445eacafaa248bf48da20f26b8fd40 + uses: github/codeql-action/init@24e1c2d337459cce262cbca8d69998e56cd5eb8e with: languages: java @@ -45,4 +45,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@08bc0cf022445eacafaa248bf48da20f26b8fd40 + uses: github/codeql-action/analyze@24e1c2d337459cce262cbca8d69998e56cd5eb8e diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 818ff9c41..cc218c557 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@08bc0cf022445eacafaa248bf48da20f26b8fd40 + uses: github/codeql-action/init@24e1c2d337459cce262cbca8d69998e56cd5eb8e with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@08bc0cf022445eacafaa248bf48da20f26b8fd40 + uses: github/codeql-action/autobuild@24e1c2d337459cce262cbca8d69998e56cd5eb8e - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@08bc0cf022445eacafaa248bf48da20f26b8fd40 + uses: github/codeql-action/analyze@24e1c2d337459cce262cbca8d69998e56cd5eb8e From 26e1d7fff342a32880542efa87b017aec506667e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2025 17:53:29 +0000 Subject: [PATCH 003/391] chore(deps): update github/codeql-action digest to 0a35e8f (#1316) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 1eb8a33b3..6815fa8ec 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -20,7 +20,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@24e1c2d337459cce262cbca8d69998e56cd5eb8e + uses: github/codeql-action/init@0a35e8f6866a39b001e5f7ad1d0daf9836786896 with: languages: java @@ -45,4 +45,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@24e1c2d337459cce262cbca8d69998e56cd5eb8e + uses: github/codeql-action/analyze@0a35e8f6866a39b001e5f7ad1d0daf9836786896 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index cc218c557..b573e6365 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@24e1c2d337459cce262cbca8d69998e56cd5eb8e + uses: github/codeql-action/init@0a35e8f6866a39b001e5f7ad1d0daf9836786896 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@24e1c2d337459cce262cbca8d69998e56cd5eb8e + uses: github/codeql-action/autobuild@0a35e8f6866a39b001e5f7ad1d0daf9836786896 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@24e1c2d337459cce262cbca8d69998e56cd5eb8e + uses: github/codeql-action/analyze@0a35e8f6866a39b001e5f7ad1d0daf9836786896 From b7978832b786fe081169ff0efeb702218300c622 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2025 20:56:17 +0000 Subject: [PATCH 004/391] fix(deps): update dependency io.cucumber:cucumber-bom to v7.21.1 (#1317) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e75dd506a..8b3ce85af 100644 --- a/pom.xml +++ b/pom.xml @@ -182,7 +182,7 @@ io.cucumber cucumber-bom - 7.21.0 + 7.21.1 pom import From 538140dfe713a421623b179e69b399f82200fe61 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 09:32:43 +0000 Subject: [PATCH 005/391] chore(deps): update github/codeql-action digest to 6063925 (#1320) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 6815fa8ec..94745b3ef 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -20,7 +20,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@0a35e8f6866a39b001e5f7ad1d0daf9836786896 + uses: github/codeql-action/init@606392577144219644443c010bc0e17ad563e559 with: languages: java @@ -45,4 +45,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@0a35e8f6866a39b001e5f7ad1d0daf9836786896 + uses: github/codeql-action/analyze@606392577144219644443c010bc0e17ad563e559 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index b573e6365..8add2783a 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@0a35e8f6866a39b001e5f7ad1d0daf9836786896 + uses: github/codeql-action/init@606392577144219644443c010bc0e17ad563e559 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@0a35e8f6866a39b001e5f7ad1d0daf9836786896 + uses: github/codeql-action/autobuild@606392577144219644443c010bc0e17ad563e559 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@0a35e8f6866a39b001e5f7ad1d0daf9836786896 + uses: github/codeql-action/analyze@606392577144219644443c010bc0e17ad563e559 From 8f3ced590764760244cc81ac10c939ca62504dfe Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 11:46:13 +0000 Subject: [PATCH 006/391] chore(deps): update github/codeql-action digest to affec20 (#1323) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 94745b3ef..7791fe512 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -20,7 +20,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@606392577144219644443c010bc0e17ad563e559 + uses: github/codeql-action/init@affec202b3ff85f13ab60c1d834aa4996994a484 with: languages: java @@ -45,4 +45,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@606392577144219644443c010bc0e17ad563e559 + uses: github/codeql-action/analyze@affec202b3ff85f13ab60c1d834aa4996994a484 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 8add2783a..94dd2624d 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@606392577144219644443c010bc0e17ad563e559 + uses: github/codeql-action/init@affec202b3ff85f13ab60c1d834aa4996994a484 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@606392577144219644443c010bc0e17ad563e559 + uses: github/codeql-action/autobuild@affec202b3ff85f13ab60c1d834aa4996994a484 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@606392577144219644443c010bc0e17ad563e559 + uses: github/codeql-action/analyze@affec202b3ff85f13ab60c1d834aa4996994a484 From 69cdc772a639470dd223bf70ef6e9f8bc4d93dea Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 22:35:36 +0000 Subject: [PATCH 007/391] chore(deps): update actions/cache digest to 9fa7e61 (#1324) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 338a0985c..6ef83234d 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -32,7 +32,7 @@ jobs: server-password: ${{ secrets.OSSRH_PASSWORD }} - name: Cache local Maven repository - uses: actions/cache@36f1e144e1c8edb0a652766b484448563d8baf46 + uses: actions/cache@9fa7e61ec7e1f44ac75218e7aaea81da8856fd11 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 7791fe512..8a0b845da 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -25,7 +25,7 @@ jobs: languages: java - name: Cache local Maven repository - uses: actions/cache@36f1e144e1c8edb0a652766b484448563d8baf46 + uses: actions/cache@9fa7e61ec7e1f44ac75218e7aaea81da8856fd11 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} From 3baf0df966f8212864aa7e57bc3d3d09d324fe11 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 13 Feb 2025 02:02:06 +0000 Subject: [PATCH 008/391] chore(deps): update github/codeql-action digest to 1c15a48 (#1325) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 8a0b845da..6e3c40f48 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -20,7 +20,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@affec202b3ff85f13ab60c1d834aa4996994a484 + uses: github/codeql-action/init@1c15a48f3fb49ce535e9ee4e57e127315f669361 with: languages: java @@ -45,4 +45,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@affec202b3ff85f13ab60c1d834aa4996994a484 + uses: github/codeql-action/analyze@1c15a48f3fb49ce535e9ee4e57e127315f669361 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 94dd2624d..85313855b 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@affec202b3ff85f13ab60c1d834aa4996994a484 + uses: github/codeql-action/init@1c15a48f3fb49ce535e9ee4e57e127315f669361 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@affec202b3ff85f13ab60c1d834aa4996994a484 + uses: github/codeql-action/autobuild@1c15a48f3fb49ce535e9ee4e57e127315f669361 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@affec202b3ff85f13ab60c1d834aa4996994a484 + uses: github/codeql-action/analyze@1c15a48f3fb49ce535e9ee4e57e127315f669361 From 08c38fb553d82a42682c3eb9239329f770063898 Mon Sep 17 00:00:00 2001 From: Jonathan Norris Date: Thu, 13 Feb 2025 11:50:19 -0700 Subject: [PATCH 009/391] fix: TrackingEventDetails interface to include numeric getValue() call (#1328) Signed-off-by: Jonathan Norris --- .../java/dev/openfeature/sdk/TrackingEventDetails.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/dev/openfeature/sdk/TrackingEventDetails.java b/src/main/java/dev/openfeature/sdk/TrackingEventDetails.java index 15b0208c0..484672d8a 100644 --- a/src/main/java/dev/openfeature/sdk/TrackingEventDetails.java +++ b/src/main/java/dev/openfeature/sdk/TrackingEventDetails.java @@ -1,6 +1,14 @@ package dev.openfeature.sdk; +import java.util.Optional; + /** * Data pertinent to a particular tracking event. */ -public interface TrackingEventDetails extends Structure {} +public interface TrackingEventDetails extends Structure { + + /** + * Returns the optional numeric tracking value. + */ + Optional getValue(); +} From c33ac2d9b2e91b85fffb3c21653912fe82006351 Mon Sep 17 00:00:00 2001 From: Philipp Fehre Date: Thu, 13 Feb 2025 20:01:58 +0100 Subject: [PATCH 010/391] fix: possible event-related deadlocks with some providers (#1314) * Move event emitting off the main thread to avoid deadlocks When stacking event emitting inside an EventProvider, when using sychronization the EventProvider can deadlock, to avoid this move the event emitting of the main thread. Signed-off-by: Philipp Fehre * Test fixes Test provider should respect the init-delay during all test Signed-off-by: Philipp Fehre * Add timeout to EventProviderTest With the events being executed on a different thread, we need to wait to make sure the thread is scheduled to have the events emitted. Signed-off-by: Philipp Fehre * Don't reuse the JVM Process Signed-off-by: Philipp Fehre --------- Signed-off-by: Philipp Fehre Co-authored-by: Philipp Fehre Co-authored-by: Michael Beemer Co-authored-by: Todd Baert --- pom.xml | 2 + .../dev/openfeature/sdk/EventProvider.java | 30 ++++- .../dev/openfeature/sdk/EventSupport.java | 4 +- .../openfeature/sdk/EventProviderTest.java | 27 ++++- .../java/dev/openfeature/sdk/EventsTest.java | 10 +- .../TestStackedEmitCallsProvider.java | 103 ++++++++++++++++++ 6 files changed, 163 insertions(+), 13 deletions(-) create mode 100644 src/test/java/dev/openfeature/sdk/testutils/TestStackedEmitCallsProvider.java diff --git a/pom.xml b/pom.xml index 8b3ce85af..6fe155ef1 100644 --- a/pom.xml +++ b/pom.xml @@ -265,6 +265,8 @@ maven-surefire-plugin 3.5.2 + 1 + false ${surefireArgLine} diff --git a/src/main/java/dev/openfeature/sdk/EventProvider.java b/src/main/java/dev/openfeature/sdk/EventProvider.java index e9cdae55b..659c6ad46 100644 --- a/src/main/java/dev/openfeature/sdk/EventProvider.java +++ b/src/main/java/dev/openfeature/sdk/EventProvider.java @@ -1,6 +1,10 @@ package dev.openfeature.sdk; import dev.openfeature.sdk.internal.TriConsumer; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; +import lombok.extern.slf4j.Slf4j; /** * Abstract EventProvider. Providers must extend this class to support events. @@ -14,8 +18,10 @@ * * @see FeatureProvider */ +@Slf4j public abstract class EventProvider implements FeatureProvider { private EventProviderListener eventProviderListener; + private final ExecutorService emitterExecutor = Executors.newCachedThreadPool(); void setEventProviderListener(EventProviderListener eventProviderListener) { this.eventProviderListener = eventProviderListener; @@ -46,6 +52,24 @@ void detach() { this.onEmit = null; } + /** + * Stop the event emitter executor and block until either termination has completed + * or timeout period has elapsed. + */ + @Override + public void shutdown() { + emitterExecutor.shutdown(); + try { + if (!emitterExecutor.awaitTermination(EventSupport.SHUTDOWN_TIMEOUT_SECONDS, TimeUnit.SECONDS)) { + log.warn("Emitter executor did not terminate before the timeout period had elapsed"); + emitterExecutor.shutdownNow(); + } + } catch (InterruptedException e) { + emitterExecutor.shutdownNow(); + Thread.currentThread().interrupt(); + } + } + /** * Emit the specified {@link ProviderEvent}. * @@ -56,8 +80,10 @@ public void emit(ProviderEvent event, ProviderEventDetails details) { if (eventProviderListener != null) { eventProviderListener.onEmit(event, details); } - if (this.onEmit != null) { - this.onEmit.accept(this, event, details); + + final TriConsumer localOnEmit = this.onEmit; + if (localOnEmit != null) { + emitterExecutor.submit(() -> localOnEmit.accept(this, event, details)); } } diff --git a/src/main/java/dev/openfeature/sdk/EventSupport.java b/src/main/java/dev/openfeature/sdk/EventSupport.java index d3af45991..5ebe90a4c 100644 --- a/src/main/java/dev/openfeature/sdk/EventSupport.java +++ b/src/main/java/dev/openfeature/sdk/EventSupport.java @@ -19,15 +19,15 @@ @Slf4j class EventSupport { + public static final int SHUTDOWN_TIMEOUT_SECONDS = 3; + // we use a v4 uuid as a "placeholder" for anonymous clients, since // ConcurrentHashMap doesn't support nulls private static final String defaultClientUuid = UUID.randomUUID().toString(); - private static final int SHUTDOWN_TIMEOUT_SECONDS = 3; private final Map handlerStores = new ConcurrentHashMap<>(); private final HandlerStore globalHandlerStore = new HandlerStore(); private final ExecutorService taskExecutor = Executors.newCachedThreadPool(runnable -> { final Thread thread = new Thread(runnable); - thread.setDaemon(true); return thread; }); diff --git a/src/test/java/dev/openfeature/sdk/EventProviderTest.java b/src/test/java/dev/openfeature/sdk/EventProviderTest.java index d8af6e8d3..a159877f0 100644 --- a/src/test/java/dev/openfeature/sdk/EventProviderTest.java +++ b/src/test/java/dev/openfeature/sdk/EventProviderTest.java @@ -5,13 +5,18 @@ import static org.mockito.Mockito.*; import dev.openfeature.sdk.internal.TriConsumer; +import dev.openfeature.sdk.testutils.TestStackedEmitCallsProvider; +import io.cucumber.java.AfterAll; import lombok.SneakyThrows; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Timeout; class EventProviderTest { + private static final int TIMEOUT = 300; + private TestEventProvider eventProvider; @BeforeEach @@ -21,6 +26,11 @@ void setup() { eventProvider.initialize(null); } + @AfterAll + public static void resetDefaultProvider() { + OpenFeatureAPI.getInstance().setProviderAndWait(new NoOpProvider()); + } + @Test @DisplayName("should run attached onEmit with emitters") void emitsEventsWhenAttached() { @@ -34,10 +44,10 @@ void emitsEventsWhenAttached() { eventProvider.emitProviderStale(details); eventProvider.emitProviderError(details); - verify(onEmit, times(2)).accept(eventProvider, ProviderEvent.PROVIDER_READY, details); - verify(onEmit, times(1)).accept(eventProvider, ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, details); - verify(onEmit, times(1)).accept(eventProvider, ProviderEvent.PROVIDER_STALE, details); - verify(onEmit, times(1)).accept(eventProvider, ProviderEvent.PROVIDER_ERROR, details); + verify(onEmit, timeout(TIMEOUT).times(2)).accept(eventProvider, ProviderEvent.PROVIDER_READY, details); + verify(onEmit, timeout(TIMEOUT)).accept(eventProvider, ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, details); + verify(onEmit, timeout(TIMEOUT)).accept(eventProvider, ProviderEvent.PROVIDER_STALE, details); + verify(onEmit, timeout(TIMEOUT)).accept(eventProvider, ProviderEvent.PROVIDER_ERROR, details); } @Test @@ -75,6 +85,15 @@ void doesNotThrowWhenOnEmitSame() { eventProvider.attach(onEmit2); // should not throw, same instance. noop } + @Test + @SneakyThrows + @Timeout(value = 2, threadMode = Timeout.ThreadMode.SEPARATE_THREAD) + @DisplayName("should not deadlock on emit called during emit") + void doesNotDeadlockOnEmitStackedCalls() { + TestStackedEmitCallsProvider provider = new TestStackedEmitCallsProvider(); + OpenFeatureAPI.getInstance().setProviderAndWait(provider); + } + static class TestEventProvider extends EventProvider { private static final String NAME = "TestEventProvider"; diff --git a/src/test/java/dev/openfeature/sdk/EventsTest.java b/src/test/java/dev/openfeature/sdk/EventsTest.java index 02a5953b9..e59024652 100644 --- a/src/test/java/dev/openfeature/sdk/EventsTest.java +++ b/src/test/java/dev/openfeature/sdk/EventsTest.java @@ -19,7 +19,7 @@ class EventsTest { - private static final int TIMEOUT = 300; + private static final int TIMEOUT = 500; private static final int INIT_DELAY = TIMEOUT / 2; @AfterAll @@ -601,13 +601,13 @@ void matchingStaleEventsMustRunImmediately() { OpenFeatureAPI api = OpenFeatureAPI.getInstance(); // provider which is already stale - TestEventsProvider provider = TestEventsProvider.newInitializedTestEventsProvider(); + TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); Client client = api.getClient(name); api.setProviderAndWait(name, provider); provider.emitProviderStale(ProviderEventDetails.builder().build()); assertThat(client.getProviderState()).isEqualTo(ProviderState.STALE); - // should run even thought handler was added after stale + // should run even though handler was added after stale client.onProviderStale(handler); verify(handler, timeout(TIMEOUT)).accept(any()); } @@ -623,13 +623,13 @@ void matchingErrorEventsMustRunImmediately() { OpenFeatureAPI api = OpenFeatureAPI.getInstance(); // provider which is already in error - TestEventsProvider provider = new TestEventsProvider(); + TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); Client client = api.getClient(name); api.setProviderAndWait(name, provider); provider.emitProviderError(ProviderEventDetails.builder().build()); assertThat(client.getProviderState()).isEqualTo(ProviderState.ERROR); - // should run even thought handler was added after error + // should run even though handler was added after error client.onProviderError(handler); verify(handler, timeout(TIMEOUT)).accept(any()); } diff --git a/src/test/java/dev/openfeature/sdk/testutils/TestStackedEmitCallsProvider.java b/src/test/java/dev/openfeature/sdk/testutils/TestStackedEmitCallsProvider.java new file mode 100644 index 000000000..d1bf65c57 --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/testutils/TestStackedEmitCallsProvider.java @@ -0,0 +1,103 @@ +package dev.openfeature.sdk.testutils; + +import dev.openfeature.sdk.EvaluationContext; +import dev.openfeature.sdk.EventProvider; +import dev.openfeature.sdk.Metadata; +import dev.openfeature.sdk.ProviderEvaluation; +import dev.openfeature.sdk.ProviderEvent; +import dev.openfeature.sdk.ProviderEventDetails; +import dev.openfeature.sdk.Value; +import java.util.function.Consumer; + +public class TestStackedEmitCallsProvider extends EventProvider { + private final NestedBlockingEmitter nestedBlockingEmitter = new NestedBlockingEmitter(this::onProviderEvent); + + @Override + public Metadata getMetadata() { + return () -> getClass().getSimpleName(); + } + + @Override + public void initialize(EvaluationContext evaluationContext) throws Exception { + synchronized (nestedBlockingEmitter) { + nestedBlockingEmitter.init(); + while (!nestedBlockingEmitter.isReady()) { + try { + nestedBlockingEmitter.wait(); + } catch (InterruptedException e) { + } + } + } + } + + private void onProviderEvent(ProviderEvent providerEvent) { + synchronized (nestedBlockingEmitter) { + if (providerEvent == ProviderEvent.PROVIDER_READY) { + nestedBlockingEmitter.setReady(); + /* + * This line deadlocked in the original implementation without the emitterExecutor see + * https://github.com/open-feature/java-sdk/issues/1299 + */ + emitProviderReady(ProviderEventDetails.builder().build()); + } + } + } + + @Override + public ProviderEvaluation getBooleanEvaluation(String key, Boolean defaultValue, EvaluationContext ctx) { + throw new UnsupportedOperationException("Unimplemented method 'getBooleanEvaluation'"); + } + + @Override + public ProviderEvaluation getStringEvaluation(String key, String defaultValue, EvaluationContext ctx) { + throw new UnsupportedOperationException("Unimplemented method 'getStringEvaluation'"); + } + + @Override + public ProviderEvaluation getIntegerEvaluation(String key, Integer defaultValue, EvaluationContext ctx) { + throw new UnsupportedOperationException("Unimplemented method 'getIntegerEvaluation'"); + } + + @Override + public ProviderEvaluation getDoubleEvaluation(String key, Double defaultValue, EvaluationContext ctx) { + throw new UnsupportedOperationException("Unimplemented method 'getDoubleEvaluation'"); + } + + @Override + public ProviderEvaluation getObjectEvaluation(String key, Value defaultValue, EvaluationContext ctx) { + throw new UnsupportedOperationException("Unimplemented method 'getObjectEvaluation'"); + } + + static class NestedBlockingEmitter { + + private final Consumer emitProviderEvent; + private volatile boolean isReady; + + public NestedBlockingEmitter(Consumer emitProviderEvent) { + this.emitProviderEvent = emitProviderEvent; + } + + public void init() { + // run init outside monitored thread + new Thread(() -> { + try { + Thread.sleep(500); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + + emitProviderEvent.accept(ProviderEvent.PROVIDER_READY); + }) + .start(); + } + + public boolean isReady() { + return isReady; + } + + public synchronized void setReady() { + isReady = true; + this.notifyAll(); + } + } +} From 9ab26182eae4974b60d166777c51dfcb07957150 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 14:13:05 +0000 Subject: [PATCH 011/391] chore(deps): update dependency net.bytebuddy:byte-buddy to v1.17.1 (#1329) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6fe155ef1..cb3bff866 100644 --- a/pom.xml +++ b/pom.xml @@ -167,7 +167,7 @@ net.bytebuddy byte-buddy - 1.17.0 + 1.17.1 test From 4ba5695eeea6a7ab2fe1d2c595fa482d4b7868dc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 18:13:42 +0000 Subject: [PATCH 012/391] chore(deps): update dependency net.bytebuddy:byte-buddy-agent to v1.17.1 (#1330) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cb3bff866..1f5bf005b 100644 --- a/pom.xml +++ b/pom.xml @@ -174,7 +174,7 @@ net.bytebuddy byte-buddy-agent - 1.17.0 + 1.17.1 test From 9e782308d3b1baa66841c4151389c28e0f947d7b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2025 11:18:26 +0100 Subject: [PATCH 013/391] chore(main): release 1.14.1 (#1278) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 55 +++++++++++++++++++++++++++++++++++ README.md | 8 ++--- pom.xml | 2 +- version.txt | 2 +- 5 files changed, 62 insertions(+), 7 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e2d18dc18..f459d7afd 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{".":"1.14.0"} \ No newline at end of file +{".":"1.14.1"} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f7000d46..6301fce0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,60 @@ # Changelog +## [1.14.1](https://github.com/open-feature/java-sdk/compare/v1.14.0...v1.14.1) (2025-02-14) + + +### ๐Ÿ› Bug Fixes + +* **deps:** update dependency io.cucumber:cucumber-bom to v7.21.0 ([#1312](https://github.com/open-feature/java-sdk/issues/1312)) ([208411e](https://github.com/open-feature/java-sdk/commit/208411e72338e37bf477ac0b784bbbbe0309b922)) +* **deps:** update dependency io.cucumber:cucumber-bom to v7.21.1 ([#1317](https://github.com/open-feature/java-sdk/issues/1317)) ([b797883](https://github.com/open-feature/java-sdk/commit/b7978832b786fe081169ff0efeb702218300c622)) +* possible event-related deadlocks with some providers ([#1314](https://github.com/open-feature/java-sdk/issues/1314)) ([c33ac2d](https://github.com/open-feature/java-sdk/commit/c33ac2d9b2e91b85fffb3c21653912fe82006351)) +* TrackingEventDetails interface to include numeric getValue() call ([#1328](https://github.com/open-feature/java-sdk/issues/1328)) ([08c38fb](https://github.com/open-feature/java-sdk/commit/08c38fb553d82a42682c3eb9239329f770063898)) + + +### ๐Ÿงน Chore + +* **deps:** update actions/cache digest to 9fa7e61 ([#1324](https://github.com/open-feature/java-sdk/issues/1324)) ([69cdc77](https://github.com/open-feature/java-sdk/commit/69cdc772a639470dd223bf70ef6e9f8bc4d93dea)) +* **deps:** update actions/checkout digest to 85e6279 ([#1287](https://github.com/open-feature/java-sdk/issues/1287)) ([640e35e](https://github.com/open-feature/java-sdk/commit/640e35e85375e3098f61b7397432d80a95502bdd)) +* **deps:** update actions/setup-java digest to 28b532b ([#1296](https://github.com/open-feature/java-sdk/issues/1296)) ([874e86d](https://github.com/open-feature/java-sdk/commit/874e86df5c22a1e5771ca16c76aa13039b5f9b65)) +* **deps:** update actions/setup-java digest to 3a4f6e1 ([#1306](https://github.com/open-feature/java-sdk/issues/1306)) ([ba9cc4b](https://github.com/open-feature/java-sdk/commit/ba9cc4b85a1082d638d49b9d2d0a4ed5a45f09ee)) +* **deps:** update actions/setup-java digest to 51ab6d2 ([#1288](https://github.com/open-feature/java-sdk/issues/1288)) ([c69d3a4](https://github.com/open-feature/java-sdk/commit/c69d3a4bd137c1d6baa47c14228bfe8f96555676)) +* **deps:** update actions/setup-java digest to 99d3141 ([#1285](https://github.com/open-feature/java-sdk/issues/1285)) ([32a3933](https://github.com/open-feature/java-sdk/commit/32a39335de8e61650905fc96dc1a73e65f1fe9f8)) +* **deps:** update codecov/codecov-action action to v5.2.0 ([#1298](https://github.com/open-feature/java-sdk/issues/1298)) ([531fc38](https://github.com/open-feature/java-sdk/commit/531fc385b662c5b7b334fee298fc9fe1283c78fb)) +* **deps:** update codecov/codecov-action action to v5.3.0 ([#1301](https://github.com/open-feature/java-sdk/issues/1301)) ([f7f6586](https://github.com/open-feature/java-sdk/commit/f7f6586d72e3f112a7dafc8f77de273ed49ccc4b)) +* **deps:** update codecov/codecov-action action to v5.3.1 ([#1303](https://github.com/open-feature/java-sdk/issues/1303)) ([f9fa54b](https://github.com/open-feature/java-sdk/commit/f9fa54be493e1d0843b709008eb0f047e7580d47)) +* **deps:** update dependency net.bytebuddy:byte-buddy to v1.16.0 ([#1289](https://github.com/open-feature/java-sdk/issues/1289)) ([0b5b423](https://github.com/open-feature/java-sdk/commit/0b5b423bdd378bb1db3e10fe5da7fa2c937a4610)) +* **deps:** update dependency net.bytebuddy:byte-buddy to v1.16.1 ([#1292](https://github.com/open-feature/java-sdk/issues/1292)) ([0af9f29](https://github.com/open-feature/java-sdk/commit/0af9f2901f88b5ef9bed0c570d426939a55af3cf)) +* **deps:** update dependency net.bytebuddy:byte-buddy to v1.17.0 ([#1309](https://github.com/open-feature/java-sdk/issues/1309)) ([cda3405](https://github.com/open-feature/java-sdk/commit/cda34053f7e39318205a181ef93c825bab2ed9fc)) +* **deps:** update dependency net.bytebuddy:byte-buddy to v1.17.1 ([#1329](https://github.com/open-feature/java-sdk/issues/1329)) ([9ab2618](https://github.com/open-feature/java-sdk/commit/9ab26182eae4974b60d166777c51dfcb07957150)) +* **deps:** update dependency net.bytebuddy:byte-buddy-agent to v1.16.0 ([#1290](https://github.com/open-feature/java-sdk/issues/1290)) ([6c4205a](https://github.com/open-feature/java-sdk/commit/6c4205a00817af260ef9b90f54ce878cad33f75a)) +* **deps:** update dependency net.bytebuddy:byte-buddy-agent to v1.16.1 ([#1293](https://github.com/open-feature/java-sdk/issues/1293)) ([6071932](https://github.com/open-feature/java-sdk/commit/6071932cb4207dc83cdedfa67c8a69ed71d9c26a)) +* **deps:** update dependency net.bytebuddy:byte-buddy-agent to v1.17.0 ([#1310](https://github.com/open-feature/java-sdk/issues/1310)) ([40fa173](https://github.com/open-feature/java-sdk/commit/40fa1733382f4c476a1228c6499044ad83c8f3c4)) +* **deps:** update dependency net.bytebuddy:byte-buddy-agent to v1.17.1 ([#1330](https://github.com/open-feature/java-sdk/issues/1330)) ([4ba5695](https://github.com/open-feature/java-sdk/commit/4ba5695eeea6a7ab2fe1d2c595fa482d4b7868dc)) +* **deps:** update dependency org.assertj:assertj-core to v3.27.3 ([#1291](https://github.com/open-feature/java-sdk/issues/1291)) ([a5eb21d](https://github.com/open-feature/java-sdk/commit/a5eb21d1a2e6945a4455cacde898bc913bddb96d)) +* **deps:** update github/codeql-action digest to 0701025 ([#1311](https://github.com/open-feature/java-sdk/issues/1311)) ([9a1e9ab](https://github.com/open-feature/java-sdk/commit/9a1e9abd64220c8d8706f2a64e041ef3f37e1a43)) +* **deps:** update github/codeql-action digest to 08bc0cf ([#1313](https://github.com/open-feature/java-sdk/issues/1313)) ([37ed6a4](https://github.com/open-feature/java-sdk/commit/37ed6a424cdc013ed74c9881826cc56c93ae8228)) +* **deps:** update github/codeql-action digest to 0a35e8f ([#1316](https://github.com/open-feature/java-sdk/issues/1316)) ([26e1d7f](https://github.com/open-feature/java-sdk/commit/26e1d7fff342a32880542efa87b017aec506667e)) +* **deps:** update github/codeql-action digest to 0f1559a ([#1286](https://github.com/open-feature/java-sdk/issues/1286)) ([882d2dd](https://github.com/open-feature/java-sdk/commit/882d2dd5bdac007e8a3783efc54fa45faed22054)) +* **deps:** update github/codeql-action digest to 10a3f07 ([#1280](https://github.com/open-feature/java-sdk/issues/1280)) ([a3854d6](https://github.com/open-feature/java-sdk/commit/a3854d6ab1dba99f4db18f868e89fcc04418e306)) +* **deps:** update github/codeql-action digest to 1c15a48 ([#1325](https://github.com/open-feature/java-sdk/issues/1325)) ([3baf0df](https://github.com/open-feature/java-sdk/commit/3baf0df966f8212864aa7e57bc3d3d09d324fe11)) +* **deps:** update github/codeql-action digest to 1efc6bb ([#1281](https://github.com/open-feature/java-sdk/issues/1281)) ([8a1ab7e](https://github.com/open-feature/java-sdk/commit/8a1ab7ea18aff4ee5a6a2fdd1f805b08e51a50a3)) +* **deps:** update github/codeql-action digest to 24e1c2d ([#1315](https://github.com/open-feature/java-sdk/issues/1315)) ([46903c6](https://github.com/open-feature/java-sdk/commit/46903c6f275e5f9dc8884acf3f76f76efcfc58bd)) +* **deps:** update github/codeql-action digest to 3b4f4d9 ([#1282](https://github.com/open-feature/java-sdk/issues/1282)) ([b390d5f](https://github.com/open-feature/java-sdk/commit/b390d5f0b0945948cd6b87e6486725d095d5ac8a)) +* **deps:** update github/codeql-action digest to 43cffee ([#1304](https://github.com/open-feature/java-sdk/issues/1304)) ([6874de6](https://github.com/open-feature/java-sdk/commit/6874de64ce589e853f5523019bfa9e1d60840baf)) +* **deps:** update github/codeql-action digest to 54b1c84 ([#1307](https://github.com/open-feature/java-sdk/issues/1307)) ([6f36434](https://github.com/open-feature/java-sdk/commit/6f36434c520dcef27deb04e04941693dc15acb2f)) +* **deps:** update github/codeql-action digest to 5f4f998 ([#1305](https://github.com/open-feature/java-sdk/issues/1305)) ([7916d76](https://github.com/open-feature/java-sdk/commit/7916d76635c5ab59dafe6d72058aad9cfcf05f4b)) +* **deps:** update github/codeql-action digest to 6063925 ([#1320](https://github.com/open-feature/java-sdk/issues/1320)) ([538140d](https://github.com/open-feature/java-sdk/commit/538140dfe713a421623b179e69b399f82200fe61)) +* **deps:** update github/codeql-action digest to 7e3036b ([#1300](https://github.com/open-feature/java-sdk/issues/1300)) ([3491956](https://github.com/open-feature/java-sdk/commit/34919561b73faa0cca489ad480e93cca9a854167)) +* **deps:** update github/codeql-action digest to 87fc816 ([#1277](https://github.com/open-feature/java-sdk/issues/1277)) ([c2a82db](https://github.com/open-feature/java-sdk/commit/c2a82dbdbafa134fae4b0c9aef88cf589e09aefa)) +* **deps:** update github/codeql-action digest to 93da9f2 ([#1283](https://github.com/open-feature/java-sdk/issues/1283)) ([45b3995](https://github.com/open-feature/java-sdk/commit/45b3995bdad9f1b05abb01455a9c8f57028cfde5)) +* **deps:** update github/codeql-action digest to affec20 ([#1323](https://github.com/open-feature/java-sdk/issues/1323)) ([8f3ced5](https://github.com/open-feature/java-sdk/commit/8f3ced590764760244cc81ac10c939ca62504dfe)) +* **deps:** update github/codeql-action digest to b44b19f ([#1297](https://github.com/open-feature/java-sdk/issues/1297)) ([305e032](https://github.com/open-feature/java-sdk/commit/305e0329e78116fe697240e420879ac85012d698)) +* **deps:** update github/codeql-action digest to d90e07f ([#1294](https://github.com/open-feature/java-sdk/issues/1294)) ([5671184](https://github.com/open-feature/java-sdk/commit/5671184e7f76f979d631c18bb2ebfb15dccfb207)) +* **deps:** update github/codeql-action digest to db7177a ([#1279](https://github.com/open-feature/java-sdk/issues/1279)) ([b997946](https://github.com/open-feature/java-sdk/commit/b997946db1c7663b7ebb775ad45cdb2b0aaeb291)) +* **deps:** update github/codeql-action digest to e7c0c9d ([#1302](https://github.com/open-feature/java-sdk/issues/1302)) ([78adc77](https://github.com/open-feature/java-sdk/commit/78adc77c23da6116e1f58b3a45dc283c3c58837b)) +* **deps:** update github/codeql-action digest to e9987ad ([#1308](https://github.com/open-feature/java-sdk/issues/1308)) ([99d8185](https://github.com/open-feature/java-sdk/commit/99d818572a3407ca6b25f6e91f69ef3e83bdc657)) +* **deps:** update github/codeql-action digest to f89b8a7 ([#1295](https://github.com/open-feature/java-sdk/issues/1295)) ([122e82f](https://github.com/open-feature/java-sdk/commit/122e82f8431fb116ae3b147f7e2245d7f90b1c77)) + ## [1.14.0](https://github.com/open-feature/java-sdk/compare/v1.13.0...v1.14.0) (2025-01-10) diff --git a/README.md b/README.md index cbb9d9f13..49d5562e0 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ - - Release + + Release @@ -59,7 +59,7 @@ Note that this library is intended to be used in server-side contexts and has no dev.openfeature sdk - 1.14.0 + 1.14.1 ``` @@ -84,7 +84,7 @@ If you would like snapshot builds, this is the relevant repository information: ```groovy dependencies { - implementation 'dev.openfeature:sdk:1.14.0' + implementation 'dev.openfeature:sdk:1.14.1' } ``` diff --git a/pom.xml b/pom.xml index 1f5bf005b..a6a54e5ae 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ dev.openfeature sdk - 1.14.0 + 1.14.1 UTF-8 diff --git a/version.txt b/version.txt index 850e74240..63e799cf4 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.14.0 +1.14.1 From 859a36cbfafc94d4601b87d304237e6ddf97c08d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2025 18:05:19 +0000 Subject: [PATCH 014/391] chore(deps): update github/codeql-action digest to 8c1551c (#1333) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 6e3c40f48..78ce975a4 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -20,7 +20,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@1c15a48f3fb49ce535e9ee4e57e127315f669361 + uses: github/codeql-action/init@8c1551cdd4accfcf33820b75a096d845a88e8642 with: languages: java @@ -45,4 +45,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@1c15a48f3fb49ce535e9ee4e57e127315f669361 + uses: github/codeql-action/analyze@8c1551cdd4accfcf33820b75a096d845a88e8642 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 85313855b..8143c1f4f 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@1c15a48f3fb49ce535e9ee4e57e127315f669361 + uses: github/codeql-action/init@8c1551cdd4accfcf33820b75a096d845a88e8642 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@1c15a48f3fb49ce535e9ee4e57e127315f669361 + uses: github/codeql-action/autobuild@8c1551cdd4accfcf33820b75a096d845a88e8642 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@1c15a48f3fb49ce535e9ee4e57e127315f669361 + uses: github/codeql-action/analyze@8c1551cdd4accfcf33820b75a096d845a88e8642 From 5436eb0d5db3a0e9bd9289fbef57b9eeada0a667 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 18 Feb 2025 02:28:02 +0000 Subject: [PATCH 015/391] chore(deps): update github/codeql-action digest to acadfed (#1335) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 78ce975a4..0f83d29a5 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -20,7 +20,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@8c1551cdd4accfcf33820b75a096d845a88e8642 + uses: github/codeql-action/init@acadfedea5aa91c818900c9dbea3ec271259c919 with: languages: java @@ -45,4 +45,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@8c1551cdd4accfcf33820b75a096d845a88e8642 + uses: github/codeql-action/analyze@acadfedea5aa91c818900c9dbea3ec271259c919 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 8143c1f4f..b6e2a3f75 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@8c1551cdd4accfcf33820b75a096d845a88e8642 + uses: github/codeql-action/init@acadfedea5aa91c818900c9dbea3ec271259c919 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@8c1551cdd4accfcf33820b75a096d845a88e8642 + uses: github/codeql-action/autobuild@acadfedea5aa91c818900c9dbea3ec271259c919 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@8c1551cdd4accfcf33820b75a096d845a88e8642 + uses: github/codeql-action/analyze@acadfedea5aa91c818900c9dbea3ec271259c919 From e163ce1c060d0dc8812e4a8a3b37f52b0156324d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 18 Feb 2025 14:48:26 +0000 Subject: [PATCH 016/391] chore(deps): update github/codeql-action digest to 1bb15d0 (#1336) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 0f83d29a5..70dbb28f6 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -20,7 +20,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@acadfedea5aa91c818900c9dbea3ec271259c919 + uses: github/codeql-action/init@1bb15d06a6fbb5d9d9ffd228746bf8ee208caec8 with: languages: java @@ -45,4 +45,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@acadfedea5aa91c818900c9dbea3ec271259c919 + uses: github/codeql-action/analyze@1bb15d06a6fbb5d9d9ffd228746bf8ee208caec8 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index b6e2a3f75..8bf7512fa 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@acadfedea5aa91c818900c9dbea3ec271259c919 + uses: github/codeql-action/init@1bb15d06a6fbb5d9d9ffd228746bf8ee208caec8 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@acadfedea5aa91c818900c9dbea3ec271259c919 + uses: github/codeql-action/autobuild@1bb15d06a6fbb5d9d9ffd228746bf8ee208caec8 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@acadfedea5aa91c818900c9dbea3ec271259c919 + uses: github/codeql-action/analyze@1bb15d06a6fbb5d9d9ffd228746bf8ee208caec8 From 88baa65dd0568b75d64f7f657563e04ee81c1d8c Mon Sep 17 00:00:00 2001 From: Simon Schrottner Date: Tue, 18 Feb 2025 19:19:18 +0100 Subject: [PATCH 017/391] test: Reduce usage of singelton within our tests and implementations (#1331) Our tests are great, but often we rely on our own Singelton for testing purposes. This can create concurrency issues or make testing really hard. By instantiating a own API object for each test we ensure that we are not messing with each other. Furthermore we should not use `.getInstance()` within our own implementation. Signed-off-by: Simon Schrottner Co-authored-by: Todd Baert --- pom.xml | 9 ++ .../dev/openfeature/sdk/OpenFeatureAPI.java | 4 +- .../openfeature/sdk/OpenFeatureClient.java | 4 +- .../openfeature/sdk/ProviderRepository.java | 7 +- .../sdk/AlwaysBrokenWithDetailsProvider.java | 8 +- ...=> AlwaysBrokenWithExceptionProvider.java} | 2 +- .../sdk/ClientProviderMappingTest.java | 7 +- .../sdk/DeveloperExperienceTest.java | 28 ++-- .../openfeature/sdk/EventProviderTest.java | 4 +- .../java/dev/openfeature/sdk/EventsTest.java | 128 +++++++++--------- .../sdk/FlagEvaluationSpecTest.java | 59 +++----- .../dev/openfeature/sdk/HookSpecTest.java | 38 +++--- .../sdk/InitializeBehaviorSpecTest.java | 14 +- ...ingTest.java => LockingSingeltonTest.java} | 2 +- .../sdk/OpenFeatureAPISingeltonTest.java | 17 +++ .../openfeature/sdk/OpenFeatureAPITest.java | 52 +++---- .../sdk/OpenFeatureAPITestUtil.java | 10 ++ .../sdk/OpenFeatureClientTest.java | 6 +- .../sdk/ProviderRepositoryTest.java | 2 +- .../sdk/ShutdownBehaviorSpecTest.java | 19 ++- .../dev/openfeature/sdk/TrackingSpecTest.java | 11 +- .../sdk/arch/ArchitectureTest.java | 27 ++++ .../memory/InMemoryProviderTest.java | 17 ++- .../testutils/FeatureProviderTestUtils.java | 31 ----- 24 files changed, 259 insertions(+), 247 deletions(-) rename src/test/java/dev/openfeature/sdk/{AlwaysBrokenProvider.java => AlwaysBrokenWithExceptionProvider.java} (94%) rename src/test/java/dev/openfeature/sdk/{LockingTest.java => LockingSingeltonTest.java} (99%) create mode 100644 src/test/java/dev/openfeature/sdk/OpenFeatureAPISingeltonTest.java create mode 100644 src/test/java/dev/openfeature/sdk/OpenFeatureAPITestUtil.java create mode 100644 src/test/java/dev/openfeature/sdk/arch/ArchitectureTest.java delete mode 100644 src/test/java/dev/openfeature/sdk/testutils/FeatureProviderTestUtils.java diff --git a/pom.xml b/pom.xml index a6a54e5ae..bbc1b8db7 100644 --- a/pom.xml +++ b/pom.xml @@ -67,6 +67,13 @@ + + com.tngtech.archunit + archunit-junit5 + 1.4.0 + test + + org.mockito mockito-core @@ -242,12 +249,14 @@ com.github.spotbugs:* org.junit* + com.tngtech.archunit* org.simplify4u:slf4j2-mock* com.google.guava* io.cucumber* org.junit* + com.tngtech.archunit* com.google.code.findbugs* com.github.spotbugs* org.simplify4u:slf4j-mock-common:* diff --git a/src/main/java/dev/openfeature/sdk/OpenFeatureAPI.java b/src/main/java/dev/openfeature/sdk/OpenFeatureAPI.java index 9175a7cd7..bd60cc78a 100644 --- a/src/main/java/dev/openfeature/sdk/OpenFeatureAPI.java +++ b/src/main/java/dev/openfeature/sdk/OpenFeatureAPI.java @@ -29,7 +29,7 @@ public class OpenFeatureAPI implements EventBus { protected OpenFeatureAPI() { apiHooks = new ArrayList<>(); - providerRepository = new ProviderRepository(); + providerRepository = new ProviderRepository(this); eventSupport = new EventSupport(); transactionContextPropagator = new NoOpTransactionContextPropagator(); } @@ -333,7 +333,7 @@ public void shutdown() { providerRepository.shutdown(); eventSupport.shutdown(); - providerRepository = new ProviderRepository(); + providerRepository = new ProviderRepository(this); eventSupport = new EventSupport(); } } diff --git a/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java b/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java index 66f25f60a..a393d83e8 100644 --- a/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java +++ b/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java @@ -507,7 +507,7 @@ public Client onProviderStale(Consumer handler) { */ @Override public Client on(ProviderEvent event, Consumer handler) { - OpenFeatureAPI.getInstance().addHandler(domain, event, handler); + openfeatureApi.addHandler(domain, event, handler); return this; } @@ -516,7 +516,7 @@ public Client on(ProviderEvent event, Consumer handler) { */ @Override public Client removeHandler(ProviderEvent event, Consumer handler) { - OpenFeatureAPI.getInstance().removeHandler(domain, event, handler); + openfeatureApi.removeHandler(domain, event, handler); return this; } } diff --git a/src/main/java/dev/openfeature/sdk/ProviderRepository.java b/src/main/java/dev/openfeature/sdk/ProviderRepository.java index bec866820..ab024a750 100644 --- a/src/main/java/dev/openfeature/sdk/ProviderRepository.java +++ b/src/main/java/dev/openfeature/sdk/ProviderRepository.java @@ -28,6 +28,11 @@ class ProviderRepository { return thread; }); private final Object registerStateManagerLock = new Object(); + private final OpenFeatureAPI openFeatureAPI; + + public ProviderRepository(OpenFeatureAPI openFeatureAPI) { + this.openFeatureAPI = openFeatureAPI; + } FeatureProviderStateManager getFeatureProviderStateManager() { return defaultStateManger.get(); @@ -205,7 +210,7 @@ private void initializeProvider( FeatureProviderStateManager oldManager) { try { if (ProviderState.NOT_READY.equals(newManager.getState())) { - newManager.initialize(OpenFeatureAPI.getInstance().getEvaluationContext()); + newManager.initialize(openFeatureAPI.getEvaluationContext()); afterInit.accept(newManager.getProvider()); } shutDownOld(oldManager, afterShutdown); diff --git a/src/test/java/dev/openfeature/sdk/AlwaysBrokenWithDetailsProvider.java b/src/test/java/dev/openfeature/sdk/AlwaysBrokenWithDetailsProvider.java index 8f304eaac..bd0ac2c21 100644 --- a/src/test/java/dev/openfeature/sdk/AlwaysBrokenWithDetailsProvider.java +++ b/src/test/java/dev/openfeature/sdk/AlwaysBrokenWithDetailsProvider.java @@ -1,14 +1,12 @@ package dev.openfeature.sdk; -import dev.openfeature.sdk.exceptions.FlagNotFoundError; - public class AlwaysBrokenWithDetailsProvider implements FeatureProvider { + private final String name = "always broken with details"; + @Override public Metadata getMetadata() { - return () -> { - throw new FlagNotFoundError(TestConstants.BROKEN_MESSAGE); - }; + return () -> name; } @Override diff --git a/src/test/java/dev/openfeature/sdk/AlwaysBrokenProvider.java b/src/test/java/dev/openfeature/sdk/AlwaysBrokenWithExceptionProvider.java similarity index 94% rename from src/test/java/dev/openfeature/sdk/AlwaysBrokenProvider.java rename to src/test/java/dev/openfeature/sdk/AlwaysBrokenWithExceptionProvider.java index 2f214d8ac..0ad09db29 100644 --- a/src/test/java/dev/openfeature/sdk/AlwaysBrokenProvider.java +++ b/src/test/java/dev/openfeature/sdk/AlwaysBrokenWithExceptionProvider.java @@ -2,7 +2,7 @@ import dev.openfeature.sdk.exceptions.FlagNotFoundError; -public class AlwaysBrokenProvider implements FeatureProvider { +public class AlwaysBrokenWithExceptionProvider implements FeatureProvider { private final String name = "always broken"; diff --git a/src/test/java/dev/openfeature/sdk/ClientProviderMappingTest.java b/src/test/java/dev/openfeature/sdk/ClientProviderMappingTest.java index cd7e8b295..beadf7aad 100644 --- a/src/test/java/dev/openfeature/sdk/ClientProviderMappingTest.java +++ b/src/test/java/dev/openfeature/sdk/ClientProviderMappingTest.java @@ -2,17 +2,16 @@ import static org.junit.jupiter.api.Assertions.*; -import dev.openfeature.sdk.testutils.FeatureProviderTestUtils; import org.junit.jupiter.api.Test; class ClientProviderMappingTest { @Test void clientProviderTest() { - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); + OpenFeatureAPI api = new OpenFeatureAPI(); - FeatureProviderTestUtils.setFeatureProvider("client1", new DoSomethingProvider()); - FeatureProviderTestUtils.setFeatureProvider("client2", new NoOpProvider()); + api.setProviderAndWait("client1", new DoSomethingProvider()); + api.setProviderAndWait("client2", new NoOpProvider()); Client c1 = api.getClient("client1"); Client c2 = api.getClient("client2"); diff --git a/src/test/java/dev/openfeature/sdk/DeveloperExperienceTest.java b/src/test/java/dev/openfeature/sdk/DeveloperExperienceTest.java index aacf09169..32fa605c2 100644 --- a/src/test/java/dev/openfeature/sdk/DeveloperExperienceTest.java +++ b/src/test/java/dev/openfeature/sdk/DeveloperExperienceTest.java @@ -8,7 +8,6 @@ import static org.mockito.Mockito.verify; import dev.openfeature.sdk.fixtures.HookFixtures; -import dev.openfeature.sdk.testutils.FeatureProviderTestUtils; import dev.openfeature.sdk.testutils.TestEventsProvider; import java.util.Arrays; import java.util.HashMap; @@ -16,14 +15,20 @@ import java.util.Map; import java.util.Optional; import lombok.SneakyThrows; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; class DeveloperExperienceTest implements HookFixtures { transient String flagKey = "mykey"; + private OpenFeatureAPI api; + + @BeforeEach + public void setUp() throws Exception { + api = new OpenFeatureAPI(); + } @Test void simpleBooleanFlag() { - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); api.setProviderAndWait(new TestEventsProvider()); Client client = api.getClient(); Boolean retval = client.getBooleanValue(flagKey, false); @@ -34,7 +39,6 @@ void simpleBooleanFlag() { void clientHooks() { Hook exampleHook = mockBooleanHook(); - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); api.setProviderAndWait(new TestEventsProvider()); Client client = api.getClient(); client.addHooks(exampleHook); @@ -48,7 +52,6 @@ void evalHooks() { Hook clientHook = mockBooleanHook(); Hook evalHook = mockBooleanHook(); - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); api.setProviderAndWait(new TestEventsProvider()); Client client = api.getClient(); client.addHooks(clientHook); @@ -69,7 +72,6 @@ void evalHooks() { @Test void providingContext() { - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); api.setProviderAndWait(new TestEventsProvider()); Client client = api.getClient(); Map attributes = new HashMap<>(); @@ -86,8 +88,7 @@ void providingContext() { @Test void brokenProvider() { - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); - FeatureProviderTestUtils.setFeatureProvider(new AlwaysBrokenProvider()); + api.setProviderAndWait(new AlwaysBrokenWithExceptionProvider()); Client client = api.getClient(); FlagEvaluationDetails retval = client.getBooleanDetails(flagKey, false); assertEquals(ErrorCode.FLAG_NOT_FOUND, retval.getErrorCode()); @@ -99,6 +100,9 @@ void brokenProvider() { @Test void providerLockedPerTransaction() { + final String defaultValue = "string-value"; + final OpenFeatureAPI api = new OpenFeatureAPI(); + class MutatingHook implements Hook { @Override @@ -106,16 +110,14 @@ class MutatingHook implements Hook { // change the provider during a before hook - this should not impact the evaluation in progress public Optional before(HookContext ctx, Map hints) { - FeatureProviderTestUtils.setFeatureProvider(TestEventsProvider.newInitializedTestEventsProvider()); + api.setProviderAndWait(TestEventsProvider.newInitializedTestEventsProvider()); return Optional.empty(); } } - final String defaultValue = "string-value"; - final OpenFeatureAPI api = OpenFeatureAPI.getInstance(); final Client client = api.getClient(); - FeatureProviderTestUtils.setFeatureProvider(new DoSomethingProvider()); + api.setProviderAndWait(new DoSomethingProvider()); api.addHooks(new MutatingHook()); // if provider is changed during an evaluation transaction it should proceed with the original provider @@ -132,7 +134,6 @@ public Optional before(HookContext ctx, Map hints) { @Test void setProviderAndWaitShouldPutTheProviderInReadyState() { String domain = "domain"; - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); api.setProviderAndWait(domain, new TestEventsProvider()); Client client = api.getClient(domain); assertThat(client.getProviderState()).isEqualTo(ProviderState.READY); @@ -145,7 +146,6 @@ void setProviderAndWaitShouldPutTheProviderInReadyState() { @Test void shouldPutTheProviderInStateErrorAfterEmittingErrorEvent() { String domain = "domain"; - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); TestEventsProvider provider = new TestEventsProvider(); api.setProviderAndWait(domain, provider); Client client = api.getClient(domain); @@ -161,7 +161,6 @@ void shouldPutTheProviderInStateErrorAfterEmittingErrorEvent() { @Test void shouldPutTheProviderInStateStaleAfterEmittingStaleEvent() { String domain = "domain"; - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); TestEventsProvider provider = new TestEventsProvider(); api.setProviderAndWait(domain, provider); Client client = api.getClient(domain); @@ -177,7 +176,6 @@ void shouldPutTheProviderInStateStaleAfterEmittingStaleEvent() { @Test void shouldPutTheProviderInStateReadyAfterEmittingReadyEvent() { String domain = "domain"; - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); TestEventsProvider provider = new TestEventsProvider(); api.setProviderAndWait(domain, provider); Client client = api.getClient(domain); diff --git a/src/test/java/dev/openfeature/sdk/EventProviderTest.java b/src/test/java/dev/openfeature/sdk/EventProviderTest.java index a159877f0..ebf8901cb 100644 --- a/src/test/java/dev/openfeature/sdk/EventProviderTest.java +++ b/src/test/java/dev/openfeature/sdk/EventProviderTest.java @@ -28,7 +28,7 @@ void setup() { @AfterAll public static void resetDefaultProvider() { - OpenFeatureAPI.getInstance().setProviderAndWait(new NoOpProvider()); + new OpenFeatureAPI().setProviderAndWait(new NoOpProvider()); } @Test @@ -91,7 +91,7 @@ void doesNotThrowWhenOnEmitSame() { @DisplayName("should not deadlock on emit called during emit") void doesNotDeadlockOnEmitStackedCalls() { TestStackedEmitCallsProvider provider = new TestStackedEmitCallsProvider(); - OpenFeatureAPI.getInstance().setProviderAndWait(provider); + new OpenFeatureAPI().setProviderAndWait(provider); } static class TestEventProvider extends EventProvider { diff --git a/src/test/java/dev/openfeature/sdk/EventsTest.java b/src/test/java/dev/openfeature/sdk/EventsTest.java index e59024652..157c0bafe 100644 --- a/src/test/java/dev/openfeature/sdk/EventsTest.java +++ b/src/test/java/dev/openfeature/sdk/EventsTest.java @@ -7,11 +7,11 @@ import static org.mockito.Mockito.*; import dev.openfeature.sdk.testutils.TestEventsProvider; -import io.cucumber.java.AfterAll; import java.util.Arrays; import java.util.List; import java.util.function.Consumer; import lombok.SneakyThrows; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; @@ -21,10 +21,11 @@ class EventsTest { private static final int TIMEOUT = 500; private static final int INIT_DELAY = TIMEOUT / 2; + private OpenFeatureAPI api; - @AfterAll - public static void resetDefaultProvider() { - OpenFeatureAPI.getInstance().setProviderAndWait(new NoOpProvider()); + @BeforeEach + public void setUp() throws Exception { + api = new OpenFeatureAPI(); } @Nested @@ -49,8 +50,8 @@ void apiInitReady() { final String name = "apiInitReady"; TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); - OpenFeatureAPI.getInstance().onProviderReady(handler); - OpenFeatureAPI.getInstance().setProviderAndWait(name, provider); + api.onProviderReady(handler); + api.setProviderAndWait(name, provider); verify(handler, timeout(TIMEOUT).atLeastOnce()).accept(any()); } @@ -66,8 +67,8 @@ void apiInitError() { final String errMessage = "oh no!"; TestEventsProvider provider = new TestEventsProvider(INIT_DELAY, true, errMessage); - OpenFeatureAPI.getInstance().onProviderError(handler); - OpenFeatureAPI.getInstance().setProvider(name, provider); + api.onProviderError(handler); + api.setProvider(name, provider); verify(handler, timeout(TIMEOUT)).accept(argThat(details -> { return errMessage.equals(details.getMessage()); })); @@ -89,8 +90,8 @@ void apiShouldPropagateEvents() { final String name = "apiShouldPropagateEvents"; TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); - OpenFeatureAPI.getInstance().setProviderAndWait(name, provider); - OpenFeatureAPI.getInstance().onProviderConfigurationChanged(handler); + api.setProviderAndWait(name, provider); + api.onProviderConfigurationChanged(handler); provider.mockEvent( ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, @@ -118,12 +119,12 @@ void apiShouldSupportAllEventTypes() { final Consumer handler4 = mockHandler(); TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); - OpenFeatureAPI.getInstance().setProviderAndWait(name, provider); + api.setProviderAndWait(name, provider); - OpenFeatureAPI.getInstance().onProviderReady(handler1); - OpenFeatureAPI.getInstance().onProviderConfigurationChanged(handler2); - OpenFeatureAPI.getInstance().onProviderStale(handler3); - OpenFeatureAPI.getInstance().onProviderError(handler4); + api.onProviderReady(handler1); + api.onProviderConfigurationChanged(handler2); + api.onProviderStale(handler3); + api.onProviderError(handler4); Arrays.asList(ProviderEvent.values()).stream().forEach(eventType -> { provider.mockEvent( @@ -162,8 +163,8 @@ void shouldPropagateDefaultAndAnon() { TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); // set provider before getting a client - OpenFeatureAPI.getInstance().setProviderAndWait(provider); - Client client = OpenFeatureAPI.getInstance().getClient(); + api.setProviderAndWait(provider); + Client client = api.getClient(); client.onProviderStale(handler); provider.mockEvent( @@ -183,8 +184,8 @@ void shouldPropagateDefaultAndNamed() { TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); // set provider before getting a client - OpenFeatureAPI.getInstance().setProviderAndWait(provider); - Client client = OpenFeatureAPI.getInstance().getClient(name); + api.setProviderAndWait(provider); + Client client = api.getClient(name); client.onProviderStale(handler); provider.mockEvent( @@ -213,10 +214,10 @@ void initReadyProviderBefore() { final String name = "initReadyProviderBefore"; TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); - Client client = OpenFeatureAPI.getInstance().getClient(name); + Client client = api.getClient(name); client.onProviderReady(handler); // set provider after getting a client - OpenFeatureAPI.getInstance().setProviderAndWait(name, provider); + api.setProviderAndWait(name, provider); verify(handler, timeout(TIMEOUT).atLeastOnce()) .accept(argThat(details -> details.getDomain().equals(name))); } @@ -233,8 +234,8 @@ void initReadyProviderAfter() { TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); // set provider before getting a client - OpenFeatureAPI.getInstance().setProviderAndWait(name, provider); - Client client = OpenFeatureAPI.getInstance().getClient(name); + api.setProviderAndWait(name, provider); + Client client = api.getClient(name); client.onProviderReady(handler); verify(handler, timeout(TIMEOUT).atLeastOnce()) .accept(argThat(details -> details.getDomain().equals(name))); @@ -252,10 +253,10 @@ void initErrorProviderAfter() { final String errMessage = "oh no!"; TestEventsProvider provider = new TestEventsProvider(INIT_DELAY, true, errMessage); - Client client = OpenFeatureAPI.getInstance().getClient(name); + Client client = api.getClient(name); client.onProviderError(handler); // set provider after getting a client - OpenFeatureAPI.getInstance().setProvider(name, provider); + api.setProvider(name, provider); verify(handler, timeout(TIMEOUT)).accept(argThat(details -> { return name.equals(details.getDomain()) && errMessage.equals(details.getMessage()); })); @@ -274,8 +275,8 @@ void initErrorProviderBefore() { TestEventsProvider provider = new TestEventsProvider(INIT_DELAY, true, errMessage); // set provider after getting a client - OpenFeatureAPI.getInstance().setProvider(name, provider); - Client client = OpenFeatureAPI.getInstance().getClient(name); + api.setProvider(name, provider); + Client client = api.getClient(name); client.onProviderError(handler); verify(handler, timeout(TIMEOUT)).accept(argThat(details -> { return name.equals(details.getDomain()) && errMessage.equals(details.getMessage()); @@ -299,8 +300,8 @@ void shouldPropagateBefore() { TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); // set provider before getting a client - OpenFeatureAPI.getInstance().setProviderAndWait(name, provider); - Client client = OpenFeatureAPI.getInstance().getClient(name); + api.setProviderAndWait(name, provider); + Client client = api.getClient(name); client.onProviderConfigurationChanged(handler); provider.mockEvent( @@ -322,10 +323,10 @@ void shouldPropagateAfter() { final String name = "shouldPropagateAfter"; TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); - Client client = OpenFeatureAPI.getInstance().getClient(name); + Client client = api.getClient(name); client.onProviderConfigurationChanged(handler); // set provider after getting a client - OpenFeatureAPI.getInstance().setProviderAndWait(name, provider); + api.setProviderAndWait(name, provider); provider.mockEvent( ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, @@ -354,8 +355,8 @@ void shouldSupportAllEventTypes() { final Consumer handler4 = mockHandler(); TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); - OpenFeatureAPI.getInstance().setProviderAndWait(name, provider); - Client client = OpenFeatureAPI.getInstance().getClient(name); + api.setProviderAndWait(name, provider); + Client client = api.getClient(name); client.onProviderReady(handler1); client.onProviderConfigurationChanged(handler2); @@ -384,14 +385,14 @@ void shouldNotRunHandlers() { TestEventsProvider provider1 = new TestEventsProvider(INIT_DELAY); TestEventsProvider provider2 = new TestEventsProvider(INIT_DELAY); - OpenFeatureAPI.getInstance().setProviderAndWait(name, provider1); - Client client = OpenFeatureAPI.getInstance().getClient(name); + api.setProviderAndWait(name, provider1); + Client client = api.getClient(name); // attached handlers - OpenFeatureAPI.getInstance().onProviderConfigurationChanged(handler1); + api.onProviderConfigurationChanged(handler1); client.onProviderConfigurationChanged(handler2); - OpenFeatureAPI.getInstance().setProviderAndWait(name, provider2); + api.setProviderAndWait(name, provider2); // wait for the new provider to be ready and make sure things are cleaned up. await().until(() -> provider1.isShutDown()); @@ -421,11 +422,11 @@ void otherClientHandlersShouldNotRun() { TestEventsProvider provider1 = new TestEventsProvider(INIT_DELAY); TestEventsProvider provider2 = new TestEventsProvider(INIT_DELAY); - OpenFeatureAPI.getInstance().setProviderAndWait(name1, provider1); - OpenFeatureAPI.getInstance().setProviderAndWait(name2, provider2); + api.setProviderAndWait(name1, provider1); + api.setProviderAndWait(name2, provider2); - Client client1 = OpenFeatureAPI.getInstance().getClient(name1); - Client client2 = OpenFeatureAPI.getInstance().getClient(name2); + Client client1 = api.getClient(name1); + Client client2 = api.getClient(name2); client1.onProviderConfigurationChanged(handlerToRun); client2.onProviderConfigurationChanged(handlerNotToRun); @@ -450,11 +451,11 @@ void boundShouldNotRunWithDefault() { TestEventsProvider namedProvider = new TestEventsProvider(INIT_DELAY); TestEventsProvider defaultProvider = new TestEventsProvider(INIT_DELAY); - OpenFeatureAPI.getInstance().setProviderAndWait(defaultProvider); + api.setProviderAndWait(defaultProvider); - Client client = OpenFeatureAPI.getInstance().getClient(name); + Client client = api.getClient(name); client.onProviderConfigurationChanged(handlerNotToRun); - OpenFeatureAPI.getInstance().setProviderAndWait(name, namedProvider); + api.setProviderAndWait(name, namedProvider); // await the new provider to make sure the old one is shut down await().until(() -> namedProvider.getState().equals(ProviderState.READY)); @@ -465,7 +466,7 @@ void boundShouldNotRunWithDefault() { ProviderEventDetails.builder().build()); verify(handlerNotToRun, after(TIMEOUT).never()).accept(any()); - OpenFeatureAPI.getInstance().setProviderAndWait(new NoOpProvider()); + api.setProviderAndWait(new NoOpProvider()); } @Test @@ -479,9 +480,9 @@ void unboundShouldRunWithDefault() { final Consumer handlerToRun = mockHandler(); TestEventsProvider defaultProvider = new TestEventsProvider(INIT_DELAY); - OpenFeatureAPI.getInstance().setProviderAndWait(defaultProvider); + api.setProviderAndWait(defaultProvider); - Client client = OpenFeatureAPI.getInstance().getClient(name); + Client client = api.getClient(name); client.onProviderConfigurationChanged(handlerToRun); // await the new provider to make sure the old one is shut down @@ -493,7 +494,7 @@ void unboundShouldRunWithDefault() { ProviderEventDetails.builder().build()); verify(handlerToRun, timeout(TIMEOUT)).accept(any()); - OpenFeatureAPI.getInstance().setProviderAndWait(new NoOpProvider()); + api.setProviderAndWait(new NoOpProvider()); } @Test @@ -509,9 +510,9 @@ void handlersRunIfOneThrows() { final Consumer lastHandler = mockHandler(); TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); - OpenFeatureAPI.getInstance().setProviderAndWait(name, provider); + api.setProviderAndWait(name, provider); - Client client1 = OpenFeatureAPI.getInstance().getClient(name); + Client client1 = api.getClient(name); client1.onProviderConfigurationChanged(errorHandler); client1.onProviderConfigurationChanged(nextHandler); @@ -537,11 +538,11 @@ void shouldHaveAllProperties() { final String name = "shouldHaveAllProperties"; TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); - OpenFeatureAPI.getInstance().setProviderAndWait(name, provider); - Client client = OpenFeatureAPI.getInstance().getClient(name); + api.setProviderAndWait(name, provider); + Client client = api.getClient(name); // attached handlers - OpenFeatureAPI.getInstance().onProviderConfigurationChanged(handler1); + api.onProviderConfigurationChanged(handler1); client.onProviderConfigurationChanged(handler2); List flagsChanged = Arrays.asList("flag"); @@ -582,10 +583,10 @@ void matchingReadyEventsMustRunImmediately() { // provider which is already ready TestEventsProvider provider = new TestEventsProvider(); - OpenFeatureAPI.getInstance().setProviderAndWait(name, provider); + api.setProviderAndWait(name, provider); // should run even thought handler was added after ready - Client client = OpenFeatureAPI.getInstance().getClient(name); + Client client = api.getClient(name); client.onProviderReady(handler); verify(handler, timeout(TIMEOUT)).accept(any()); } @@ -598,7 +599,6 @@ void matchingReadyEventsMustRunImmediately() { void matchingStaleEventsMustRunImmediately() { final String name = "matchingEventsMustRunImmediately"; final Consumer handler = mockHandler(); - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); // provider which is already stale TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); @@ -620,7 +620,6 @@ void matchingStaleEventsMustRunImmediately() { void matchingErrorEventsMustRunImmediately() { final String name = "matchingEventsMustRunImmediately"; final Consumer handler = mockHandler(); - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); // provider which is already in error TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); @@ -629,6 +628,7 @@ void matchingErrorEventsMustRunImmediately() { provider.emitProviderError(ProviderEventDetails.builder().build()); assertThat(client.getProviderState()).isEqualTo(ProviderState.ERROR); + verify(handler, never()).accept(any()); // should run even though handler was added after error client.onProviderError(handler); verify(handler, timeout(TIMEOUT)).accept(any()); @@ -644,8 +644,8 @@ void mustPersistAcrossChanges() { TestEventsProvider provider1 = new TestEventsProvider(INIT_DELAY); TestEventsProvider provider2 = new TestEventsProvider(INIT_DELAY); - OpenFeatureAPI.getInstance().setProviderAndWait(name, provider1); - Client client = OpenFeatureAPI.getInstance().getClient(name); + api.setProviderAndWait(name, provider1); + Client client = api.getClient(name); client.onProviderConfigurationChanged(handler); provider1.mockEvent( @@ -657,7 +657,7 @@ void mustPersistAcrossChanges() { verify(handler, timeout(TIMEOUT).times(1)).accept(argThat(nameMatches)); // wait for the new provider to be ready. - OpenFeatureAPI.getInstance().setProviderAndWait(name, provider2); + api.setProviderAndWait(name, provider2); // verify that with the new provider under the same name, the handler is called // again. @@ -681,14 +681,14 @@ void removedEventsShouldNotRun() { final Consumer handler2 = mockHandler(); TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); - OpenFeatureAPI.getInstance().setProviderAndWait(name, provider); - Client client = OpenFeatureAPI.getInstance().getClient(name); + api.setProviderAndWait(name, provider); + Client client = api.getClient(name); // attached handlers - OpenFeatureAPI.getInstance().onProviderStale(handler1); + api.onProviderStale(handler1); client.onProviderConfigurationChanged(handler2); - OpenFeatureAPI.getInstance().removeHandler(ProviderEvent.PROVIDER_STALE, handler1); + api.removeHandler(ProviderEvent.PROVIDER_STALE, handler1); client.removeHandler(ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, handler2); // emit event diff --git a/src/test/java/dev/openfeature/sdk/FlagEvaluationSpecTest.java b/src/test/java/dev/openfeature/sdk/FlagEvaluationSpecTest.java index 2ad88d328..3b02b172d 100644 --- a/src/test/java/dev/openfeature/sdk/FlagEvaluationSpecTest.java +++ b/src/test/java/dev/openfeature/sdk/FlagEvaluationSpecTest.java @@ -9,7 +9,6 @@ import dev.openfeature.sdk.exceptions.GeneralError; import dev.openfeature.sdk.fixtures.HookFixtures; -import dev.openfeature.sdk.testutils.FeatureProviderTestUtils; import dev.openfeature.sdk.testutils.TestEventsProvider; import java.util.HashMap; import java.util.List; @@ -29,7 +28,7 @@ class FlagEvaluationSpecTest implements HookFixtures { private OpenFeatureAPI api; private Client _client() { - FeatureProviderTestUtils.setFeatureProvider(new NoOpProvider()); + api.setProviderAndWait(new NoOpProvider()); return api.getClient(); } @@ -37,18 +36,13 @@ private Client _client() { private Client _initializedClient() { TestEventsProvider provider = new TestEventsProvider(); provider.initialize(null); - FeatureProviderTestUtils.setFeatureProvider(provider); + api.setProviderAndWait(provider); return api.getClient(); } @BeforeEach void getApiInstance() { - api = OpenFeatureAPI.getInstance(); - } - - @AfterEach - void reset_ctx() { - api.setEvaluationContext(null); + api = new OpenFeatureAPI(); } @BeforeEach @@ -62,15 +56,6 @@ void reset_logs() { LoggerMock.setMock(OpenFeatureClient.class, logger); } - @Specification( - number = "1.1.1", - text = - "The API, and any state it maintains SHOULD exist as a global singleton, even in cases wherein multiple versions of the API are present at runtime.") - @Test - void global_singleton() { - assertSame(OpenFeatureAPI.getInstance(), OpenFeatureAPI.getInstance()); - } - @Specification( number = "1.1.2.1", text = @@ -78,7 +63,7 @@ void global_singleton() { @Test void provider() { FeatureProvider mockProvider = mock(FeatureProvider.class); - FeatureProviderTestUtils.setFeatureProvider(mockProvider); + api.setProviderAndWait(mockProvider); assertThat(api.getProvider()).isEqualTo(mockProvider); } @@ -90,13 +75,13 @@ void provider() { @Test void providerAndWait() { FeatureProvider provider = new TestEventsProvider(500); - OpenFeatureAPI.getInstance().setProviderAndWait(provider); + api.setProviderAndWait(provider); Client client = api.getClient(); assertThat(client.getProviderState()).isEqualTo(ProviderState.READY); provider = new TestEventsProvider(500); String providerName = "providerAndWait"; - OpenFeatureAPI.getInstance().setProviderAndWait(providerName, provider); + api.setProviderAndWait(providerName, provider); Client client2 = api.getClient(providerName); assertThat(client2.getProviderState()).isEqualTo(ProviderState.READY); } @@ -124,8 +109,8 @@ void providerAndWaitError() { void shouldReturnNotReadyIfNotInitialized() { FeatureProvider provider = new TestEventsProvider(100); String providerName = "shouldReturnNotReadyIfNotInitialized"; - OpenFeatureAPI.getInstance().setProvider(providerName, provider); - Client client = OpenFeatureAPI.getInstance().getClient(providerName); + api.setProvider(providerName, provider); + Client client = api.getClient(providerName); FlagEvaluationDetails details = client.getBooleanDetails("return_error_when_not_initialized", false); assertEquals(ErrorCode.PROVIDER_NOT_READY, details.getErrorCode()); assertEquals(Reason.ERROR.toString(), details.getReason()); @@ -136,7 +121,7 @@ void shouldReturnNotReadyIfNotInitialized() { text = "The API MUST provide a function for retrieving the metadata field of the configured provider.") @Test void provider_metadata() { - FeatureProviderTestUtils.setFeatureProvider(new DoSomethingProvider()); + api.setProviderAndWait(new DoSomethingProvider()); assertThat(api.getProviderMetadata().getName()).isEqualTo(DoSomethingProvider.name); } @@ -198,7 +183,7 @@ void hookRegistration() { "The client SHOULD provide functions for floating-point numbers and integers, consistent with language idioms.") @Test void value_flags() { - FeatureProviderTestUtils.setFeatureProvider(new DoSomethingProvider()); + api.setProviderAndWait(new DoSomethingProvider()); Client c = api.getClient(); String key = "key"; @@ -279,7 +264,7 @@ void value_flags() { "In cases of normal execution, the `evaluation details` structure's `reason` field MUST contain the value of the `reason` field in the `flag resolution` structure returned by the configured `provider`, if the field is set.") @Test void detail_flags() { - FeatureProviderTestUtils.setFeatureProvider(new DoSomethingProvider()); + api.setProviderAndWait(new DoSomethingProvider()); Client c = api.getClient(); String key = "key"; @@ -386,7 +371,7 @@ void hooks() { "In cases of abnormal execution, the `evaluation details` structure's `error message` field **MAY** contain a string containing additional details about the nature of the error.") @Test void broken_provider() { - FeatureProviderTestUtils.setFeatureProvider(new AlwaysBrokenProvider()); + api.setProviderAndWait(new AlwaysBrokenWithExceptionProvider()); Client c = api.getClient(); boolean defaultValue = false; assertFalse(c.getBooleanValue("key", defaultValue)); @@ -414,8 +399,8 @@ void broken_provider() { text = "In cases of abnormal execution, the `evaluation details` structure's `error message` field **MAY** contain a string containing additional details about the nature of the error.") @Test - void broken_provider_withDetails() { - FeatureProviderTestUtils.setFeatureProvider(new AlwaysBrokenWithDetailsProvider()); + void broken_provider_withDetails() throws InterruptedException { + api.setProviderAndWait(new AlwaysBrokenWithDetailsProvider()); Client c = api.getClient(); boolean defaultValue = false; assertFalse(c.getBooleanValue("key", defaultValue)); @@ -431,7 +416,7 @@ void broken_provider_withDetails() { text = "Methods, functions, or operations on the client SHOULD NOT write log messages.") @Test void log_on_error() throws NotImplementedException { - FeatureProviderTestUtils.setFeatureProvider(new AlwaysBrokenProvider()); + api.setProviderAndWait(new AlwaysBrokenWithExceptionProvider()); Client c = api.getClient(); FlagEvaluationDetails result = c.getBooleanDetails("test", false); @@ -450,7 +435,7 @@ void clientMetadata() { assertNull(c.getMetadata().getDomain()); String domainName = "test domain"; - FeatureProviderTestUtils.setFeatureProvider(new AlwaysBrokenProvider()); + api.setProviderAndWait(new AlwaysBrokenWithExceptionProvider()); Client c2 = api.getClient(domainName); assertEquals(domainName, c2.getMetadata().getName()); @@ -463,7 +448,7 @@ void clientMetadata() { "In cases of abnormal execution (network failure, unhandled error, etc) the reason field in the evaluation details SHOULD indicate an error.") @Test void reason_is_error_when_there_are_errors() { - FeatureProviderTestUtils.setFeatureProvider(new AlwaysBrokenProvider()); + api.setProviderAndWait(new AlwaysBrokenWithExceptionProvider()); Client c = api.getClient(); FlagEvaluationDetails result = c.getBooleanDetails("test", false); assertEquals(Reason.ERROR.toString(), result.getReason()); @@ -475,7 +460,7 @@ void reason_is_error_when_there_are_errors() { "If the flag metadata field in the flag resolution structure returned by the configured provider is set, the evaluation details structure's flag metadata field MUST contain that value. Otherwise, it MUST contain an empty record.") @Test void flag_metadata_passed() { - FeatureProviderTestUtils.setFeatureProvider(new DoSomethingProvider(null)); + api.setProviderAndWait(new DoSomethingProvider(null)); Client c = api.getClient(); FlagEvaluationDetails result = c.getBooleanDetails("test", false); assertNotNull(result.getFlagMetadata()); @@ -487,7 +472,7 @@ void api_context() { String contextKey = "some-key"; String contextValue = "some-value"; DoSomethingProvider provider = spy(new DoSomethingProvider()); - FeatureProviderTestUtils.setFeatureProvider(provider); + api.setProviderAndWait(provider); Map attributes = new HashMap<>(); attributes.put(contextKey, new Value(contextValue)); @@ -514,7 +499,7 @@ void api_context() { @Test void multi_layer_context_merges_correctly() { DoSomethingProvider provider = spy(new DoSomethingProvider()); - FeatureProviderTestUtils.setFeatureProvider(provider); + api.setProviderAndWait(provider); TransactionContextPropagator transactionContextPropagator = new ThreadLocalTransactionContextPropagator(); api.setTransactionContextPropagator(transactionContextPropagator); Hook hook = spy(new Hook() { @@ -702,7 +687,7 @@ public void after( @Test void setting_transaction_context_propagator() { DoSomethingProvider provider = new DoSomethingProvider(); - FeatureProviderTestUtils.setFeatureProvider(provider); + api.setProviderAndWait(provider); TransactionContextPropagator transactionContextPropagator = new ThreadLocalTransactionContextPropagator(); api.setTransactionContextPropagator(transactionContextPropagator); @@ -716,7 +701,7 @@ void setting_transaction_context_propagator() { @Test void setting_transaction_context() { DoSomethingProvider provider = new DoSomethingProvider(); - FeatureProviderTestUtils.setFeatureProvider(provider); + api.setProviderAndWait(provider); TransactionContextPropagator transactionContextPropagator = new ThreadLocalTransactionContextPropagator(); api.setTransactionContextPropagator(transactionContextPropagator); diff --git a/src/test/java/dev/openfeature/sdk/HookSpecTest.java b/src/test/java/dev/openfeature/sdk/HookSpecTest.java index d6247c649..4b08510dd 100644 --- a/src/test/java/dev/openfeature/sdk/HookSpecTest.java +++ b/src/test/java/dev/openfeature/sdk/HookSpecTest.java @@ -18,7 +18,6 @@ import dev.openfeature.sdk.exceptions.FlagNotFoundError; import dev.openfeature.sdk.fixtures.HookFixtures; -import dev.openfeature.sdk.testutils.FeatureProviderTestUtils; import dev.openfeature.sdk.testutils.TestEventsProvider; import java.util.ArrayList; import java.util.Arrays; @@ -28,16 +27,18 @@ import java.util.Map; import java.util.Optional; import lombok.SneakyThrows; -import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; import org.mockito.InOrder; class HookSpecTest implements HookFixtures { - @AfterEach - void emptyApiHooks() { - // it's a singleton. Don't pollute each test. - OpenFeatureAPI.getInstance().clearHooks(); + + private OpenFeatureAPI api; + + @BeforeEach + void setUp() { + this.api = new OpenFeatureAPI(); } @Specification( @@ -163,7 +164,7 @@ void optional_properties() { .type(FlagValueType.INTEGER) .ctx(new ImmutableContext()) .defaultValue(1) - .clientMetadata(OpenFeatureAPI.getInstance().getClient().getMetadata()) + .clientMetadata(api.getClient().getMetadata()) .build(); } @@ -173,8 +174,8 @@ void optional_properties() { "The before stage MUST run before flag resolution occurs. It accepts a hook context (required) and hook hints (optional) as parameters and returns either an evaluation context or nothing.") @Test void before_runs_ahead_of_evaluation() { - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); - api.setProviderAndWait(new AlwaysBrokenProvider()); + + api.setProviderAndWait(new AlwaysBrokenWithExceptionProvider()); Client client = api.getClient(); Hook evalHook = mockBooleanHook(); @@ -216,8 +217,7 @@ void error_hook_must_run_if_resolution_details_returns_an_error_code() { .errorMessage(errorMessage) .build()); - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); - FeatureProviderTestUtils.setFeatureProvider("errorHookMustRun", provider); + api.setProviderAndWait("errorHookMustRun", provider); Client client = api.getClient("errorHookMustRun"); client.getBooleanValue( "key", @@ -259,7 +259,7 @@ void error_hook_must_run_if_resolution_details_returns_an_error_code() { @Test void hook_eval_order() { List evalOrder = new ArrayList<>(); - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); + api.setProviderAndWait("evalOrder", new TestEventsProvider() { public List getProviderHooks() { return Collections.singletonList(new BooleanHook() { @@ -411,8 +411,7 @@ void error_stops_before() { doThrow(RuntimeException.class).when(h).before(any(), any()); Hook h2 = mockBooleanHook(); - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); - api.setProviderAndWait(new AlwaysBrokenProvider()); + api.setProviderAndWait(new AlwaysBrokenWithExceptionProvider()); Client c = api.getClient(); c.getBooleanDetails( @@ -516,8 +515,7 @@ void flag_eval_hook_order() { .thenReturn(ProviderEvaluation.builder().value(true).build()); InOrder order = inOrder(hook, provider); - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); - FeatureProviderTestUtils.setFeatureProvider(provider); + api.setProviderAndWait(provider); Client client = api.getClient(); client.getBooleanValue( "key", @@ -695,8 +693,7 @@ void mergeHappensCorrectly() { when(provider.getBooleanEvaluation(any(), any(), any())) .thenReturn(ProviderEvaluation.builder().value(true).build()); - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); - FeatureProviderTestUtils.setFeatureProvider(provider); + api.setProviderAndWait(provider); Client client = api.getClient(); client.getBooleanValue( "key", @@ -761,11 +758,10 @@ void first_error_broken() { } private Client getClient(FeatureProvider provider) { - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); if (provider == null) { - FeatureProviderTestUtils.setFeatureProvider(TestEventsProvider.newInitializedTestEventsProvider()); + api.setProviderAndWait(TestEventsProvider.newInitializedTestEventsProvider()); } else { - FeatureProviderTestUtils.setFeatureProvider(provider); + api.setProviderAndWait(provider); } return api.getClient(); } diff --git a/src/test/java/dev/openfeature/sdk/InitializeBehaviorSpecTest.java b/src/test/java/dev/openfeature/sdk/InitializeBehaviorSpecTest.java index 3353f5644..4bcd73127 100644 --- a/src/test/java/dev/openfeature/sdk/InitializeBehaviorSpecTest.java +++ b/src/test/java/dev/openfeature/sdk/InitializeBehaviorSpecTest.java @@ -17,10 +17,12 @@ class InitializeBehaviorSpecTest { private static final String DOMAIN_NAME = "mydomain"; + private OpenFeatureAPI api; @BeforeEach void setupTest() { - OpenFeatureAPI.getInstance().setProvider(new NoOpProvider()); + this.api = new OpenFeatureAPI(); + api.setProvider(new NoOpProvider()); } @Nested @@ -37,7 +39,7 @@ void mustCallInitializeFunctionOfTheNewlyRegisteredProviderBeforeUsingItForFlagE FeatureProvider featureProvider = mock(FeatureProvider.class); doReturn(ProviderState.NOT_READY).when(featureProvider).getState(); - OpenFeatureAPI.getInstance().setProvider(featureProvider); + api.setProvider(featureProvider); verify(featureProvider, timeout(1000)).initialize(any()); } @@ -55,8 +57,7 @@ void shouldCatchExceptionThrownByTheProviderOnInitialization() throws Exception doReturn(ProviderState.NOT_READY).when(featureProvider).getState(); doThrow(TestException.class).when(featureProvider).initialize(any()); - assertThatCode(() -> OpenFeatureAPI.getInstance().setProvider(featureProvider)) - .doesNotThrowAnyException(); + assertThatCode(() -> api.setProvider(featureProvider)).doesNotThrowAnyException(); verify(featureProvider, timeout(1000)).initialize(any()); } @@ -77,7 +78,7 @@ void mustCallInitializeFunctionOfTheNewlyRegisteredNamedProviderBeforeUsingItFor FeatureProvider featureProvider = mock(FeatureProvider.class); doReturn(ProviderState.NOT_READY).when(featureProvider).getState(); - OpenFeatureAPI.getInstance().setProvider(DOMAIN_NAME, featureProvider); + api.setProvider(DOMAIN_NAME, featureProvider); verify(featureProvider, timeout(1000)).initialize(any()); } @@ -95,8 +96,7 @@ void shouldCatchExceptionThrownByTheNamedClientProviderOnInitialization() throws doReturn(ProviderState.NOT_READY).when(featureProvider).getState(); doThrow(TestException.class).when(featureProvider).initialize(any()); - assertThatCode(() -> OpenFeatureAPI.getInstance().setProvider(DOMAIN_NAME, featureProvider)) - .doesNotThrowAnyException(); + assertThatCode(() -> api.setProvider(DOMAIN_NAME, featureProvider)).doesNotThrowAnyException(); verify(featureProvider, timeout(1000)).initialize(any()); } diff --git a/src/test/java/dev/openfeature/sdk/LockingTest.java b/src/test/java/dev/openfeature/sdk/LockingSingeltonTest.java similarity index 99% rename from src/test/java/dev/openfeature/sdk/LockingTest.java rename to src/test/java/dev/openfeature/sdk/LockingSingeltonTest.java index 4b7af5530..ad86f4bc3 100644 --- a/src/test/java/dev/openfeature/sdk/LockingTest.java +++ b/src/test/java/dev/openfeature/sdk/LockingSingeltonTest.java @@ -15,7 +15,7 @@ import org.junit.jupiter.api.parallel.Isolated; @Isolated() -class LockingTest { +class LockingSingeltonTest { private static OpenFeatureAPI api; private OpenFeatureClient client; diff --git a/src/test/java/dev/openfeature/sdk/OpenFeatureAPISingeltonTest.java b/src/test/java/dev/openfeature/sdk/OpenFeatureAPISingeltonTest.java new file mode 100644 index 000000000..dd9916eed --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/OpenFeatureAPISingeltonTest.java @@ -0,0 +1,17 @@ +package dev.openfeature.sdk; + +import static org.junit.jupiter.api.Assertions.assertSame; + +import org.junit.jupiter.api.Test; + +class OpenFeatureAPISingeltonTest { + + @Specification( + number = "1.1.1", + text = + "The API, and any state it maintains SHOULD exist as a global singleton, even in cases wherein multiple versions of the API are present at runtime.") + @Test + void global_singleton() { + assertSame(OpenFeatureAPI.getInstance(), OpenFeatureAPI.getInstance()); + } +} diff --git a/src/test/java/dev/openfeature/sdk/OpenFeatureAPITest.java b/src/test/java/dev/openfeature/sdk/OpenFeatureAPITest.java index 63145ecb6..e8e8b27b0 100644 --- a/src/test/java/dev/openfeature/sdk/OpenFeatureAPITest.java +++ b/src/test/java/dev/openfeature/sdk/OpenFeatureAPITest.java @@ -8,7 +8,6 @@ import static org.mockito.Mockito.verify; import dev.openfeature.sdk.providers.memory.InMemoryProvider; -import dev.openfeature.sdk.testutils.FeatureProviderTestUtils; import dev.openfeature.sdk.testutils.TestEventsProvider; import java.util.Collections; import java.util.HashMap; @@ -23,13 +22,13 @@ class OpenFeatureAPITest { @BeforeEach void setupTest() { - api = OpenFeatureAPI.getInstance(); + api = new OpenFeatureAPI(); } @Test void namedProviderTest() { FeatureProvider provider = new NoOpProvider(); - FeatureProviderTestUtils.setFeatureProvider("namedProviderTest", provider); + api.setProviderAndWait("namedProviderTest", provider); assertThat(provider.getMetadata().getName()) .isEqualTo(api.getProviderMetadata("namedProviderTest").getName()); @@ -44,14 +43,10 @@ void namedProviderOverwrittenTest() { String domain = "namedProviderOverwrittenTest"; FeatureProvider provider1 = new NoOpProvider(); FeatureProvider provider2 = new DoSomethingProvider(); - FeatureProviderTestUtils.setFeatureProvider(domain, provider1); - FeatureProviderTestUtils.setFeatureProvider(domain, provider2); - - assertThat(OpenFeatureAPI.getInstance() - .getProvider(domain) - .getMetadata() - .getName()) - .isEqualTo(DoSomethingProvider.name); + api.setProviderAndWait(domain, provider1); + api.setProviderAndWait(domain, provider2); + + assertThat(api.getProvider(domain).getMetadata().getName()).isEqualTo(DoSomethingProvider.name); } @Test @@ -60,17 +55,17 @@ void providerToMultipleNames() throws Exception { FeatureProvider noOpAsNonEventingProvider = new NoOpProvider(); // register same provider for multiple names & as default provider - OpenFeatureAPI.getInstance().setProviderAndWait(inMemAsEventingProvider); - OpenFeatureAPI.getInstance().setProviderAndWait("clientA", inMemAsEventingProvider); - OpenFeatureAPI.getInstance().setProviderAndWait("clientB", inMemAsEventingProvider); - OpenFeatureAPI.getInstance().setProviderAndWait("clientC", noOpAsNonEventingProvider); - OpenFeatureAPI.getInstance().setProviderAndWait("clientD", noOpAsNonEventingProvider); - - assertEquals(inMemAsEventingProvider, OpenFeatureAPI.getInstance().getProvider()); - assertEquals(inMemAsEventingProvider, OpenFeatureAPI.getInstance().getProvider("clientA")); - assertEquals(inMemAsEventingProvider, OpenFeatureAPI.getInstance().getProvider("clientB")); - assertEquals(noOpAsNonEventingProvider, OpenFeatureAPI.getInstance().getProvider("clientC")); - assertEquals(noOpAsNonEventingProvider, OpenFeatureAPI.getInstance().getProvider("clientD")); + api.setProviderAndWait(inMemAsEventingProvider); + api.setProviderAndWait("clientA", inMemAsEventingProvider); + api.setProviderAndWait("clientB", inMemAsEventingProvider); + api.setProviderAndWait("clientC", noOpAsNonEventingProvider); + api.setProviderAndWait("clientD", noOpAsNonEventingProvider); + + assertEquals(inMemAsEventingProvider, api.getProvider()); + assertEquals(inMemAsEventingProvider, api.getProvider("clientA")); + assertEquals(inMemAsEventingProvider, api.getProvider("clientB")); + assertEquals(noOpAsNonEventingProvider, api.getProvider("clientC")); + assertEquals(noOpAsNonEventingProvider, api.getProvider("clientD")); } @Test @@ -101,23 +96,20 @@ void getStateReturnsTheStateOfTheAppropriateProvider() throws Exception { String domain = "namedProviderOverwrittenTest"; FeatureProvider provider1 = new NoOpProvider(); FeatureProvider provider2 = new TestEventsProvider(); - FeatureProviderTestUtils.setFeatureProvider(domain, provider1); - FeatureProviderTestUtils.setFeatureProvider(domain, provider2); + api.setProviderAndWait(domain, provider1); + api.setProviderAndWait(domain, provider2); provider2.initialize(null); - assertThat(OpenFeatureAPI.getInstance().getClient(domain).getProviderState()) - .isEqualTo(ProviderState.READY); + assertThat(api.getClient(domain).getProviderState()).isEqualTo(ProviderState.READY); } @Test void featureProviderTrackIsCalled() throws Exception { FeatureProvider featureProvider = mock(FeatureProvider.class); - FeatureProviderTestUtils.setFeatureProvider(featureProvider); + api.setProviderAndWait(featureProvider); - OpenFeatureAPI.getInstance() - .getClient() - .track("track-event", new ImmutableContext(), new MutableTrackingEventDetails(22.2f)); + api.getClient().track("track-event", new ImmutableContext(), new MutableTrackingEventDetails(22.2f)); verify(featureProvider).initialize(any()); verify(featureProvider).getMetadata(); diff --git a/src/test/java/dev/openfeature/sdk/OpenFeatureAPITestUtil.java b/src/test/java/dev/openfeature/sdk/OpenFeatureAPITestUtil.java new file mode 100644 index 000000000..f33c5b4d7 --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/OpenFeatureAPITestUtil.java @@ -0,0 +1,10 @@ +package dev.openfeature.sdk; + +public class OpenFeatureAPITestUtil { + + private OpenFeatureAPITestUtil() {} + + public static OpenFeatureAPI createAPI() { + return new OpenFeatureAPI(); + } +} diff --git a/src/test/java/dev/openfeature/sdk/OpenFeatureClientTest.java b/src/test/java/dev/openfeature/sdk/OpenFeatureClientTest.java index 4f4d32004..97a1417a1 100644 --- a/src/test/java/dev/openfeature/sdk/OpenFeatureClientTest.java +++ b/src/test/java/dev/openfeature/sdk/OpenFeatureClientTest.java @@ -38,7 +38,7 @@ void reset_logs() { @Test @DisplayName("should not throw exception if hook has different type argument than hookContext") void shouldNotThrowExceptionIfHookHasDifferentTypeArgumentThanHookContext() { - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); + OpenFeatureAPI api = new OpenFeatureAPI(); api.setProviderAndWait( "shouldNotThrowExceptionIfHookHasDifferentTypeArgumentThanHookContext", new DoSomethingProvider()); Client client = api.getClient("shouldNotThrowExceptionIfHookHasDifferentTypeArgumentThanHookContext"); @@ -82,7 +82,7 @@ void setEvaluationContextShouldAllowChaining() { @DisplayName("Should not call evaluation methods when the provider has state FATAL") void shouldNotCallEvaluationMethodsWhenProviderIsInFatalErrorState() { FeatureProvider provider = new TestEventsProvider(100, true, "fake fatal", true); - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); + OpenFeatureAPI api = new OpenFeatureAPI(); Client client = api.getClient("shouldNotCallEvaluationMethodsWhenProviderIsInFatalErrorState"); assertThrows( @@ -97,7 +97,7 @@ void shouldNotCallEvaluationMethodsWhenProviderIsInFatalErrorState() { @DisplayName("Should not call evaluation methods when the provider has state NOT_READY") void shouldNotCallEvaluationMethodsWhenProviderIsInNotReadyState() { FeatureProvider provider = new TestEventsProvider(5000); - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); + OpenFeatureAPI api = new OpenFeatureAPI(); api.setProvider("shouldNotCallEvaluationMethodsWhenProviderIsInNotReadyState", provider); Client client = api.getClient("shouldNotCallEvaluationMethodsWhenProviderIsInNotReadyState"); FlagEvaluationDetails details = client.getBooleanDetails("key", true); diff --git a/src/test/java/dev/openfeature/sdk/ProviderRepositoryTest.java b/src/test/java/dev/openfeature/sdk/ProviderRepositoryTest.java index 98652635d..7041df5c1 100644 --- a/src/test/java/dev/openfeature/sdk/ProviderRepositoryTest.java +++ b/src/test/java/dev/openfeature/sdk/ProviderRepositoryTest.java @@ -35,7 +35,7 @@ class ProviderRepositoryTest { @BeforeEach void setupTest() { - providerRepository = new ProviderRepository(); + providerRepository = new ProviderRepository(new OpenFeatureAPI()); } @Nested diff --git a/src/test/java/dev/openfeature/sdk/ShutdownBehaviorSpecTest.java b/src/test/java/dev/openfeature/sdk/ShutdownBehaviorSpecTest.java index e7caf9274..1bb7d4b62 100644 --- a/src/test/java/dev/openfeature/sdk/ShutdownBehaviorSpecTest.java +++ b/src/test/java/dev/openfeature/sdk/ShutdownBehaviorSpecTest.java @@ -1,6 +1,5 @@ package dev.openfeature.sdk; -import static dev.openfeature.sdk.testutils.FeatureProviderTestUtils.setFeatureProvider; import static org.mockito.Mockito.*; import dev.openfeature.sdk.fixtures.ProviderFixture; @@ -15,9 +14,19 @@ class ShutdownBehaviorSpecTest { private String DOMAIN = "myDomain"; + private OpenFeatureAPI api; + + void setFeatureProvider(FeatureProvider featureProvider) { + api.setProviderAndWait(featureProvider); + } + + void setFeatureProvider(String domain, FeatureProvider featureProvider) { + api.setProviderAndWait(domain, featureProvider); + } @BeforeEach void resetFeatureProvider() { + api = new OpenFeatureAPI(); setFeatureProvider(new NoOpProvider()); } @@ -110,7 +119,6 @@ void mustShutdownAllProvidersOnShuttingDownApi() { FeatureProvider namedProvider = ProviderFixture.createMockedProvider(); setFeatureProvider(defaultProvider); setFeatureProvider(DOMAIN, namedProvider); - OpenFeatureAPI api = OpenFeatureAPI.getInstance(); synchronized (OpenFeatureAPI.class) { api.shutdown(); @@ -125,15 +133,14 @@ void mustShutdownAllProvidersOnShuttingDownApi() { @Test @DisplayName("once shutdown is complete, api must be ready to use again") void apiIsReadyToUseAfterShutdown() { - final OpenFeatureAPI openFeatureAPI = OpenFeatureAPI.getInstance(); NoOpProvider p1 = new NoOpProvider(); - openFeatureAPI.setProvider(p1); + api.setProvider(p1); - openFeatureAPI.shutdown(); + api.shutdown(); NoOpProvider p2 = new NoOpProvider(); - openFeatureAPI.setProvider(p2); + api.setProvider(p2); } } } diff --git a/src/test/java/dev/openfeature/sdk/TrackingSpecTest.java b/src/test/java/dev/openfeature/sdk/TrackingSpecTest.java index a8f6e30f3..ba3543745 100644 --- a/src/test/java/dev/openfeature/sdk/TrackingSpecTest.java +++ b/src/test/java/dev/openfeature/sdk/TrackingSpecTest.java @@ -15,7 +15,6 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; import dev.openfeature.sdk.fixtures.ProviderFixture; -import dev.openfeature.sdk.testutils.FeatureProviderTestUtils; import java.util.HashMap; import java.util.Map; import lombok.SneakyThrows; @@ -29,7 +28,7 @@ class TrackingSpecTest { @BeforeEach void getApiInstance() { - api = OpenFeatureAPI.getInstance(); + api = new OpenFeatureAPI(); client = api.getClient(); } @@ -116,7 +115,7 @@ void contextsGetMerged() { client.setEvaluationContext(clCtx); FeatureProvider provider = ProviderFixture.createMockedProvider(); - FeatureProviderTestUtils.setFeatureProvider(provider); + api.setProviderAndWait(provider); client.track("event", new MutableContext().add("my-key", "final"), new MutableTrackingEventDetails(0.0f)); @@ -170,8 +169,7 @@ void eventDetails() { .add("my-struct", new Value(new MutableTrackingEventDetails())); assertEquals(expectedMap, details.asMap()); - assertThatCode(() -> OpenFeatureAPI.getInstance() - .getClient() + assertThatCode(() -> api.getClient() .track("tracking-event-name", new ImmutableContext(), new MutableTrackingEventDetails())) .doesNotThrowAnyException(); @@ -188,8 +186,7 @@ void eventDetails() { ImmutableTrackingEventDetails immutableDetails = new ImmutableTrackingEventDetails(2, expectedMap); assertEquals(expectedImmutable, immutableDetails.asMap()); - assertThatCode(() -> OpenFeatureAPI.getInstance() - .getClient() + assertThatCode(() -> api.getClient() .track("tracking-event-name", new ImmutableContext(), new ImmutableTrackingEventDetails())) .doesNotThrowAnyException(); } diff --git a/src/test/java/dev/openfeature/sdk/arch/ArchitectureTest.java b/src/test/java/dev/openfeature/sdk/arch/ArchitectureTest.java new file mode 100644 index 000000000..8bf8b2888 --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/arch/ArchitectureTest.java @@ -0,0 +1,27 @@ +package dev.openfeature.sdk.arch; + +import static com.tngtech.archunit.base.DescribedPredicate.describe; +import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses; + +import com.tngtech.archunit.junit.AnalyzeClasses; +import com.tngtech.archunit.junit.ArchTest; +import com.tngtech.archunit.lang.ArchRule; + +@AnalyzeClasses(packages = "dev.openfeature.sdk") +public class ArchitectureTest { + + @ArchTest + public static final ArchRule avoidGetInstances = noClasses() + .that() + .resideOutsideOfPackages("..benchmark", "..e2e.*") + .and() + .haveSimpleNameNotEndingWith("SingeltonTest") + .should() + .callMethodWhere(describe( + "Avoid Internal usage of OpenFeatureAPI.GetInstances", + // Target method may not reside in class annotated with BusinessException + methodCall -> + methodCall.getTarget().getOwner().getFullName().equals("dev.openfeature.sdk.OpenFeatureAPI") + // And target method may not have the static modifier + && methodCall.getTarget().getName().equals("getInstance"))); +} diff --git a/src/test/java/dev/openfeature/sdk/providers/memory/InMemoryProviderTest.java b/src/test/java/dev/openfeature/sdk/providers/memory/InMemoryProviderTest.java index 86782b397..4d2a8b287 100644 --- a/src/test/java/dev/openfeature/sdk/providers/memory/InMemoryProviderTest.java +++ b/src/test/java/dev/openfeature/sdk/providers/memory/InMemoryProviderTest.java @@ -12,6 +12,7 @@ import dev.openfeature.sdk.EventDetails; import dev.openfeature.sdk.ImmutableContext; import dev.openfeature.sdk.OpenFeatureAPI; +import dev.openfeature.sdk.OpenFeatureAPITestUtil; import dev.openfeature.sdk.Value; import dev.openfeature.sdk.exceptions.FlagNotFoundError; import dev.openfeature.sdk.exceptions.ProviderNotReadyError; @@ -25,18 +26,20 @@ class InMemoryProviderTest { - private static Client client; + private Client client; - private static InMemoryProvider provider; + private InMemoryProvider provider; + private OpenFeatureAPI api; @SneakyThrows @BeforeEach void beforeEach() { Map> flags = buildFlags(); provider = spy(new InMemoryProvider(flags)); - OpenFeatureAPI.getInstance().onProviderConfigurationChanged(eventDetails -> {}); - OpenFeatureAPI.getInstance().setProviderAndWait(provider); - client = OpenFeatureAPI.getInstance().getClient(); + api = OpenFeatureAPITestUtil.createAPI(); + api.onProviderConfigurationChanged(eventDetails -> {}); + api.setProviderAndWait(provider); + client = api.getClient(); provider.updateFlags(flags); provider.updateFlag( "addedFlag", @@ -107,8 +110,8 @@ void emitChangedFlagsOnlyIfThereAreChangedFlags() { Consumer handler = mock(Consumer.class); Map> flags = buildFlags(); - OpenFeatureAPI.getInstance().onProviderConfigurationChanged(handler); - OpenFeatureAPI.getInstance().setProviderAndWait(provider); + api.onProviderConfigurationChanged(handler); + api.setProviderAndWait(provider); provider.updateFlags(flags); diff --git a/src/test/java/dev/openfeature/sdk/testutils/FeatureProviderTestUtils.java b/src/test/java/dev/openfeature/sdk/testutils/FeatureProviderTestUtils.java deleted file mode 100644 index c9ad77d89..000000000 --- a/src/test/java/dev/openfeature/sdk/testutils/FeatureProviderTestUtils.java +++ /dev/null @@ -1,31 +0,0 @@ -package dev.openfeature.sdk.testutils; - -import static org.awaitility.Awaitility.await; - -import dev.openfeature.sdk.FeatureProvider; -import dev.openfeature.sdk.OpenFeatureAPI; -import java.time.Duration; -import java.util.function.Function; -import lombok.experimental.UtilityClass; - -// todo check the need of this utility class as we now have setProviderAndWait capability -@UtilityClass -public class FeatureProviderTestUtils { - - public static void setFeatureProvider(FeatureProvider provider) { - OpenFeatureAPI.getInstance().setProvider(provider); - waitForProviderInitializationComplete(OpenFeatureAPI::getProvider, provider); - } - - private static void waitForProviderInitializationComplete( - Function extractor, FeatureProvider provider) { - await().pollDelay(Duration.ofMillis(1)) - .atMost(Duration.ofSeconds(1)) - .until(() -> extractor.apply(OpenFeatureAPI.getInstance()).equals(provider)); - } - - public static void setFeatureProvider(String domain, FeatureProvider provider) { - OpenFeatureAPI.getInstance().setProvider(domain, provider); - waitForProviderInitializationComplete(api -> api.getProvider(domain), provider); - } -} From 90217b2083a2ba92c623365dc450326d49b46fab Mon Sep 17 00:00:00 2001 From: Simon Schrottner Date: Tue, 18 Feb 2025 21:58:17 +0100 Subject: [PATCH 018/391] chore: update build and tooling to utilize new java version (#1321) * chore: update build and tooling to utilize new java version Signed-off-by: Simon Schrottner * Fix failing test Signed-off-by: christian.lutnik * chore: update build and tooling to utilize new java version Signed-off-by: Simon Schrottner --------- Signed-off-by: Simon Schrottner Signed-off-by: christian.lutnik Co-authored-by: christian.lutnik --- .github/workflows/merge.yml | 11 +- .github/workflows/pullrequest.yml | 30 +- .github/workflows/release.yml | 8 +- pom.xml | 563 ++++++++++++++++++------------ 4 files changed, 377 insertions(+), 235 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 6ef83234d..4016b9e1d 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -16,15 +16,14 @@ permissions: jobs: build: - runs-on: ubuntu-latest steps: - uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 - - name: Set up JDK 8 + - name: Set up JDK 17 uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 with: - java-version: '8' + java-version: '17' distribution: 'temurin' cache: maven server-id: ossrh @@ -35,9 +34,9 @@ jobs: uses: actions/cache@9fa7e61ec7e1f44ac75218e7aaea81da8856fd11 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ runner.os }}-17-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | - ${{ runner.os }}-maven- + ${{ runner.os }}-17-maven- - name: Configure GPG Key run: | @@ -60,7 +59,7 @@ jobs: # Add -SNAPSHOT before deploy - name: Add SNAPSHOT run: mvn versions:set -DnewVersion='${project.version}-SNAPSHOT' - + - name: Deploy run: | mvn --batch-mode \ diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 70dbb28f6..3a22db334 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -7,7 +7,16 @@ permissions: jobs: build: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest] + build: + - java: 17 + profile: codequality + - java: 8 + profile: java8 + name: with Java ${{ matrix.build.java }} + runs-on: ${{ matrix.os}} steps: - name: Check out the code uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 @@ -15,9 +24,9 @@ jobs: - name: Set up JDK 8 uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 with: - java-version: '8' - distribution: 'temurin' - cache: maven + java-version: ${{ matrix.build.java }} + distribution: 'temurin' + cache: maven - name: Initialize CodeQL uses: github/codeql-action/init@1bb15d06a6fbb5d9d9ffd228746bf8ee208caec8 @@ -27,15 +36,16 @@ jobs: - name: Cache local Maven repository uses: actions/cache@9fa7e61ec7e1f44ac75218e7aaea81da8856fd11 with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- + path: ~/.m2/repository + key: ${{ runner.os }}${{ matrix.build.java }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}${{ matrix.build.java }}-maven- - name: Verify with Maven - run: mvn --batch-mode --update-snapshots --activate-profiles e2e verify + run: mvn --batch-mode --update-snapshots --activate-profiles e2e,${{ matrix.build.profile }} verify - - name: Upload coverage to Codecov + - if: matrix.build.java == '17' + name: Upload coverage to Codecov uses: codecov/codecov-action@v5.3.1 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7342889db..3e4914478 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,17 +23,17 @@ jobs: id: release with: token: ${{secrets.GITHUB_TOKEN}} - default-branch: main + target-branch: main # These steps are only run if this was a merged release-please PR - name: checkout if: ${{ steps.release.outputs.release_created }} uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 - - name: Set up JDK 8 + - name: Set up JDK 17 if: ${{ steps.release.outputs.release_created }} uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 with: - java-version: '8' + java-version: '17' distribution: 'temurin' cache: maven server-id: ossrh @@ -54,4 +54,4 @@ jobs: --settings release/m2-settings.xml clean deploy env: OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} - OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} \ No newline at end of file + OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} diff --git a/pom.xml b/pom.xml index bbc1b8db7..de54a7ce3 100644 --- a/pom.xml +++ b/pom.xml @@ -8,13 +8,19 @@ 1.14.1 + [17,) UTF-8 1.8 ${maven.compiler.source} 5.11.4 + 7.21.1 + 5.2.0 **/e2e/*.java ${project.groupId}.${project.artifactId} + false + + 8 OpenFeature Java SDK @@ -77,7 +83,7 @@ org.mockito mockito-core - 4.11.0 + ${org.mockito.version} test @@ -126,12 +132,14 @@ io.cucumber cucumber-java + ${io.cucumber.version} test io.cucumber cucumber-junit-platform-engine + ${io.cucumber.version} test @@ -207,6 +215,18 @@ + + org.apache.maven.plugins + maven-toolchains-plugin + 3.2.0 + + + + select-jdk-toolchain + + + + org.cyclonedx cyclonedx-maven-plugin @@ -233,37 +253,6 @@ - - maven-dependency-plugin - 3.8.1 - - - verify - - analyze - - - - - true - - com.github.spotbugs:* - org.junit* - com.tngtech.archunit* - org.simplify4u:slf4j2-mock* - - - com.google.guava* - io.cucumber* - org.junit* - com.tngtech.archunit* - com.google.code.findbugs* - com.github.spotbugs* - org.simplify4u:slf4j-mock-common:* - - - - maven-compiler-plugin 3.13.0 @@ -278,6 +267,8 @@ false ${surefireArgLine} + --add-opens java.base/java.util=ALL-UNNAMED + --add-opens java.base/java.lang=ALL-UNNAMED @@ -297,65 +288,6 @@ - - org.jacoco - jacoco-maven-plugin - 0.8.12 - - - - prepare-agent - - prepare-agent - - - - ${project.build.directory}/coverage-reports/jacoco-ut.exec - surefireArgLine - - - - - report - verify - - report - - - - ${project.build.directory}/coverage-reports/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - - jacoco-check - - check - - - ${project.build.directory}/coverage-reports/jacoco-ut.exec - - dev/openfeature/sdk/exceptions/** - - - - - PACKAGE - - - LINE - COVEREDRATIO - 0.80 - - - - - - - - - org.apache.maven.plugins @@ -370,134 +302,264 @@ - - org.apache.maven.plugins - maven-pmd-plugin - 3.26.0 - - - run-pmd - verify - - check - - - - - - - com.github.spotbugs - spotbugs-maven-plugin - 4.8.6.6 - - spotbugs-exclusions.xml - - - com.h3xstream.findsecbugs - findsecbugs-plugin - 1.13.0 - - - - - - - com.github.spotbugs - spotbugs - 4.8.6 - - - - - run-spotbugs - verify - - check - - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.6.0 - - checkstyle.xml - UTF-8 - true - true - false - - - - com.puppycrawl.tools - checkstyle - 9.3 - - - - - validate - validate - - check - - - - - - com.diffplug.spotless - spotless-maven-plugin - 2.30.0 - - - - - - - - - .gitattributes - .gitignore - - - - - - true - 4 - - - - - - - - - true - 4 - - - - - - - - - - - - check - - - - - + + codequality + + true + + + + + maven-dependency-plugin + 3.8.1 + + + verify + + analyze + + + + + true + + com.github.spotbugs:* + org.junit* + com.tngtech.archunit* + org.simplify4u:slf4j2-mock* + + + com.google.guava* + io.cucumber* + org.junit* + com.tngtech.archunit* + com.google.code.findbugs* + com.github.spotbugs* + org.simplify4u:slf4j-mock-common:* + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.12 + + + + prepare-agent + + prepare-agent + + + + ${project.build.directory}/coverage-reports/jacoco-ut.exec + surefireArgLine + + + + + report + verify + + report + + + + ${project.build.directory}/coverage-reports/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + + jacoco-check + + check + + + ${project.build.directory}/coverage-reports/jacoco-ut.exec + + dev/openfeature/sdk/exceptions/** + + + + + PACKAGE + + + LINE + COVEREDRATIO + 0.80 + + + + + + + + + + + com.github.spotbugs + spotbugs-maven-plugin + 4.8.6.6 + + spotbugs-exclusions.xml + + + com.h3xstream.findsecbugs + findsecbugs-plugin + 1.13.0 + + + + + + + com.github.spotbugs + spotbugs + 4.8.6 + + + + + run-spotbugs + verify + + check + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.6.0 + + checkstyle.xml + true + true + false + + + + com.puppycrawl.tools + checkstyle + 9.3 + + + + + validate + validate + + check + + + + + + com.diffplug.spotless + spotless-maven-plugin + 2.30.0 + + + + + + + + + .gitattributes + .gitignore + + + + + + true + 4 + + + + + + + + + true + 4 + + + + + + + + + + + + check + + + + + + com.diffplug.spotless + spotless-maven-plugin + 2.43.0 + + + + + + + + + .gitattributes + .gitignore + + + + + + true + 4 + + + + + + + + + true + 4 + + + + + + + + + + + + check + + + + + + + deploy @@ -639,6 +701,77 @@ + + + + java8 + + + + (1.8,9) + true + + + + + + org.apache.maven.plugins + maven-toolchains-plugin + 3.2.0 + + + + select-jdk-toolchain + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.5.2 + + + ${surefireArgLine} + + + + ${testExclusions} + + + ${skip.tests} + + + + org.apache.maven.plugins + maven-failsafe-plugin + 3.5.2 + + + ${surefireArgLine} + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.13.0 + + + default-testCompile + test-compile + + testCompile + + + true + + + + + + + From 4817864fd7ae70c1e19c3c09e82e1fb03dd88942 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 18 Feb 2025 22:10:34 +0100 Subject: [PATCH 019/391] chore(deps): update dependency org.mockito:mockito-core to v5.15.2 (#1339) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index de54a7ce3..83d06efbc 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ ${maven.compiler.source} 5.11.4 7.21.1 - 5.2.0 + 5.15.2 **/e2e/*.java ${project.groupId}.${project.artifactId} From 4e535fd10fac742ca472faa62c941fa51b282ca7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 02:13:36 +0000 Subject: [PATCH 020/391] chore(deps): update github/codeql-action digest to d99c7e8 (#1338) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 3a22db334..cf8e85cba 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@1bb15d06a6fbb5d9d9ffd228746bf8ee208caec8 + uses: github/codeql-action/init@d99c7e8e5b6aca5b6a17459f07d4dc8f8a3b7823 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@1bb15d06a6fbb5d9d9ffd228746bf8ee208caec8 + uses: github/codeql-action/analyze@d99c7e8e5b6aca5b6a17459f07d4dc8f8a3b7823 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 8bf7512fa..acca30a48 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@1bb15d06a6fbb5d9d9ffd228746bf8ee208caec8 + uses: github/codeql-action/init@d99c7e8e5b6aca5b6a17459f07d4dc8f8a3b7823 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@1bb15d06a6fbb5d9d9ffd228746bf8ee208caec8 + uses: github/codeql-action/autobuild@d99c7e8e5b6aca5b6a17459f07d4dc8f8a3b7823 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@1bb15d06a6fbb5d9d9ffd228746bf8ee208caec8 + uses: github/codeql-action/analyze@d99c7e8e5b6aca5b6a17459f07d4dc8f8a3b7823 From 3920c638a49caddfb07041f812cc6bc0bf3101f9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 06:22:52 +0000 Subject: [PATCH 021/391] chore(deps): update actions/cache digest to 7921ae2 (#1337) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 4016b9e1d..a76348f98 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -31,7 +31,7 @@ jobs: server-password: ${{ secrets.OSSRH_PASSWORD }} - name: Cache local Maven repository - uses: actions/cache@9fa7e61ec7e1f44ac75218e7aaea81da8856fd11 + uses: actions/cache@7921ae235bdcb376cc8f22558dc5f8ddc3c3c2f9 with: path: ~/.m2/repository key: ${{ runner.os }}-17-maven-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index cf8e85cba..1c5bdf1ed 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -34,7 +34,7 @@ jobs: languages: java - name: Cache local Maven repository - uses: actions/cache@9fa7e61ec7e1f44ac75218e7aaea81da8856fd11 + uses: actions/cache@7921ae235bdcb376cc8f22558dc5f8ddc3c3c2f9 with: path: ~/.m2/repository key: ${{ runner.os }}${{ matrix.build.java }}-maven-${{ hashFiles('**/pom.xml') }} From cdcdc143ea5ad2f003cb3f5450ec78314e619ea3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 10:06:15 +0000 Subject: [PATCH 022/391] chore(deps): update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.9.1.0 (#1332) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 83d06efbc..728d45b95 100644 --- a/pom.xml +++ b/pom.xml @@ -406,7 +406,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.8.6.6 + 4.9.1.0 spotbugs-exclusions.xml From dd9227a9242451c57250de85701c10ddcc75dc71 Mon Sep 17 00:00:00 2001 From: chrfwow Date: Wed, 19 Feb 2025 16:27:46 +0100 Subject: [PATCH 023/391] feat: update test harness with metadata assertions #1467 (#1319) * feat: implement gherkin tests Signed-off-by: christian.lutnik * fixup! feat: implement gherkin tests Signed-off-by: christian.lutnik * fixup! feat: implement gherkin tests Signed-off-by: christian.lutnik * fixup! feat: implement gherkin tests Signed-off-by: christian.lutnik * fixup: add version for dependency Signed-off-by: Simon Schrottner --------- Signed-off-by: christian.lutnik Signed-off-by: Simon Schrottner Co-authored-by: Simon Schrottner --- pom.xml | 22 ++-- .../openfeature/sdk/ImmutableMetadata.java | 4 + .../openfeature/sdk/OpenFeatureClient.java | 2 +- .../sdk/providers/memory/Flag.java | 2 + .../providers/memory/InMemoryProvider.java | 1 + .../dev/openfeature/sdk/FlagMetadataTest.java | 29 ++++- .../openfeature/sdk/e2e/EvaluationTest.java | 8 +- .../java/dev/openfeature/sdk/e2e/Flag.java | 13 +++ .../dev/openfeature/sdk/e2e/MockHook.java | 50 +++++++++ .../java/dev/openfeature/sdk/e2e/State.java | 13 +++ .../java/dev/openfeature/sdk/e2e/Utils.java | 28 +++++ .../sdk/e2e/steps/FlagStepDefinitions.java | 104 ++++++++++++++++++ .../openfeature/sdk/e2e/steps/HookSteps.java | 84 ++++++++++++++ .../sdk/e2e/steps/ProviderSteps.java | 26 +++++ .../StepDefinitions.java | 2 +- .../sdk/testutils/TestFlagsUtils.java | 16 +++ 16 files changed, 381 insertions(+), 23 deletions(-) create mode 100644 src/test/java/dev/openfeature/sdk/e2e/Flag.java create mode 100644 src/test/java/dev/openfeature/sdk/e2e/MockHook.java create mode 100644 src/test/java/dev/openfeature/sdk/e2e/State.java create mode 100644 src/test/java/dev/openfeature/sdk/e2e/Utils.java create mode 100644 src/test/java/dev/openfeature/sdk/e2e/steps/FlagStepDefinitions.java create mode 100644 src/test/java/dev/openfeature/sdk/e2e/steps/HookSteps.java create mode 100644 src/test/java/dev/openfeature/sdk/e2e/steps/ProviderSteps.java rename src/test/java/dev/openfeature/sdk/e2e/{evaluation => steps}/StepDefinitions.java (99%) diff --git a/pom.xml b/pom.xml index 728d45b95..d850e4f0c 100644 --- a/pom.xml +++ b/pom.xml @@ -143,6 +143,13 @@ test + + io.cucumber + cucumber-picocontainer + ${io.cucumber.version} + test + + org.simplify4u slf4j2-mock @@ -681,21 +688,6 @@ - - copy-evaluation-gherkin-tests - validate - - exec - - - - cp - - spec/specification/assets/gherkin/evaluation.feature - src/test/resources/features/ - - - diff --git a/src/main/java/dev/openfeature/sdk/ImmutableMetadata.java b/src/main/java/dev/openfeature/sdk/ImmutableMetadata.java index c2b6f5838..f8311a9a5 100644 --- a/src/main/java/dev/openfeature/sdk/ImmutableMetadata.java +++ b/src/main/java/dev/openfeature/sdk/ImmutableMetadata.java @@ -97,6 +97,10 @@ public T getValue(final String key, final Class type) { } } + public boolean isEmpty() { + return metadata.isEmpty(); + } + /** * Obtain a builder for {@link ImmutableMetadata}. */ diff --git a/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java b/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java index a393d83e8..3022ff006 100644 --- a/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java +++ b/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java @@ -217,7 +217,7 @@ private FlagEvaluationDetails evaluateFlag( } } catch (Exception e) { if (details == null) { - details = FlagEvaluationDetails.builder().build(); + details = FlagEvaluationDetails.builder().flagKey(key).build(); } if (e instanceof OpenFeatureError) { details.setErrorCode(((OpenFeatureError) e).getErrorCode()); diff --git a/src/main/java/dev/openfeature/sdk/providers/memory/Flag.java b/src/main/java/dev/openfeature/sdk/providers/memory/Flag.java index 61778d85b..f2dc6b495 100644 --- a/src/main/java/dev/openfeature/sdk/providers/memory/Flag.java +++ b/src/main/java/dev/openfeature/sdk/providers/memory/Flag.java @@ -1,5 +1,6 @@ package dev.openfeature.sdk.providers.memory; +import dev.openfeature.sdk.ImmutableMetadata; import java.util.Map; import lombok.Builder; import lombok.Getter; @@ -18,4 +19,5 @@ public class Flag { private String defaultVariant; private ContextEvaluator contextEvaluator; + private ImmutableMetadata flagMetadata; } diff --git a/src/main/java/dev/openfeature/sdk/providers/memory/InMemoryProvider.java b/src/main/java/dev/openfeature/sdk/providers/memory/InMemoryProvider.java index d3fdb985c..3be1b6316 100644 --- a/src/main/java/dev/openfeature/sdk/providers/memory/InMemoryProvider.java +++ b/src/main/java/dev/openfeature/sdk/providers/memory/InMemoryProvider.java @@ -152,6 +152,7 @@ private ProviderEvaluation getEvaluation( .value(value) .variant(flag.getDefaultVariant()) .reason(Reason.STATIC.toString()) + .flagMetadata(flag.getFlagMetadata()) .build(); } } diff --git a/src/test/java/dev/openfeature/sdk/FlagMetadataTest.java b/src/test/java/dev/openfeature/sdk/FlagMetadataTest.java index f8b9ba58e..26d0421cd 100644 --- a/src/test/java/dev/openfeature/sdk/FlagMetadataTest.java +++ b/src/test/java/dev/openfeature/sdk/FlagMetadataTest.java @@ -1,6 +1,8 @@ package dev.openfeature.sdk; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -9,7 +11,7 @@ class FlagMetadataTest { @Test @DisplayName("Test metadata payload construction and retrieval") - public void builder_validation() { + void builder_validation() { // given ImmutableMetadata flagMetadata = ImmutableMetadata.builder() .addString("string", "string") @@ -42,7 +44,7 @@ public void builder_validation() { @Test @DisplayName("Value type mismatch returns a null") - public void value_type_validation() { + void value_type_validation() { // given ImmutableMetadata flagMetadata = ImmutableMetadata.builder().addString("string", "string").build(); @@ -53,11 +55,32 @@ public void value_type_validation() { @Test @DisplayName("A null is returned if key does not exist") - public void notfound_error_validation() { + void notfound_error_validation() { // given ImmutableMetadata flagMetadata = ImmutableMetadata.builder().build(); // then assertThat(flagMetadata.getBoolean("string")).isNull(); } + + @Test + @DisplayName("isEmpty returns true iff the metadata is empty") + void isEmpty_returns_true_if_metadata_is_empty() { + // given + ImmutableMetadata flagMetadata = ImmutableMetadata.builder().build(); + + // then + assertTrue(flagMetadata.isEmpty()); + } + + @Test + @DisplayName("isEmpty returns false iff the metadata is not empty") + void isEmpty_returns_false_if_metadata_is_not_empty() { + // given + ImmutableMetadata flagMetadata = + ImmutableMetadata.builder().addString("a", "b").build(); + + // then + assertFalse(flagMetadata.isEmpty()); + } } diff --git a/src/test/java/dev/openfeature/sdk/e2e/EvaluationTest.java b/src/test/java/dev/openfeature/sdk/e2e/EvaluationTest.java index 8a3381412..b7c834312 100644 --- a/src/test/java/dev/openfeature/sdk/e2e/EvaluationTest.java +++ b/src/test/java/dev/openfeature/sdk/e2e/EvaluationTest.java @@ -1,16 +1,18 @@ package dev.openfeature.sdk.e2e; import static io.cucumber.junit.platform.engine.Constants.GLUE_PROPERTY_NAME; +import static io.cucumber.junit.platform.engine.Constants.OBJECT_FACTORY_PROPERTY_NAME; import static io.cucumber.junit.platform.engine.Constants.PLUGIN_PROPERTY_NAME; import org.junit.platform.suite.api.ConfigurationParameter; import org.junit.platform.suite.api.IncludeEngines; -import org.junit.platform.suite.api.SelectClasspathResource; +import org.junit.platform.suite.api.SelectDirectories; import org.junit.platform.suite.api.Suite; @Suite @IncludeEngines("cucumber") -@SelectClasspathResource("features/evaluation.feature") +@SelectDirectories("spec/specification/assets/gherkin") @ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty") -@ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "dev.openfeature.sdk.e2e.evaluation") +@ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "dev.openfeature.sdk.e2e.steps") +@ConfigurationParameter(key = OBJECT_FACTORY_PROPERTY_NAME, value = "io.cucumber.picocontainer.PicoFactory") public class EvaluationTest {} diff --git a/src/test/java/dev/openfeature/sdk/e2e/Flag.java b/src/test/java/dev/openfeature/sdk/e2e/Flag.java new file mode 100644 index 000000000..2c4ffdb57 --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/e2e/Flag.java @@ -0,0 +1,13 @@ +package dev.openfeature.sdk.e2e; + +public class Flag { + public String name; + public Object defaultValue; + public String type; + + public Flag(String type, String name, Object defaultValue) { + this.name = name; + this.defaultValue = defaultValue; + this.type = type; + } +} diff --git a/src/test/java/dev/openfeature/sdk/e2e/MockHook.java b/src/test/java/dev/openfeature/sdk/e2e/MockHook.java new file mode 100644 index 000000000..ac107cfd6 --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/e2e/MockHook.java @@ -0,0 +1,50 @@ +package dev.openfeature.sdk.e2e; + +import dev.openfeature.sdk.EvaluationContext; +import dev.openfeature.sdk.FlagEvaluationDetails; +import dev.openfeature.sdk.Hook; +import dev.openfeature.sdk.HookContext; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; +import lombok.Getter; + +public class MockHook implements Hook { + @Getter + private boolean beforeCalled; + + @Getter + private boolean afterCalled; + + @Getter + private boolean errorCalled; + + @Getter + private boolean finallyAfterCalled; + + @Getter + private final Map evaluationDetails = new HashMap<>(); + + @Override + public Optional before(HookContext ctx, Map hints) { + beforeCalled = true; + return Optional.of(ctx.getCtx()); + } + + @Override + public void after(HookContext ctx, FlagEvaluationDetails details, Map hints) { + afterCalled = true; + evaluationDetails.put("after", details); + } + + @Override + public void error(HookContext ctx, Exception error, Map hints) { + errorCalled = true; + } + + @Override + public void finallyAfter(HookContext ctx, FlagEvaluationDetails details, Map hints) { + finallyAfterCalled = true; + evaluationDetails.put("finally", details); + } +} diff --git a/src/test/java/dev/openfeature/sdk/e2e/State.java b/src/test/java/dev/openfeature/sdk/e2e/State.java new file mode 100644 index 000000000..ee513b00e --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/e2e/State.java @@ -0,0 +1,13 @@ +package dev.openfeature.sdk.e2e; + +import dev.openfeature.sdk.Client; +import dev.openfeature.sdk.FlagEvaluationDetails; +import dev.openfeature.sdk.MutableContext; + +public class State { + public Client client; + public Flag flag; + public MutableContext context = new MutableContext(); + public FlagEvaluationDetails evaluation; + public MockHook hook; +} diff --git a/src/test/java/dev/openfeature/sdk/e2e/Utils.java b/src/test/java/dev/openfeature/sdk/e2e/Utils.java new file mode 100644 index 000000000..902ee11d0 --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/e2e/Utils.java @@ -0,0 +1,28 @@ +package dev.openfeature.sdk.e2e; + +import java.util.Objects; + +public final class Utils { + + private Utils() {} + + public static Object convert(String value, String type) { + if (Objects.equals(value, "null")) { + return null; + } + switch (type.toLowerCase()) { + case "boolean": + return Boolean.parseBoolean(value); + case "string": + return value; + case "integer": + return Integer.parseInt(value); + case "float": + case "double": + return Double.parseDouble(value); + case "long": + return Long.parseLong(value); + } + throw new RuntimeException("Unknown config type: " + type); + } +} diff --git a/src/test/java/dev/openfeature/sdk/e2e/steps/FlagStepDefinitions.java b/src/test/java/dev/openfeature/sdk/e2e/steps/FlagStepDefinitions.java new file mode 100644 index 000000000..390e067f3 --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/e2e/steps/FlagStepDefinitions.java @@ -0,0 +1,104 @@ +package dev.openfeature.sdk.e2e.steps; + +import static org.assertj.core.api.Assertions.assertThat; + +import dev.openfeature.sdk.FlagEvaluationDetails; +import dev.openfeature.sdk.ImmutableMetadata; +import dev.openfeature.sdk.Value; +import dev.openfeature.sdk.e2e.Flag; +import dev.openfeature.sdk.e2e.State; +import dev.openfeature.sdk.e2e.Utils; +import io.cucumber.datatable.DataTable; +import io.cucumber.java.en.Given; +import io.cucumber.java.en.Then; +import io.cucumber.java.en.When; +import java.lang.reflect.Field; +import java.util.HashMap; +import java.util.List; + +public class FlagStepDefinitions { + private final State state; + + public FlagStepDefinitions(State state) { + this.state = state; + } + + @Given("a {}-flag with key {string} and a default value {string}") + public void givenAFlag(String type, String name, String defaultValue) { + state.flag = new Flag(type, name, Utils.convert(defaultValue, type)); + } + + @When("the flag was evaluated with details") + public void the_flag_was_evaluated_with_details() { + FlagEvaluationDetails details; + switch (state.flag.type.toLowerCase()) { + case "string": + details = + state.client.getStringDetails(state.flag.name, (String) state.flag.defaultValue, state.context); + break; + case "boolean": + details = state.client.getBooleanDetails( + state.flag.name, (Boolean) state.flag.defaultValue, state.context); + break; + case "float": + details = + state.client.getDoubleDetails(state.flag.name, (Double) state.flag.defaultValue, state.context); + break; + case "integer": + details = state.client.getIntegerDetails( + state.flag.name, (Integer) state.flag.defaultValue, state.context); + break; + case "object": + details = + state.client.getObjectDetails(state.flag.name, (Value) state.flag.defaultValue, state.context); + break; + default: + throw new AssertionError(); + } + state.evaluation = details; + } + + @Then("the resolved details value should be {string}") + public void the_resolved_details_value_should_be(String value) { + assertThat(state.evaluation.getValue()).isEqualTo(Utils.convert(value, state.flag.type)); + } + + @Then("the reason should be {string}") + public void the_reason_should_be(String reason) { + assertThat(state.evaluation.getReason()).isEqualTo(reason); + } + + @Then("the variant should be {string}") + public void the_variant_should_be(String variant) { + assertThat(state.evaluation.getVariant()).isEqualTo(variant); + } + + @Then("the resolved metadata value \"{}\" with type \"{}\" should be \"{}\"") + public void theResolvedMetadataValueShouldBe(String key, String type, String value) + throws NoSuchFieldException, IllegalAccessException { + Field f = state.evaluation.getFlagMetadata().getClass().getDeclaredField("metadata"); + f.setAccessible(true); + HashMap metadata = (HashMap) f.get(state.evaluation.getFlagMetadata()); + assertThat(metadata).containsEntry(key, Utils.convert(value, type)); + } + + @Then("the resolved metadata is empty") + public void theResolvedMetadataIsEmpty() { + assertThat(state.evaluation.getFlagMetadata().isEmpty()).isTrue(); + } + + @Then("the resolved metadata should contain") + public void theResolvedMetadataShouldContain(DataTable dataTable) { + ImmutableMetadata evaluationMetadata = state.evaluation.getFlagMetadata(); + List> asLists = dataTable.asLists(); + for (int i = 1; i < asLists.size(); i++) { // skip the header of the table + List line = asLists.get(i); + String key = line.get(0); + String metadataType = line.get(1); + Object value = Utils.convert(line.get(2), metadataType); + + assertThat(value).isNotNull(); + assertThat(evaluationMetadata.getValue(key, value.getClass())).isEqualTo(value); + } + } +} diff --git a/src/test/java/dev/openfeature/sdk/e2e/steps/HookSteps.java b/src/test/java/dev/openfeature/sdk/e2e/steps/HookSteps.java new file mode 100644 index 000000000..1e6a9172f --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/e2e/steps/HookSteps.java @@ -0,0 +1,84 @@ +package dev.openfeature.sdk.e2e.steps; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import dev.openfeature.sdk.FlagEvaluationDetails; +import dev.openfeature.sdk.e2e.MockHook; +import dev.openfeature.sdk.e2e.State; +import dev.openfeature.sdk.e2e.Utils; +import io.cucumber.datatable.DataTable; +import io.cucumber.java.en.And; +import io.cucumber.java.en.Given; +import io.cucumber.java.en.Then; +import java.util.List; +import java.util.Map; + +public class HookSteps { + private final State state; + + public HookSteps(State state) { + this.state = state; + } + + @Given("a client with added hook") + public void aClientWithAddedHook() { + MockHook hook = new MockHook(); + state.hook = hook; + state.client.addHooks(hook); + } + + @Then("the {string} hook should have been executed") + public void theHookShouldHaveBeenExecuted(String hookName) { + assertHookCalled(hookName); + } + + public void assertHookCalled(String hookName) { + if ("before".equals(hookName)) { + assertTrue(state.hook.isBeforeCalled()); + } else if ("after".equals(hookName)) { + assertTrue(state.hook.isAfterCalled()); + } else if ("error".equals(hookName)) { + assertTrue(state.hook.isErrorCalled()); + } else if ("finally".equals(hookName)) { + assertTrue(state.hook.isFinallyAfterCalled()); + } else { + throw new IllegalArgumentException(hookName + " is not a valid hook name"); + } + } + + @And("the {string} hooks should be called with evaluation details") + public void theHooksShouldBeCalledWithEvaluationDetails(String hookNames, DataTable data) { + for (String hookName : hookNames.split(", ")) { + assertHookCalled(hookName); + FlagEvaluationDetails evaluationDetails = + state.hook.getEvaluationDetails().get(hookName); + assertNotNull(evaluationDetails); + List> dataEntries = data.asMaps(); + for (Map line : dataEntries) { + String key = line.get("key"); + Object expected = Utils.convert(line.get("value"), line.get("data_type")); + Object actual; + if ("flag_key".equals(key)) { + actual = evaluationDetails.getFlagKey(); + } else if ("value".equals(key)) { + actual = evaluationDetails.getValue(); + } else if ("variant".equals(key)) { + actual = evaluationDetails.getVariant(); + } else if ("reason".equals(key)) { + actual = evaluationDetails.getReason(); + } else if ("error_code".equals(key)) { + actual = evaluationDetails.getErrorCode(); + if (actual != null) { + actual = actual.toString(); + } + } else { + throw new IllegalArgumentException(key + " is not a valid key"); + } + + assertEquals(expected, actual); + } + } + } +} diff --git a/src/test/java/dev/openfeature/sdk/e2e/steps/ProviderSteps.java b/src/test/java/dev/openfeature/sdk/e2e/steps/ProviderSteps.java new file mode 100644 index 000000000..82cdb2e79 --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/e2e/steps/ProviderSteps.java @@ -0,0 +1,26 @@ +package dev.openfeature.sdk.e2e.steps; + +import static dev.openfeature.sdk.testutils.TestFlagsUtils.buildFlags; + +import dev.openfeature.sdk.OpenFeatureAPI; +import dev.openfeature.sdk.e2e.State; +import dev.openfeature.sdk.providers.memory.Flag; +import dev.openfeature.sdk.providers.memory.InMemoryProvider; +import io.cucumber.java.en.Given; +import java.util.Map; + +public class ProviderSteps { + private final State state; + + public ProviderSteps(State state) { + this.state = state; + } + + @Given("a stable provider") + public void aStableProvider() { + Map> flags = buildFlags(); + InMemoryProvider provider = new InMemoryProvider(flags); + OpenFeatureAPI.getInstance().setProviderAndWait(provider); + state.client = OpenFeatureAPI.getInstance().getClient(); + } +} diff --git a/src/test/java/dev/openfeature/sdk/e2e/evaluation/StepDefinitions.java b/src/test/java/dev/openfeature/sdk/e2e/steps/StepDefinitions.java similarity index 99% rename from src/test/java/dev/openfeature/sdk/e2e/evaluation/StepDefinitions.java rename to src/test/java/dev/openfeature/sdk/e2e/steps/StepDefinitions.java index c1e56429d..6897e2738 100644 --- a/src/test/java/dev/openfeature/sdk/e2e/evaluation/StepDefinitions.java +++ b/src/test/java/dev/openfeature/sdk/e2e/steps/StepDefinitions.java @@ -1,4 +1,4 @@ -package dev.openfeature.sdk.e2e.evaluation; +package dev.openfeature.sdk.e2e.steps; import static dev.openfeature.sdk.testutils.TestFlagsUtils.buildFlags; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/dev/openfeature/sdk/testutils/TestFlagsUtils.java b/src/test/java/dev/openfeature/sdk/testutils/TestFlagsUtils.java index 157b07175..c1767ff6f 100644 --- a/src/test/java/dev/openfeature/sdk/testutils/TestFlagsUtils.java +++ b/src/test/java/dev/openfeature/sdk/testutils/TestFlagsUtils.java @@ -3,6 +3,7 @@ import static dev.openfeature.sdk.Structure.mapToStructure; import com.google.common.collect.ImmutableMap; +import dev.openfeature.sdk.ImmutableMetadata; import dev.openfeature.sdk.Value; import dev.openfeature.sdk.providers.memory.Flag; import java.util.HashMap; @@ -22,9 +23,11 @@ public class TestFlagsUtils { public static final String OBJECT_FLAG_KEY = "object-flag"; public static final String CONTEXT_AWARE_FLAG_KEY = "context-aware"; public static final String WRONG_FLAG_KEY = "wrong-flag"; + public static final String METADATA_FLAG_KEY = "metadata-flag"; /** * Building flags for testing purposes. + * * @return map of flags */ public static Map> buildFlags() { @@ -90,6 +93,19 @@ public static Map> buildFlags() { .variant("two", "dos") .defaultVariant("one") .build()); + flags.put( + METADATA_FLAG_KEY, + Flag.builder() + .variant("on", true) + .variant("off", false) + .defaultVariant("on") + .flagMetadata(ImmutableMetadata.builder() + .addString("string", "1.0.2") + .addInteger("integer", 2) + .addBoolean("boolean", true) + .addDouble("float", 0.1d) + .build()) + .build()); return flags; } } From 50b45b2be442bb89a431c9bcc45d825f63bd93a6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 21:38:42 +0000 Subject: [PATCH 024/391] chore(deps): update github/codeql-action digest to ff79de6 (#1340) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 1c5bdf1ed..e53191f9b 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@d99c7e8e5b6aca5b6a17459f07d4dc8f8a3b7823 + uses: github/codeql-action/init@ff79de67cc25c7617163ae1e4b8aa23b902fdf15 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@d99c7e8e5b6aca5b6a17459f07d4dc8f8a3b7823 + uses: github/codeql-action/analyze@ff79de67cc25c7617163ae1e4b8aa23b902fdf15 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index acca30a48..4883c6268 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@d99c7e8e5b6aca5b6a17459f07d4dc8f8a3b7823 + uses: github/codeql-action/init@ff79de67cc25c7617163ae1e4b8aa23b902fdf15 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@d99c7e8e5b6aca5b6a17459f07d4dc8f8a3b7823 + uses: github/codeql-action/autobuild@ff79de67cc25c7617163ae1e4b8aa23b902fdf15 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@d99c7e8e5b6aca5b6a17459f07d4dc8f8a3b7823 + uses: github/codeql-action/analyze@ff79de67cc25c7617163ae1e4b8aa23b902fdf15 From 88a778cc03e112d45756428d1f0ae1ef0fe02c84 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 22 Feb 2025 01:27:57 +0000 Subject: [PATCH 025/391] chore(deps): update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.14.0 (#1342) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index d850e4f0c..c67645f51 100644 --- a/pom.xml +++ b/pom.xml @@ -262,7 +262,7 @@ maven-compiler-plugin - 3.13.0 + 3.14.0 @@ -747,7 +747,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.13.0 + 3.14.0 default-testCompile From 1504d0f7982757a2b413eda593ce7057b90519e5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 22 Feb 2025 07:00:59 +0000 Subject: [PATCH 026/391] chore(deps): update dependency org.awaitility:awaitility to v4.3.0 (#1343) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c67645f51..a435bc890 100644 --- a/pom.xml +++ b/pom.xml @@ -167,7 +167,7 @@ org.awaitility awaitility - 4.2.2 + 4.3.0 test From d95e2706532259bd5739e5b4ea4813ef9f2196a6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 22 Feb 2025 09:50:37 +0000 Subject: [PATCH 027/391] fix(deps): update junit5 monorepo (#1344) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index a435bc890..c90352b32 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ UTF-8 1.8 ${maven.compiler.source} - 5.11.4 + 5.12.0 7.21.1 5.15.2 @@ -125,7 +125,7 @@ org.junit.platform junit-platform-suite - 1.11.4 + 1.12.0 test @@ -212,7 +212,7 @@ org.junit junit-bom - 5.11.4 + 5.12.0 pom import From de64eddfb3a6cc117bb108dbcf167830e9f6729d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 25 Feb 2025 06:00:41 +0000 Subject: [PATCH 028/391] chore(deps): update github/codeql-action digest to a8849fb (#1345) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index e53191f9b..3e5645e4f 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@ff79de67cc25c7617163ae1e4b8aa23b902fdf15 + uses: github/codeql-action/init@a8849fbe6341625acb2e18f7f32e53b734d6e1e3 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ff79de67cc25c7617163ae1e4b8aa23b902fdf15 + uses: github/codeql-action/analyze@a8849fbe6341625acb2e18f7f32e53b734d6e1e3 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 4883c6268..039a43dea 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@ff79de67cc25c7617163ae1e4b8aa23b902fdf15 + uses: github/codeql-action/init@a8849fbe6341625acb2e18f7f32e53b734d6e1e3 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@ff79de67cc25c7617163ae1e4b8aa23b902fdf15 + uses: github/codeql-action/autobuild@a8849fbe6341625acb2e18f7f32e53b734d6e1e3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ff79de67cc25c7617163ae1e4b8aa23b902fdf15 + uses: github/codeql-action/analyze@a8849fbe6341625acb2e18f7f32e53b734d6e1e3 From 5de33c02a675db6ca5966bfa3f58d99c8e53e36b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 25 Feb 2025 08:15:15 +0100 Subject: [PATCH 029/391] chore(deps): update dependency com.diffplug.spotless:spotless-maven-plugin to v2.44.3 (#1341) * chore(deps): update dependency com.diffplug.spotless:spotless-maven-plugin to v2.44.3 * fixup: fix spotless violation Signed-off-by: Simon Schrottner --------- Signed-off-by: Simon Schrottner Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Simon Schrottner --- .gitattributes | 1 - pom.xml | 49 +------------------------------------------------ 2 files changed, 1 insertion(+), 49 deletions(-) diff --git a/.gitattributes b/.gitattributes index 00a51aff5..022b84144 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,4 +3,3 @@ # # These are explicitly windows files and should use crlf *.bat text eol=crlf - diff --git a/pom.xml b/pom.xml index c90352b32..36797998f 100644 --- a/pom.xml +++ b/pom.xml @@ -473,54 +473,7 @@ com.diffplug.spotless spotless-maven-plugin - 2.30.0 - - - - - - - - - .gitattributes - .gitignore - - - - - - true - 4 - - - - - - - - - true - 4 - - - - - - - - - - - - check - - - - - - com.diffplug.spotless - spotless-maven-plugin - 2.43.0 + 2.44.3 From 698756856ba40e98d91ccf661dab409798861aa5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 25 Feb 2025 21:49:59 +0000 Subject: [PATCH 030/391] chore(deps): update github/codeql-action digest to 8c69433 (#1347) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 3e5645e4f..819a7abe3 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@a8849fbe6341625acb2e18f7f32e53b734d6e1e3 + uses: github/codeql-action/init@8c69433c34fe91b0644d83e6f14bb77eb3e46812 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@a8849fbe6341625acb2e18f7f32e53b734d6e1e3 + uses: github/codeql-action/analyze@8c69433c34fe91b0644d83e6f14bb77eb3e46812 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 039a43dea..4361546f5 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@a8849fbe6341625acb2e18f7f32e53b734d6e1e3 + uses: github/codeql-action/init@8c69433c34fe91b0644d83e6f14bb77eb3e46812 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@a8849fbe6341625acb2e18f7f32e53b734d6e1e3 + uses: github/codeql-action/autobuild@8c69433c34fe91b0644d83e6f14bb77eb3e46812 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@a8849fbe6341625acb2e18f7f32e53b734d6e1e3 + uses: github/codeql-action/analyze@8c69433c34fe91b0644d83e6f14bb77eb3e46812 From 2ec7c6c7ff704380fdfd8116378adf78734e4f2b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 26 Feb 2025 02:09:26 +0000 Subject: [PATCH 031/391] fix(deps): update dependency org.slf4j:slf4j-api to v2.0.17 (#1348) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 36797998f..29a371938 100644 --- a/pom.xml +++ b/pom.xml @@ -69,7 +69,7 @@ org.slf4j slf4j-api - 2.0.16 + 2.0.17 From 7df9565691731d164b534116b8a6b933b171d103 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 26 Feb 2025 23:30:46 +0000 Subject: [PATCH 032/391] chore(deps): update github/codeql-action digest to 97aac9b (#1350) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 819a7abe3..cbc5b0db7 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@8c69433c34fe91b0644d83e6f14bb77eb3e46812 + uses: github/codeql-action/init@97aac9bb5668e73a3626129e9abc4164b2de3a7a with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@8c69433c34fe91b0644d83e6f14bb77eb3e46812 + uses: github/codeql-action/analyze@97aac9bb5668e73a3626129e9abc4164b2de3a7a diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 4361546f5..58f4adbcd 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@8c69433c34fe91b0644d83e6f14bb77eb3e46812 + uses: github/codeql-action/init@97aac9bb5668e73a3626129e9abc4164b2de3a7a with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@8c69433c34fe91b0644d83e6f14bb77eb3e46812 + uses: github/codeql-action/autobuild@97aac9bb5668e73a3626129e9abc4164b2de3a7a - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@8c69433c34fe91b0644d83e6f14bb77eb3e46812 + uses: github/codeql-action/analyze@97aac9bb5668e73a3626129e9abc4164b2de3a7a From b133c2fa527a0dddb6de7f7781a00fc84feaa813 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 06:59:17 +0000 Subject: [PATCH 033/391] chore(deps): update codecov/codecov-action action to v5.4.0 (#1351) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index a76348f98..e8bfeac71 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -48,7 +48,7 @@ jobs: run: mvn --batch-mode --update-snapshots verify - name: Upload coverage to Codecov - uses: codecov/codecov-action@v5.3.1 + uses: codecov/codecov-action@v5.4.0 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos flags: unittests # optional diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index cbc5b0db7..144abda84 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -46,7 +46,7 @@ jobs: - if: matrix.build.java == '17' name: Upload coverage to Codecov - uses: codecov/codecov-action@v5.3.1 + uses: codecov/codecov-action@v5.4.0 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos flags: unittests # optional From 989f4ae54263b46ca2c81561acc70b39918c382d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 16:13:25 +0000 Subject: [PATCH 034/391] chore(deps): update github/codeql-action digest to 8392354 (#1352) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 144abda84..c605e05da 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@97aac9bb5668e73a3626129e9abc4164b2de3a7a + uses: github/codeql-action/init@83923549f688e42b34d0b90ee94725f7c30532fc with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@97aac9bb5668e73a3626129e9abc4164b2de3a7a + uses: github/codeql-action/analyze@83923549f688e42b34d0b90ee94725f7c30532fc diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 58f4adbcd..c3bb651de 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@97aac9bb5668e73a3626129e9abc4164b2de3a7a + uses: github/codeql-action/init@83923549f688e42b34d0b90ee94725f7c30532fc with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@97aac9bb5668e73a3626129e9abc4164b2de3a7a + uses: github/codeql-action/autobuild@83923549f688e42b34d0b90ee94725f7c30532fc - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@97aac9bb5668e73a3626129e9abc4164b2de3a7a + uses: github/codeql-action/analyze@83923549f688e42b34d0b90ee94725f7c30532fc From 59017977a487a36c8a39f63b83299bc657134c0d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 18:39:13 +0000 Subject: [PATCH 035/391] chore(deps): update actions/cache digest to d4323d4 (#1353) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index e8bfeac71..d17b2eae8 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -31,7 +31,7 @@ jobs: server-password: ${{ secrets.OSSRH_PASSWORD }} - name: Cache local Maven repository - uses: actions/cache@7921ae235bdcb376cc8f22558dc5f8ddc3c3c2f9 + uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf with: path: ~/.m2/repository key: ${{ runner.os }}-17-maven-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index c605e05da..40a9431a3 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -34,7 +34,7 @@ jobs: languages: java - name: Cache local Maven repository - uses: actions/cache@7921ae235bdcb376cc8f22558dc5f8ddc3c3c2f9 + uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf with: path: ~/.m2/repository key: ${{ runner.os }}${{ matrix.build.java }}-maven-${{ hashFiles('**/pom.xml') }} From 2a1adca8c2ed8d61d51530969290793a5d3d15f3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 17:40:45 +0000 Subject: [PATCH 036/391] chore(deps): update dependency net.bytebuddy:byte-buddy to v1.17.2 (#1355) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 29a371938..5213c470a 100644 --- a/pom.xml +++ b/pom.xml @@ -189,7 +189,7 @@ net.bytebuddy byte-buddy - 1.17.1 + 1.17.2 test From dd83114c4d9389753575392fafcd56585d7178ae Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 23:33:51 +0000 Subject: [PATCH 037/391] chore(deps): update dependency net.bytebuddy:byte-buddy-agent to v1.17.2 (#1356) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5213c470a..d89ae290b 100644 --- a/pom.xml +++ b/pom.xml @@ -196,7 +196,7 @@ net.bytebuddy byte-buddy-agent - 1.17.1 + 1.17.2 test From 31444d6c8f30f0dd35debacc9dab8da7397e11ed Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 4 Mar 2025 02:12:10 +0000 Subject: [PATCH 038/391] chore(deps): update actions/setup-java digest to 799ee7c (#1359) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index d17b2eae8..f98c51af5 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 - name: Set up JDK 17 - uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 + uses: actions/setup-java@799ee7c97e9721ef38d1a7e8486c39753b9d6102 with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 40a9431a3..7555d95f3 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 - name: Set up JDK 8 - uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 + uses: actions/setup-java@799ee7c97e9721ef38d1a7e8486c39753b9d6102 with: java-version: ${{ matrix.build.java }} distribution: 'temurin' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3e4914478..7f12331f1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 - name: Set up JDK 17 if: ${{ steps.release.outputs.release_created }} - uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 + uses: actions/setup-java@799ee7c97e9721ef38d1a7e8486c39753b9d6102 with: java-version: '17' distribution: 'temurin' From 6c03e5d84aacee11f5b8e608a6114c11fced72b8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 4 Mar 2025 06:25:17 +0000 Subject: [PATCH 039/391] chore(deps): update github/codeql-action digest to 80f9930 (#1357) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 7555d95f3..dd1b97f21 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@83923549f688e42b34d0b90ee94725f7c30532fc + uses: github/codeql-action/init@80f993039571a6de66594ecaa432875a6942e8e0 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@83923549f688e42b34d0b90ee94725f7c30532fc + uses: github/codeql-action/analyze@80f993039571a6de66594ecaa432875a6942e8e0 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index c3bb651de..7016c9699 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@83923549f688e42b34d0b90ee94725f7c30532fc + uses: github/codeql-action/init@80f993039571a6de66594ecaa432875a6942e8e0 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@83923549f688e42b34d0b90ee94725f7c30532fc + uses: github/codeql-action/autobuild@80f993039571a6de66594ecaa432875a6942e8e0 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@83923549f688e42b34d0b90ee94725f7c30532fc + uses: github/codeql-action/analyze@80f993039571a6de66594ecaa432875a6942e8e0 From ecea9df932ee4874613f219b73640fe964c99593 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 4 Mar 2025 10:30:29 +0000 Subject: [PATCH 040/391] chore(deps): update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.9.2.0 (#1360) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d89ae290b..b7401c8b4 100644 --- a/pom.xml +++ b/pom.xml @@ -413,7 +413,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.9.1.0 + 4.9.2.0 spotbugs-exclusions.xml From 30b6d004aaf3464547805f7eda6fad0e122de4f9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 4 Mar 2025 15:10:03 +0000 Subject: [PATCH 041/391] chore(deps): update dependency org.mockito:mockito-core to v5.16.0 (#1358) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b7401c8b4..8c95d14f5 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ ${maven.compiler.source} 5.12.0 7.21.1 - 5.15.2 + 5.16.0 **/e2e/*.java ${project.groupId}.${project.artifactId} From 67b34f84a373512013ab2f7649faaddfd2d61048 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 19:07:16 +0000 Subject: [PATCH 042/391] chore(deps): update github/codeql-action digest to 608ccd6 (#1361) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index dd1b97f21..9bc2309fc 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@80f993039571a6de66594ecaa432875a6942e8e0 + uses: github/codeql-action/init@608ccd6cd915d2c43d3059c3da518f36f07a56b0 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@80f993039571a6de66594ecaa432875a6942e8e0 + uses: github/codeql-action/analyze@608ccd6cd915d2c43d3059c3da518f36f07a56b0 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 7016c9699..89d5cae4b 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@80f993039571a6de66594ecaa432875a6942e8e0 + uses: github/codeql-action/init@608ccd6cd915d2c43d3059c3da518f36f07a56b0 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@80f993039571a6de66594ecaa432875a6942e8e0 + uses: github/codeql-action/autobuild@608ccd6cd915d2c43d3059c3da518f36f07a56b0 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@80f993039571a6de66594ecaa432875a6942e8e0 + uses: github/codeql-action/analyze@608ccd6cd915d2c43d3059c3da518f36f07a56b0 From 959e675e4c2363e5fd80d1d2f1edbfab11794fc8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 6 Mar 2025 19:34:13 +0000 Subject: [PATCH 043/391] chore(deps): update github/codeql-action digest to 56b25d5 (#1365) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 9bc2309fc..433d057c7 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@608ccd6cd915d2c43d3059c3da518f36f07a56b0 + uses: github/codeql-action/init@56b25d5d5251df651f82070735778784aa383094 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@608ccd6cd915d2c43d3059c3da518f36f07a56b0 + uses: github/codeql-action/analyze@56b25d5d5251df651f82070735778784aa383094 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 89d5cae4b..5bde3c9ec 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@608ccd6cd915d2c43d3059c3da518f36f07a56b0 + uses: github/codeql-action/init@56b25d5d5251df651f82070735778784aa383094 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@608ccd6cd915d2c43d3059c3da518f36f07a56b0 + uses: github/codeql-action/autobuild@56b25d5d5251df651f82070735778784aa383094 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@608ccd6cd915d2c43d3059c3da518f36f07a56b0 + uses: github/codeql-action/analyze@56b25d5d5251df651f82070735778784aa383094 From c37d2497764889710ff9cde70cc456712088fe68 Mon Sep 17 00:00:00 2001 From: chrfwow Date: Fri, 7 Mar 2025 11:04:46 +0100 Subject: [PATCH 044/391] feat: implement gherkin tests for context merging (#1363) feat: implement gherkin tests for context merging (#1363) --- .../openfeature/sdk/ImmutableMetadata.java | 4 + .../dev/openfeature/sdk/FlagMetadataTest.java | 10 +- .../sdk/e2e/ContextStoringProvider.java | 48 ++++++++ .../java/dev/openfeature/sdk/e2e/State.java | 6 + .../sdk/e2e/steps/ContextSteps.java | 104 ++++++++++++++++++ .../sdk/e2e/steps/StepDefinitions.java | 22 +++- 6 files changed, 187 insertions(+), 7 deletions(-) create mode 100644 src/test/java/dev/openfeature/sdk/e2e/ContextStoringProvider.java create mode 100644 src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java diff --git a/src/main/java/dev/openfeature/sdk/ImmutableMetadata.java b/src/main/java/dev/openfeature/sdk/ImmutableMetadata.java index f8311a9a5..7f57a174d 100644 --- a/src/main/java/dev/openfeature/sdk/ImmutableMetadata.java +++ b/src/main/java/dev/openfeature/sdk/ImmutableMetadata.java @@ -101,6 +101,10 @@ public boolean isEmpty() { return metadata.isEmpty(); } + public boolean isNotEmpty() { + return !metadata.isEmpty(); + } + /** * Obtain a builder for {@link ImmutableMetadata}. */ diff --git a/src/test/java/dev/openfeature/sdk/FlagMetadataTest.java b/src/test/java/dev/openfeature/sdk/FlagMetadataTest.java index 26d0421cd..22912661f 100644 --- a/src/test/java/dev/openfeature/sdk/FlagMetadataTest.java +++ b/src/test/java/dev/openfeature/sdk/FlagMetadataTest.java @@ -64,23 +64,25 @@ void notfound_error_validation() { } @Test - @DisplayName("isEmpty returns true iff the metadata is empty") - void isEmpty_returns_true_if_metadata_is_empty() { + @DisplayName("isEmpty and isNotEmpty return correctly when the metadata is empty") + void isEmpty_isNotEmpty_return_correctly_when_metadata_is_empty() { // given ImmutableMetadata flagMetadata = ImmutableMetadata.builder().build(); // then assertTrue(flagMetadata.isEmpty()); + assertFalse(flagMetadata.isNotEmpty()); } @Test - @DisplayName("isEmpty returns false iff the metadata is not empty") - void isEmpty_returns_false_if_metadata_is_not_empty() { + @DisplayName("isEmpty and isNotEmpty return correctly when the metadata is not empty") + void isEmpty_isNotEmpty_return_correctly_when_metadata_is_not_empty() { // given ImmutableMetadata flagMetadata = ImmutableMetadata.builder().addString("a", "b").build(); // then assertFalse(flagMetadata.isEmpty()); + assertTrue(flagMetadata.isNotEmpty()); } } diff --git a/src/test/java/dev/openfeature/sdk/e2e/ContextStoringProvider.java b/src/test/java/dev/openfeature/sdk/e2e/ContextStoringProvider.java new file mode 100644 index 000000000..e06e862a5 --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/e2e/ContextStoringProvider.java @@ -0,0 +1,48 @@ +package dev.openfeature.sdk.e2e; + +import dev.openfeature.sdk.EvaluationContext; +import dev.openfeature.sdk.FeatureProvider; +import dev.openfeature.sdk.Metadata; +import dev.openfeature.sdk.ProviderEvaluation; +import dev.openfeature.sdk.Value; +import lombok.Getter; + +@Getter +public class ContextStoringProvider implements FeatureProvider { + private EvaluationContext evaluationContext; + + @Override + public Metadata getMetadata() { + return () -> getClass().getSimpleName(); + } + + @Override + public ProviderEvaluation getBooleanEvaluation(String key, Boolean defaultValue, EvaluationContext ctx) { + this.evaluationContext = ctx; + return null; + } + + @Override + public ProviderEvaluation getStringEvaluation(String key, String defaultValue, EvaluationContext ctx) { + this.evaluationContext = ctx; + return null; + } + + @Override + public ProviderEvaluation getIntegerEvaluation(String key, Integer defaultValue, EvaluationContext ctx) { + this.evaluationContext = ctx; + return null; + } + + @Override + public ProviderEvaluation getDoubleEvaluation(String key, Double defaultValue, EvaluationContext ctx) { + this.evaluationContext = ctx; + return null; + } + + @Override + public ProviderEvaluation getObjectEvaluation(String key, Value defaultValue, EvaluationContext ctx) { + this.evaluationContext = ctx; + return null; + } +} diff --git a/src/test/java/dev/openfeature/sdk/e2e/State.java b/src/test/java/dev/openfeature/sdk/e2e/State.java index ee513b00e..68c708b4a 100644 --- a/src/test/java/dev/openfeature/sdk/e2e/State.java +++ b/src/test/java/dev/openfeature/sdk/e2e/State.java @@ -1,8 +1,11 @@ package dev.openfeature.sdk.e2e; import dev.openfeature.sdk.Client; +import dev.openfeature.sdk.EvaluationContext; +import dev.openfeature.sdk.FeatureProvider; import dev.openfeature.sdk.FlagEvaluationDetails; import dev.openfeature.sdk.MutableContext; +import java.util.List; public class State { public Client client; @@ -10,4 +13,7 @@ public class State { public MutableContext context = new MutableContext(); public FlagEvaluationDetails evaluation; public MockHook hook; + public FeatureProvider provider; + public EvaluationContext invocationContext; + public List levels; } diff --git a/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java b/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java new file mode 100644 index 000000000..ccb78e72a --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java @@ -0,0 +1,104 @@ +package dev.openfeature.sdk.e2e.steps; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +import dev.openfeature.sdk.EvaluationContext; +import dev.openfeature.sdk.Hook; +import dev.openfeature.sdk.HookContext; +import dev.openfeature.sdk.ImmutableContext; +import dev.openfeature.sdk.OpenFeatureAPI; +import dev.openfeature.sdk.ThreadLocalTransactionContextPropagator; +import dev.openfeature.sdk.Value; +import dev.openfeature.sdk.e2e.ContextStoringProvider; +import dev.openfeature.sdk.e2e.State; +import io.cucumber.datatable.DataTable; +import io.cucumber.java.en.And; +import io.cucumber.java.en.Given; +import io.cucumber.java.en.Then; +import io.cucumber.java.en.When; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; + +public class ContextSteps { + private final State state; + + public ContextSteps(State state) { + this.state = state; + } + + @Given("a stable provider with retrievable context is registered") + public void setup() { + ContextStoringProvider provider = new ContextStoringProvider(); + state.provider = provider; + OpenFeatureAPI.getInstance().setProviderAndWait(provider); + state.client = OpenFeatureAPI.getInstance().getClient(); + OpenFeatureAPI.getInstance().setTransactionContextPropagator(new ThreadLocalTransactionContextPropagator()); + } + + @When("A context entry with key {string} and value {string} is added to the {string} level") + public void aContextWithKeyAndValueIsAddedToTheLevel(String contextKey, String contextValue, String level) { + addContextEntry(contextKey, contextValue, level); + } + + private void addContextEntry(String contextKey, String contextValue, String level) { + Map data = new HashMap<>(); + data.put(contextKey, new Value(contextValue)); + EvaluationContext context = new ImmutableContext(data); + if ("API".equals(level)) { + OpenFeatureAPI.getInstance().setEvaluationContext(context); + } else if ("Transaction".equals(level)) { + OpenFeatureAPI.getInstance().setTransactionContext(context); + } else if ("Client".equals(level)) { + state.client.setEvaluationContext(context); + } else if ("Invocation".equals(level)) { + state.invocationContext = context; + } else if ("Before Hooks".equals(level)) { + state.client.addHooks(new Hook() { + @Override + public Optional before(HookContext ctx, Map hints) { + return Optional.of(context); + } + }); + } else { + throw new IllegalArgumentException("Unknown level: " + level); + } + } + + @When("Some flag was evaluated") + public void someFlagWasEvaluated() { + state.evaluation = state.client.getStringDetails("unused", "unused", state.invocationContext); + } + + @Then("The merged context contains an entry with key {string} and value {string}") + public void theMergedContextContainsAnEntryWithKeyAndValue(String contextKey, String contextValue) { + assertInstanceOf( + ContextStoringProvider.class, + state.provider, + "In order to use this step, you need to set a ContextStoringProvider"); + EvaluationContext ctx = ((ContextStoringProvider) state.provider).getEvaluationContext(); + assertNotNull(ctx); + assertNotNull(ctx.getValue(contextKey)); + assertNotNull(ctx.getValue(contextKey).asString()); + assertEquals(contextValue, ctx.getValue(contextKey).asString()); + } + + @Given("A table with levels of increasing precedence") + public void aTableWithLevelsOfIncreasingPrecedence(DataTable levelsTable) { + state.levels = levelsTable.asList(); + } + + @And( + "Context entries for each level from API level down to the {string} level, with key {string} and value {string}") + public void contextEntriesForEachLevelFromAPILevelDownToTheLevelWithKeyAndValue( + String maxLevel, String key, String value) { + for (String level : state.levels) { + addContextEntry(key, value, level); + if (level.equals(maxLevel)) { + return; + } + } + } +} diff --git a/src/test/java/dev/openfeature/sdk/e2e/steps/StepDefinitions.java b/src/test/java/dev/openfeature/sdk/e2e/steps/StepDefinitions.java index 6897e2738..924c9d59e 100644 --- a/src/test/java/dev/openfeature/sdk/e2e/steps/StepDefinitions.java +++ b/src/test/java/dev/openfeature/sdk/e2e/steps/StepDefinitions.java @@ -2,7 +2,6 @@ import static dev.openfeature.sdk.testutils.TestFlagsUtils.buildFlags; import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; import dev.openfeature.sdk.Client; import dev.openfeature.sdk.EvaluationContext; @@ -289,7 +288,7 @@ public void then_the_default_string_value_should_be_returned() { @Then("the reason should indicate an error and the error code should indicate a missing flag with {string}") public void the_reason_should_indicate_an_error_and_the_error_code_should_be_flag_not_found(String errorCode) { assertEquals(Reason.ERROR.toString(), notFoundDetails.getReason()); - assertTrue(notFoundDetails.getErrorCode().name().equals(errorCode)); + assertEquals(errorCode, notFoundDetails.getErrorCode().name()); } // type mismatch @@ -309,6 +308,23 @@ public void then_the_default_integer_value_should_be_returned() { @Then("the reason should indicate an error and the error code should indicate a type mismatch with {string}") public void the_reason_should_indicate_an_error_and_the_error_code_should_be_type_mismatch(String errorCode) { assertEquals(Reason.ERROR.toString(), typeErrorDetails.getReason()); - assertTrue(typeErrorDetails.getErrorCode().name().equals(errorCode)); + assertEquals(errorCode, typeErrorDetails.getErrorCode().name()); + } + + @SuppressWarnings("java:S2925") + @When("sleep for {int} milliseconds") + public void sleepForMilliseconds(int millis) { + long startTime = System.currentTimeMillis(); + long endTime = startTime + millis; + long now; + while ((now = System.currentTimeMillis()) < endTime) { + long remainingTime = endTime - now; + try { + //noinspection BusyWait + Thread.sleep(remainingTime); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + } } } From d00e4b5b24621aa55085827fbe6ea982491376de Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 7 Mar 2025 22:43:13 +0000 Subject: [PATCH 045/391] chore(deps): update github/codeql-action digest to b2e6519 (#1366) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 433d057c7..4547a278e 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@56b25d5d5251df651f82070735778784aa383094 + uses: github/codeql-action/init@b2e6519679e446e7bb7c3466d70f13a6b5461fcd with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@56b25d5d5251df651f82070735778784aa383094 + uses: github/codeql-action/analyze@b2e6519679e446e7bb7c3466d70f13a6b5461fcd diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 5bde3c9ec..b1379a3e7 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@56b25d5d5251df651f82070735778784aa383094 + uses: github/codeql-action/init@b2e6519679e446e7bb7c3466d70f13a6b5461fcd with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@56b25d5d5251df651f82070735778784aa383094 + uses: github/codeql-action/autobuild@b2e6519679e446e7bb7c3466d70f13a6b5461fcd - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@56b25d5d5251df651f82070735778784aa383094 + uses: github/codeql-action/analyze@b2e6519679e446e7bb7c3466d70f13a6b5461fcd From c550d597227bfc1e0e17357139f1fd8a87593be0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 10 Mar 2025 22:21:34 +0000 Subject: [PATCH 046/391] chore(deps): update github/codeql-action digest to b46b37a (#1367) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 4547a278e..4629ea474 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@b2e6519679e446e7bb7c3466d70f13a6b5461fcd + uses: github/codeql-action/init@b46b37a8a348d1768fde58498025680784561136 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@b2e6519679e446e7bb7c3466d70f13a6b5461fcd + uses: github/codeql-action/analyze@b46b37a8a348d1768fde58498025680784561136 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index b1379a3e7..1a9372065 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@b2e6519679e446e7bb7c3466d70f13a6b5461fcd + uses: github/codeql-action/init@b46b37a8a348d1768fde58498025680784561136 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@b2e6519679e446e7bb7c3466d70f13a6b5461fcd + uses: github/codeql-action/autobuild@b46b37a8a348d1768fde58498025680784561136 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@b2e6519679e446e7bb7c3466d70f13a6b5461fcd + uses: github/codeql-action/analyze@b46b37a8a348d1768fde58498025680784561136 From d54c68a8e9e4a0f67c99e7d76621a1c5724e4cd1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 11 Mar 2025 23:00:23 +0000 Subject: [PATCH 047/391] chore(deps): update github/codeql-action digest to 7254660 (#1368) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 4629ea474..8cb6af5f8 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@b46b37a8a348d1768fde58498025680784561136 + uses: github/codeql-action/init@7254660adc34cef611559b5423694b5266923899 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@b46b37a8a348d1768fde58498025680784561136 + uses: github/codeql-action/analyze@7254660adc34cef611559b5423694b5266923899 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 1a9372065..4e749aa41 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@b46b37a8a348d1768fde58498025680784561136 + uses: github/codeql-action/init@7254660adc34cef611559b5423694b5266923899 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@b46b37a8a348d1768fde58498025680784561136 + uses: github/codeql-action/autobuild@7254660adc34cef611559b5423694b5266923899 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@b46b37a8a348d1768fde58498025680784561136 + uses: github/codeql-action/analyze@7254660adc34cef611559b5423694b5266923899 From f8df5fb84a765af917587dd509f9cec38103f787 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 12 Mar 2025 03:22:53 +0000 Subject: [PATCH 048/391] chore(deps): update github/codeql-action digest to dc49dca (#1369) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 8cb6af5f8..b6165dd39 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@7254660adc34cef611559b5423694b5266923899 + uses: github/codeql-action/init@dc49dcabdb86371d19197fcae2585f548bbbc395 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@7254660adc34cef611559b5423694b5266923899 + uses: github/codeql-action/analyze@dc49dcabdb86371d19197fcae2585f548bbbc395 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 4e749aa41..efffa1fb7 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@7254660adc34cef611559b5423694b5266923899 + uses: github/codeql-action/init@dc49dcabdb86371d19197fcae2585f548bbbc395 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@7254660adc34cef611559b5423694b5266923899 + uses: github/codeql-action/autobuild@dc49dcabdb86371d19197fcae2585f548bbbc395 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@7254660adc34cef611559b5423694b5266923899 + uses: github/codeql-action/analyze@dc49dcabdb86371d19197fcae2585f548bbbc395 From 69b571eda73b6f43c99864420b8663ae54ebf0ad Mon Sep 17 00:00:00 2001 From: chrfwow Date: Thu, 13 Mar 2025 08:33:21 +0100 Subject: [PATCH 049/391] fix: equals and hashcode of several classes (#1364) fix: equals and hashcode of several classes --- .../openfeature/sdk/AbstractStructure.java | 4 +- .../dev/openfeature/sdk/EventDetails.java | 2 + .../dev/openfeature/sdk/ImmutableContext.java | 2 + .../openfeature/sdk/ImmutableStructure.java | 18 ++--- .../dev/openfeature/sdk/MutableStructure.java | 2 +- .../openfeature/sdk/ImmutableContextTest.java | 28 ++++++++ .../sdk/ImmutableMetadataTest.java | 28 ++++++++ .../sdk/ImmutableStructureTest.java | 45 ++++++++++++- .../openfeature/sdk/MutableContextTest.java | 28 ++++++++ .../openfeature/sdk/MutableStructureTest.java | 67 +++++++++++++++++++ .../java/dev/openfeature/sdk/ValueTest.java | 45 ++++++++----- 11 files changed, 243 insertions(+), 26 deletions(-) create mode 100644 src/test/java/dev/openfeature/sdk/ImmutableMetadataTest.java create mode 100644 src/test/java/dev/openfeature/sdk/MutableStructureTest.java diff --git a/src/main/java/dev/openfeature/sdk/AbstractStructure.java b/src/main/java/dev/openfeature/sdk/AbstractStructure.java index 6c652114c..7962705c3 100644 --- a/src/main/java/dev/openfeature/sdk/AbstractStructure.java +++ b/src/main/java/dev/openfeature/sdk/AbstractStructure.java @@ -3,15 +3,17 @@ import java.util.Collections; import java.util.HashMap; import java.util.Map; +import lombok.EqualsAndHashCode; @SuppressWarnings({"PMD.BeanMembersShouldSerialize", "checkstyle:MissingJavadocType"}) +@EqualsAndHashCode abstract class AbstractStructure implements Structure { protected final Map attributes; @Override public boolean isEmpty() { - return attributes == null || attributes.size() == 0; + return attributes == null || attributes.isEmpty(); } AbstractStructure() { diff --git a/src/main/java/dev/openfeature/sdk/EventDetails.java b/src/main/java/dev/openfeature/sdk/EventDetails.java index e32e61013..c75b046e0 100644 --- a/src/main/java/dev/openfeature/sdk/EventDetails.java +++ b/src/main/java/dev/openfeature/sdk/EventDetails.java @@ -1,11 +1,13 @@ package dev.openfeature.sdk; import lombok.Data; +import lombok.EqualsAndHashCode; import lombok.experimental.SuperBuilder; /** * The details of a particular event. */ +@EqualsAndHashCode(callSuper = true) @Data @SuperBuilder(toBuilder = true) public class EventDetails extends ProviderEventDetails { diff --git a/src/main/java/dev/openfeature/sdk/ImmutableContext.java b/src/main/java/dev/openfeature/sdk/ImmutableContext.java index 23a452e08..8560c369e 100644 --- a/src/main/java/dev/openfeature/sdk/ImmutableContext.java +++ b/src/main/java/dev/openfeature/sdk/ImmutableContext.java @@ -4,6 +4,7 @@ import java.util.HashMap; import java.util.Map; import java.util.function.Function; +import lombok.EqualsAndHashCode; import lombok.ToString; import lombok.experimental.Delegate; @@ -15,6 +16,7 @@ * not be modified after instantiation. */ @ToString +@EqualsAndHashCode @SuppressWarnings("PMD.BeanMembersShouldSerialize") public final class ImmutableContext implements EvaluationContext { diff --git a/src/main/java/dev/openfeature/sdk/ImmutableStructure.java b/src/main/java/dev/openfeature/sdk/ImmutableStructure.java index c47a49eb3..849359424 100644 --- a/src/main/java/dev/openfeature/sdk/ImmutableStructure.java +++ b/src/main/java/dev/openfeature/sdk/ImmutableStructure.java @@ -18,7 +18,7 @@ * not be modified after instantiation. All references are clones. */ @ToString -@EqualsAndHashCode +@EqualsAndHashCode(callSuper = true) @SuppressWarnings({"PMD.BeanMembersShouldSerialize", "checkstyle:MissingJavadocType"}) public final class ImmutableStructure extends AbstractStructure { @@ -38,7 +38,7 @@ public ImmutableStructure(Map attributes) { super(copyAttributes(attributes, null)); } - protected ImmutableStructure(String targetingKey, Map attributes) { + ImmutableStructure(String targetingKey, Map attributes) { super(copyAttributes(attributes, targetingKey)); } @@ -70,12 +70,14 @@ private static Map copyAttributes(Map in) { private static Map copyAttributes(Map in, String targetingKey) { Map copy = new HashMap<>(); - for (Entry entry : in.entrySet()) { - copy.put( - entry.getKey(), - Optional.ofNullable(entry.getValue()) - .map((Value val) -> val.clone()) - .orElse(null)); + if (in != null) { + for (Entry entry : in.entrySet()) { + copy.put( + entry.getKey(), + Optional.ofNullable(entry.getValue()) + .map((Value val) -> val.clone()) + .orElse(null)); + } } if (targetingKey != null) { copy.put(EvaluationContext.TARGETING_KEY, new Value(targetingKey)); diff --git a/src/main/java/dev/openfeature/sdk/MutableStructure.java b/src/main/java/dev/openfeature/sdk/MutableStructure.java index a06e2f2d3..f3158456d 100644 --- a/src/main/java/dev/openfeature/sdk/MutableStructure.java +++ b/src/main/java/dev/openfeature/sdk/MutableStructure.java @@ -15,8 +15,8 @@ * be modified after instantiation. */ @ToString -@EqualsAndHashCode @SuppressWarnings({"PMD.BeanMembersShouldSerialize", "checkstyle:MissingJavadocType"}) +@EqualsAndHashCode(callSuper = true) public class MutableStructure extends AbstractStructure { public MutableStructure() { diff --git a/src/test/java/dev/openfeature/sdk/ImmutableContextTest.java b/src/test/java/dev/openfeature/sdk/ImmutableContextTest.java index e69a974b3..2b39be741 100644 --- a/src/test/java/dev/openfeature/sdk/ImmutableContextTest.java +++ b/src/test/java/dev/openfeature/sdk/ImmutableContextTest.java @@ -3,6 +3,7 @@ import static dev.openfeature.sdk.EvaluationContext.TARGETING_KEY; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.Collections; @@ -133,4 +134,31 @@ void mergeShouldRetainItsSubkeysWhenOverridingContextHasNoTargetingKey() { Structure value = key1.asStructure(); assertArrayEquals(new Object[] {"key1_1"}, value.keySet().toArray()); } + + @DisplayName("Two different MutableContext objects with the different contents are not considered equal") + @Test + void unequalImmutableContextsAreNotEqual() { + final Map attributes = new HashMap<>(); + attributes.put("key1", new Value("val1")); + final ImmutableContext ctx = new ImmutableContext(attributes); + + final Map attributes2 = new HashMap<>(); + final ImmutableContext ctx2 = new ImmutableContext(attributes2); + + assertNotEquals(ctx, ctx2); + } + + @DisplayName("Two different MutableContext objects with the same content are considered equal") + @Test + void equalImmutableContextsAreEqual() { + final Map attributes = new HashMap<>(); + attributes.put("key1", new Value("val1")); + final ImmutableContext ctx = new ImmutableContext(attributes); + + final Map attributes2 = new HashMap<>(); + attributes2.put("key1", new Value("val1")); + final ImmutableContext ctx2 = new ImmutableContext(attributes2); + + assertEquals(ctx, ctx2); + } } diff --git a/src/test/java/dev/openfeature/sdk/ImmutableMetadataTest.java b/src/test/java/dev/openfeature/sdk/ImmutableMetadataTest.java new file mode 100644 index 000000000..e3bd03165 --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/ImmutableMetadataTest.java @@ -0,0 +1,28 @@ +package dev.openfeature.sdk; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; + +import org.junit.jupiter.api.Test; + +class ImmutableMetadataTest { + @Test + void unequalImmutableMetadataAreUnequal() { + ImmutableMetadata i1 = + ImmutableMetadata.builder().addString("key1", "value1").build(); + ImmutableMetadata i2 = + ImmutableMetadata.builder().addString("key1", "value2").build(); + + assertNotEquals(i1, i2); + } + + @Test + void equalImmutableMetadataAreEqual() { + ImmutableMetadata i1 = + ImmutableMetadata.builder().addString("key1", "value1").build(); + ImmutableMetadata i2 = + ImmutableMetadata.builder().addString("key1", "value1").build(); + + assertEquals(i1, i2); + } +} diff --git a/src/test/java/dev/openfeature/sdk/ImmutableStructureTest.java b/src/test/java/dev/openfeature/sdk/ImmutableStructureTest.java index dff95adca..6a0eed59b 100644 --- a/src/test/java/dev/openfeature/sdk/ImmutableStructureTest.java +++ b/src/test/java/dev/openfeature/sdk/ImmutableStructureTest.java @@ -1,6 +1,11 @@ package dev.openfeature.sdk; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNotSame; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.time.Instant; import java.time.temporal.ChronoUnit; @@ -154,4 +159,42 @@ void constructorHandlesNullValue() { attrs.put("null", null); new ImmutableStructure(attrs); } + + @Test + void unequalImmutableStructuresAreNotEqual() { + Map attrs1 = new HashMap<>(); + attrs1.put("test", new Value(45)); + ImmutableStructure structure1 = new ImmutableStructure(attrs1); + + Map attrs2 = new HashMap<>(); + attrs2.put("test", new Value(2)); + ImmutableStructure structure2 = new ImmutableStructure(attrs2); + + assertNotEquals(structure1, structure2); + } + + @Test + void equalImmutableStructuresAreEqual() { + Map attrs1 = new HashMap<>(); + attrs1.put("test", new Value(45)); + ImmutableStructure structure1 = new ImmutableStructure(attrs1); + + Map attrs2 = new HashMap<>(); + attrs2.put("test", new Value(45)); + ImmutableStructure structure2 = new ImmutableStructure(attrs2); + + assertEquals(structure1, structure2); + } + + @Test + void emptyImmutableStructureIsEmpty() { + ImmutableStructure m1 = new ImmutableStructure(); + assertTrue(m1.isEmpty()); + } + + @Test + void immutableStructureWithNullAttributesIsEmpty() { + ImmutableStructure m1 = new ImmutableStructure(null); + assertTrue(m1.isEmpty()); + } } diff --git a/src/test/java/dev/openfeature/sdk/MutableContextTest.java b/src/test/java/dev/openfeature/sdk/MutableContextTest.java index 953e3f636..6c471d09a 100644 --- a/src/test/java/dev/openfeature/sdk/MutableContextTest.java +++ b/src/test/java/dev/openfeature/sdk/MutableContextTest.java @@ -3,6 +3,7 @@ import static dev.openfeature.sdk.EvaluationContext.TARGETING_KEY; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.Collections; @@ -137,4 +138,31 @@ void shouldAllowChainingOfMutations() { assertEquals(2, context.getValue("key2").asInteger()); assertEquals(3.0, context.getValue("key3").asDouble()); } + + @DisplayName("Two different MutableContext objects with the different contents are not considered equal") + @Test + void unequalMutableContextsAreNotEqual() { + final Map attributes = new HashMap<>(); + attributes.put("key1", new Value("val1")); + final MutableContext ctx = new MutableContext(attributes); + + final Map attributes2 = new HashMap<>(); + final MutableContext ctx2 = new MutableContext(attributes2); + + assertNotEquals(ctx, ctx2); + } + + @DisplayName("Two different MutableContext objects with the same content are considered equal") + @Test + void equalMutableContextsAreEqual() { + final Map attributes = new HashMap<>(); + attributes.put("key1", new Value("val1")); + final MutableContext ctx = new MutableContext(attributes); + + final Map attributes2 = new HashMap<>(); + attributes2.put("key1", new Value("val1")); + final MutableContext ctx2 = new MutableContext(attributes2); + + assertEquals(ctx, ctx2); + } } diff --git a/src/test/java/dev/openfeature/sdk/MutableStructureTest.java b/src/test/java/dev/openfeature/sdk/MutableStructureTest.java new file mode 100644 index 000000000..ebd11af0d --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/MutableStructureTest.java @@ -0,0 +1,67 @@ +package dev.openfeature.sdk; + +import static org.junit.jupiter.api.Assertions.*; + +import java.util.HashMap; +import java.util.Map; +import java.util.Set; +import org.junit.jupiter.api.Test; + +class MutableStructureTest { + + @Test + void emptyMutableStructureIsEmpty() { + MutableStructure m1 = new MutableStructure(); + assertTrue(m1.isEmpty()); + } + + @Test + void mutableStructureWithNullBackingStructureIsEmpty() { + MutableStructure m1 = new MutableStructure(null); + assertTrue(m1.isEmpty()); + } + + @Test + void unequalMutableStructuresAreNotEqual() { + MutableStructure m1 = new MutableStructure(); + m1.add("key1", "val1"); + MutableStructure m2 = new MutableStructure(); + m2.add("key2", "val2"); + assertNotEquals(m1, m2); + } + + @Test + void equalMutableStructuresAreEqual() { + MutableStructure m1 = new MutableStructure(); + m1.add("key1", "val1"); + MutableStructure m2 = new MutableStructure(); + m2.add("key1", "val1"); + assertEquals(m1, m2); + } + + @Test + void equalAbstractStructuresOfDifferentTypesAreNotEqual() { + MutableStructure m1 = new MutableStructure(); + m1.add("key1", "val1"); + HashMap map = new HashMap<>(); + map.put("key1", new Value("val1")); + AbstractStructure m2 = new AbstractStructure(map) { + @Override + public Set keySet() { + return attributes.keySet(); + } + + @Override + public Value getValue(String key) { + return attributes.get(key); + } + + @Override + public Map asMap() { + return attributes; + } + }; + + assertNotEquals(m1, m2); + } +} diff --git a/src/test/java/dev/openfeature/sdk/ValueTest.java b/src/test/java/dev/openfeature/sdk/ValueTest.java index c25538508..697edb7be 100644 --- a/src/test/java/dev/openfeature/sdk/ValueTest.java +++ b/src/test/java/dev/openfeature/sdk/ValueTest.java @@ -2,6 +2,7 @@ import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; @@ -11,15 +12,15 @@ import java.util.List; import org.junit.jupiter.api.Test; -public class ValueTest { +class ValueTest { @Test - public void noArgShouldContainNull() { + void noArgShouldContainNull() { Value value = new Value(); assertTrue(value.isNull()); } @Test - public void objectArgShouldContainObject() { + void objectArgShouldContainObject() { try { // int is a special case, see intObjectArgShouldConvertToInt() List list = new ArrayList<>(); @@ -42,7 +43,7 @@ public void objectArgShouldContainObject() { } @Test - public void intObjectArgShouldConvertToInt() { + void intObjectArgShouldConvertToInt() { try { Object innerValue = 1; Value value = new Value(innerValue); @@ -53,7 +54,7 @@ public void intObjectArgShouldConvertToInt() { } @Test - public void invalidObjectArgShouldThrow() { + void invalidObjectArgShouldThrow() { class Something {} @@ -63,7 +64,7 @@ class Something {} } @Test - public void boolArgShouldContainBool() { + void boolArgShouldContainBool() { boolean innerValue = true; Value value = new Value(innerValue); assertTrue(value.isBoolean()); @@ -71,7 +72,7 @@ public void boolArgShouldContainBool() { } @Test - public void numericArgShouldReturnDoubleOrInt() { + void numericArgShouldReturnDoubleOrInt() { double innerDoubleValue = 1.75; Value doubleValue = new Value(innerDoubleValue); assertTrue(doubleValue.isNumber()); @@ -86,7 +87,7 @@ public void numericArgShouldReturnDoubleOrInt() { } @Test - public void stringArgShouldContainString() { + void stringArgShouldContainString() { String innerValue = "hi!"; Value value = new Value(innerValue); assertTrue(value.isString()); @@ -94,7 +95,7 @@ public void stringArgShouldContainString() { } @Test - public void dateShouldContainDate() { + void dateShouldContainDate() { Instant innerValue = Instant.now(); Value value = new Value(innerValue); assertTrue(value.isInstant()); @@ -102,7 +103,7 @@ public void dateShouldContainDate() { } @Test - public void structureShouldContainStructure() { + void structureShouldContainStructure() { String INNER_KEY = "key"; String INNER_VALUE = "val"; MutableStructure innerValue = new MutableStructure().add(INNER_KEY, INNER_VALUE); @@ -112,7 +113,7 @@ public void structureShouldContainStructure() { } @Test - public void listArgShouldContainList() { + void listArgShouldContainList() { String ITEM_VALUE = "val"; List innerValue = new ArrayList(); innerValue.add(new Value(ITEM_VALUE)); @@ -122,7 +123,7 @@ public void listArgShouldContainList() { } @Test - public void listMustBeOfValues() { + void listMustBeOfValues() { String item = "item"; List list = new ArrayList<>(); list.add(item); @@ -135,7 +136,7 @@ public void listMustBeOfValues() { } @Test - public void emptyListAllowed() { + void emptyListAllowed() { List list = new ArrayList<>(); try { Value value = new Value((Object) list); @@ -148,7 +149,7 @@ public void emptyListAllowed() { } @Test - public void valueConstructorValidateListInternals() { + void valueConstructorValidateListInternals() { List list = new ArrayList<>(); list.add(new Value("item")); list.add("item"); @@ -157,8 +158,22 @@ public void valueConstructorValidateListInternals() { } @Test - public void noOpFinalize() { + void noOpFinalize() { Value val = new Value(); assertDoesNotThrow(val::finalize); // does nothing, but we want to defined in and make it final. } + + @Test + void equalValuesShouldBeEqual() { + Value val1 = new Value(12312312); + Value val2 = new Value(12312312); + assertEquals(val1, val2); + } + + @Test + void unequalValuesShouldNotBeEqual() { + Value val1 = new Value("a"); + Value val2 = new Value("b"); + assertNotEquals(val1, val2); + } } From d233480912f1d5e095f5034f36a838535d1ecdff Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 15 Mar 2025 01:29:33 +0000 Subject: [PATCH 050/391] chore(deps): update github/codeql-action digest to 70df9de (#1372) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index b6165dd39..a34dfc220 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@dc49dcabdb86371d19197fcae2585f548bbbc395 + uses: github/codeql-action/init@70df9def86d22bf0ea4e7f8b956e7b92e7c1ea22 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@dc49dcabdb86371d19197fcae2585f548bbbc395 + uses: github/codeql-action/analyze@70df9def86d22bf0ea4e7f8b956e7b92e7c1ea22 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index efffa1fb7..5bf01677f 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@dc49dcabdb86371d19197fcae2585f548bbbc395 + uses: github/codeql-action/init@70df9def86d22bf0ea4e7f8b956e7b92e7c1ea22 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@dc49dcabdb86371d19197fcae2585f548bbbc395 + uses: github/codeql-action/autobuild@70df9def86d22bf0ea4e7f8b956e7b92e7c1ea22 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@dc49dcabdb86371d19197fcae2585f548bbbc395 + uses: github/codeql-action/analyze@70df9def86d22bf0ea4e7f8b956e7b92e7c1ea22 From 6b65e26c7439895652c3f64f2b4a7307a7ca582e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 15 Mar 2025 06:28:22 +0000 Subject: [PATCH 051/391] fix(deps): update junit5 monorepo (#1373) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 8c95d14f5..9572b3c7e 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ UTF-8 1.8 ${maven.compiler.source} - 5.12.0 + 5.12.1 7.21.1 5.16.0 @@ -125,7 +125,7 @@ org.junit.platform junit-platform-suite - 1.12.0 + 1.12.1 test @@ -212,7 +212,7 @@ org.junit junit-bom - 5.12.0 + 5.12.1 pom import From de3e213ac8b8931121904a3d12929405512e74dd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 16 Mar 2025 02:24:15 +0000 Subject: [PATCH 052/391] chore(deps): update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.9.3.0 (#1375) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9572b3c7e..c2205ec14 100644 --- a/pom.xml +++ b/pom.xml @@ -413,7 +413,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.9.2.0 + 4.9.3.0 spotbugs-exclusions.xml From 9750f75d04beb8339fc2e972f0ee97120eaff354 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 16 Mar 2025 05:21:02 +0000 Subject: [PATCH 053/391] chore(deps): update dependency org.mockito:mockito-core to v5.16.1 (#1376) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c2205ec14..a5c57d538 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ ${maven.compiler.source} 5.12.1 7.21.1 - 5.16.0 + 5.16.1 **/e2e/*.java ${project.groupId}.${project.artifactId} From 706565581d78856dd73605b1a16b131f974c0731 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 02:01:21 +0000 Subject: [PATCH 054/391] chore(deps): update github/codeql-action digest to 6a151cd (#1377) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index a34dfc220..139ec099b 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@70df9def86d22bf0ea4e7f8b956e7b92e7c1ea22 + uses: github/codeql-action/init@6a151cd77488e58567da1dcf953e7aeeaca4950c with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@70df9def86d22bf0ea4e7f8b956e7b92e7c1ea22 + uses: github/codeql-action/analyze@6a151cd77488e58567da1dcf953e7aeeaca4950c diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 5bf01677f..1d52b734b 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@70df9def86d22bf0ea4e7f8b956e7b92e7c1ea22 + uses: github/codeql-action/init@6a151cd77488e58567da1dcf953e7aeeaca4950c with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@70df9def86d22bf0ea4e7f8b956e7b92e7c1ea22 + uses: github/codeql-action/autobuild@6a151cd77488e58567da1dcf953e7aeeaca4950c - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@70df9def86d22bf0ea4e7f8b956e7b92e7c1ea22 + uses: github/codeql-action/analyze@6a151cd77488e58567da1dcf953e7aeeaca4950c From dbf92df33bf5657d50dc3b2f129207b0097c1f27 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 18:41:01 +0000 Subject: [PATCH 055/391] chore(deps): update github/codeql-action digest to 6349095 (#1378) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 139ec099b..9a0b3f77c 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@6a151cd77488e58567da1dcf953e7aeeaca4950c + uses: github/codeql-action/init@6349095d19ec30397ffb02a63b7aa4f867deb563 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@6a151cd77488e58567da1dcf953e7aeeaca4950c + uses: github/codeql-action/analyze@6349095d19ec30397ffb02a63b7aa4f867deb563 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 1d52b734b..afffc816f 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@6a151cd77488e58567da1dcf953e7aeeaca4950c + uses: github/codeql-action/init@6349095d19ec30397ffb02a63b7aa4f867deb563 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@6a151cd77488e58567da1dcf953e7aeeaca4950c + uses: github/codeql-action/autobuild@6349095d19ec30397ffb02a63b7aa4f867deb563 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@6a151cd77488e58567da1dcf953e7aeeaca4950c + uses: github/codeql-action/analyze@6349095d19ec30397ffb02a63b7aa4f867deb563 From 8359ef13bb935ac1d144787cfd7181814a0b286c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 19 Mar 2025 21:41:15 +0000 Subject: [PATCH 056/391] chore(deps): update actions/cache digest to 5a3ec84 (#1380) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index f98c51af5..bd4ffe800 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -31,7 +31,7 @@ jobs: server-password: ${{ secrets.OSSRH_PASSWORD }} - name: Cache local Maven repository - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: ~/.m2/repository key: ${{ runner.os }}-17-maven-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 9a0b3f77c..1a1f2af74 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -34,7 +34,7 @@ jobs: languages: java - name: Cache local Maven repository - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: ~/.m2/repository key: ${{ runner.os }}${{ matrix.build.java }}-maven-${{ hashFiles('**/pom.xml') }} From 2239f054b90734dde6cdd4a23daec1c1daa96f07 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Mar 2025 01:33:47 +0000 Subject: [PATCH 057/391] chore(deps): update actions/setup-java digest to b8ebb8b (#1381) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index bd4ffe800..091f14b4b 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 - name: Set up JDK 17 - uses: actions/setup-java@799ee7c97e9721ef38d1a7e8486c39753b9d6102 + uses: actions/setup-java@b8ebb8ba1d9655f7f159c0a8b8135606ae11b5c9 with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 1a1f2af74..1e1424be9 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 - name: Set up JDK 8 - uses: actions/setup-java@799ee7c97e9721ef38d1a7e8486c39753b9d6102 + uses: actions/setup-java@b8ebb8ba1d9655f7f159c0a8b8135606ae11b5c9 with: java-version: ${{ matrix.build.java }} distribution: 'temurin' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7f12331f1..a3b669e7d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 - name: Set up JDK 17 if: ${{ steps.release.outputs.release_created }} - uses: actions/setup-java@799ee7c97e9721ef38d1a7e8486c39753b9d6102 + uses: actions/setup-java@b8ebb8ba1d9655f7f159c0a8b8135606ae11b5c9 with: java-version: '17' distribution: 'temurin' From d61c33e466336c7120b870ca5e3843eba5f7175c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Mar 2025 07:07:31 +0000 Subject: [PATCH 058/391] chore(deps): update github/codeql-action digest to c50c157 (#1379) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 1e1424be9..9ca39ef10 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@6349095d19ec30397ffb02a63b7aa4f867deb563 + uses: github/codeql-action/init@c50c157cc388ea631f085f4e95e948f51cdc742a with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@6349095d19ec30397ffb02a63b7aa4f867deb563 + uses: github/codeql-action/analyze@c50c157cc388ea631f085f4e95e948f51cdc742a diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index afffc816f..bba3e4b5c 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@6349095d19ec30397ffb02a63b7aa4f867deb563 + uses: github/codeql-action/init@c50c157cc388ea631f085f4e95e948f51cdc742a with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@6349095d19ec30397ffb02a63b7aa4f867deb563 + uses: github/codeql-action/autobuild@c50c157cc388ea631f085f4e95e948f51cdc742a - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@6349095d19ec30397ffb02a63b7aa4f867deb563 + uses: github/codeql-action/analyze@c50c157cc388ea631f085f4e95e948f51cdc742a From 922e17e677e15690e3df2fe93a961f16f21ff283 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 21 Mar 2025 22:54:41 +0000 Subject: [PATCH 059/391] chore(deps): update github/codeql-action digest to bd1d9ab (#1383) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 9ca39ef10..8554c833a 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@c50c157cc388ea631f085f4e95e948f51cdc742a + uses: github/codeql-action/init@bd1d9ab4eda903e1b5caa241368836575c6c476b with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@c50c157cc388ea631f085f4e95e948f51cdc742a + uses: github/codeql-action/analyze@bd1d9ab4eda903e1b5caa241368836575c6c476b diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index bba3e4b5c..520afd099 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@c50c157cc388ea631f085f4e95e948f51cdc742a + uses: github/codeql-action/init@bd1d9ab4eda903e1b5caa241368836575c6c476b with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@c50c157cc388ea631f085f4e95e948f51cdc742a + uses: github/codeql-action/autobuild@bd1d9ab4eda903e1b5caa241368836575c6c476b - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@c50c157cc388ea631f085f4e95e948f51cdc742a + uses: github/codeql-action/analyze@bd1d9ab4eda903e1b5caa241368836575c6c476b From b6becac2c4e0f98a8651cc2f77d4c0b081548991 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 22 Mar 2025 03:00:07 +0000 Subject: [PATCH 060/391] chore(deps): update dependency net.bytebuddy:byte-buddy to v1.17.3 (#1384) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a5c57d538..f04d32ee5 100644 --- a/pom.xml +++ b/pom.xml @@ -189,7 +189,7 @@ net.bytebuddy byte-buddy - 1.17.2 + 1.17.3 test From 387e5f2e3bd24ccea6691b0d6dbfe542cfd05b52 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 22 Mar 2025 05:11:28 +0000 Subject: [PATCH 061/391] chore(deps): update github/codeql-action digest to e0ea141 (#1386) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 8554c833a..4409f1523 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@bd1d9ab4eda903e1b5caa241368836575c6c476b + uses: github/codeql-action/init@e0ea141027937784e3c10ed1679e503fcc2245bc with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@bd1d9ab4eda903e1b5caa241368836575c6c476b + uses: github/codeql-action/analyze@e0ea141027937784e3c10ed1679e503fcc2245bc diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 520afd099..e43a306b3 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@bd1d9ab4eda903e1b5caa241368836575c6c476b + uses: github/codeql-action/init@e0ea141027937784e3c10ed1679e503fcc2245bc with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@bd1d9ab4eda903e1b5caa241368836575c6c476b + uses: github/codeql-action/autobuild@e0ea141027937784e3c10ed1679e503fcc2245bc - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@bd1d9ab4eda903e1b5caa241368836575c6c476b + uses: github/codeql-action/analyze@e0ea141027937784e3c10ed1679e503fcc2245bc From 4125ae83801a9f485059a9edaca090ee47b7632f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 22 Mar 2025 10:02:36 +0000 Subject: [PATCH 062/391] chore(deps): update dependency net.bytebuddy:byte-buddy-agent to v1.17.3 (#1385) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f04d32ee5..1ab82f468 100644 --- a/pom.xml +++ b/pom.xml @@ -196,7 +196,7 @@ net.bytebuddy byte-buddy-agent - 1.17.2 + 1.17.3 test From cb574d93b6210c89a188aa104ef4f1db68daf1c0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 24 Mar 2025 07:03:02 +0000 Subject: [PATCH 063/391] chore(deps): update dependency net.bytebuddy:byte-buddy to v1.17.4 (#1387) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1ab82f468..93a1d43da 100644 --- a/pom.xml +++ b/pom.xml @@ -189,7 +189,7 @@ net.bytebuddy byte-buddy - 1.17.3 + 1.17.4 test From d8f6514598d53f43cb084ee746742a59d271363b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 24 Mar 2025 13:00:33 +0000 Subject: [PATCH 064/391] chore(deps): update dependency net.bytebuddy:byte-buddy-agent to v1.17.4 (#1388) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 93a1d43da..f0d531dab 100644 --- a/pom.xml +++ b/pom.xml @@ -196,7 +196,7 @@ net.bytebuddy byte-buddy-agent - 1.17.3 + 1.17.4 test From 85fd5e0997ff1a5e5d7226d8bbfe2775769a6ca6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 25 Mar 2025 02:02:27 +0000 Subject: [PATCH 065/391] chore(deps): update github/codeql-action digest to 486ab5a (#1389) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 4409f1523..6e72dfb2c 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@e0ea141027937784e3c10ed1679e503fcc2245bc + uses: github/codeql-action/init@486ab5a2922b634015408a83e10f6867efb5922c with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@e0ea141027937784e3c10ed1679e503fcc2245bc + uses: github/codeql-action/analyze@486ab5a2922b634015408a83e10f6867efb5922c diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index e43a306b3..a9b7a349d 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@e0ea141027937784e3c10ed1679e503fcc2245bc + uses: github/codeql-action/init@486ab5a2922b634015408a83e10f6867efb5922c with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@e0ea141027937784e3c10ed1679e503fcc2245bc + uses: github/codeql-action/autobuild@486ab5a2922b634015408a83e10f6867efb5922c - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@e0ea141027937784e3c10ed1679e503fcc2245bc + uses: github/codeql-action/analyze@486ab5a2922b634015408a83e10f6867efb5922c From 87c06d9edd935287daf7ebc8db1e7da4831531de Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 25 Mar 2025 16:35:34 +0000 Subject: [PATCH 066/391] chore(deps): update amannn/action-semantic-pull-request digest to 04501d4 (#1390) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/lint-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml index bce134066..1b909c15e 100644 --- a/.github/workflows/lint-pr.yml +++ b/.github/workflows/lint-pr.yml @@ -18,6 +18,6 @@ jobs: name: Validate PR title runs-on: ubuntu-latest steps: - - uses: amannn/action-semantic-pull-request@40166f00814508ec3201fc8595b393d451c8cd80 + - uses: amannn/action-semantic-pull-request@04501d43b574e4c1d23c629ffe4dcec27acfdeff env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 753667925a8803b3b227f762936ae397dde95484 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 26 Mar 2025 07:41:23 +0000 Subject: [PATCH 067/391] chore(deps): update actions/setup-java digest to 3b6c050 (#1391) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 091f14b4b..b156383eb 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 - name: Set up JDK 17 - uses: actions/setup-java@b8ebb8ba1d9655f7f159c0a8b8135606ae11b5c9 + uses: actions/setup-java@3b6c050358614dd082e53cdbc55580431fc4e437 with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 6e72dfb2c..fc1ac720a 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 - name: Set up JDK 8 - uses: actions/setup-java@b8ebb8ba1d9655f7f159c0a8b8135606ae11b5c9 + uses: actions/setup-java@3b6c050358614dd082e53cdbc55580431fc4e437 with: java-version: ${{ matrix.build.java }} distribution: 'temurin' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a3b669e7d..28b5798e2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 - name: Set up JDK 17 if: ${{ steps.release.outputs.release_created }} - uses: actions/setup-java@b8ebb8ba1d9655f7f159c0a8b8135606ae11b5c9 + uses: actions/setup-java@3b6c050358614dd082e53cdbc55580431fc4e437 with: java-version: '17' distribution: 'temurin' From 24ef9dd2903d01ec029b70cd1e39e71ffe327499 Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Thu, 27 Mar 2025 09:22:19 -0400 Subject: [PATCH 068/391] fix: hooks not run in NOT_READY/FATAL (#1392) * fix: hooks not run in NOT_READY/FATAL Signed-off-by: Todd Baert --------- Signed-off-by: Todd Baert --- .../openfeature/sdk/OpenFeatureClient.java | 14 +++--- .../openfeature/sdk/FatalErrorProvider.java | 45 +++++++++++++++++++ .../dev/openfeature/sdk/HookSpecTest.java | 19 ++++++++ 3 files changed, 72 insertions(+), 6 deletions(-) create mode 100644 src/test/java/dev/openfeature/sdk/FatalErrorProvider.java diff --git a/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java b/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java index 3022ff006..e68d28f79 100644 --- a/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java +++ b/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java @@ -178,12 +178,6 @@ private FlagEvaluationDetails evaluateFlag( // provider must be accessed once to maintain a consistent reference provider = stateManager.getProvider(); ProviderState state = stateManager.getState(); - if (ProviderState.NOT_READY.equals(state)) { - throw new ProviderNotReadyError("provider not yet initialized"); - } - if (ProviderState.FATAL.equals(state)) { - throw new FatalError("provider is in an irrecoverable error state"); - } mergedHooks = ObjectUtils.merge( provider.getProviderHooks(), flagOptions.getHooks(), clientHooks, openfeatureApi.getHooks()); @@ -203,6 +197,14 @@ private FlagEvaluationDetails evaluateFlag( afterHookContext = HookContext.from(key, type, this.getMetadata(), provider.getMetadata(), mergedCtx, defaultValue); + // "short circuit" if the provider is in NOT_READY or FATAL state + if (ProviderState.NOT_READY.equals(state)) { + throw new ProviderNotReadyError("Provider not yet initialized"); + } + if (ProviderState.FATAL.equals(state)) { + throw new FatalError("Provider is in an irrecoverable error state"); + } + ProviderEvaluation providerEval = (ProviderEvaluation) createProviderEvaluation(type, key, defaultValue, provider, mergedCtx); diff --git a/src/test/java/dev/openfeature/sdk/FatalErrorProvider.java b/src/test/java/dev/openfeature/sdk/FatalErrorProvider.java new file mode 100644 index 000000000..9ebd24758 --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/FatalErrorProvider.java @@ -0,0 +1,45 @@ +package dev.openfeature.sdk; + +import dev.openfeature.sdk.exceptions.FatalError; +import dev.openfeature.sdk.exceptions.GeneralError; + +public class FatalErrorProvider implements FeatureProvider { + + private final String name = "fatal"; + + @Override + public Metadata getMetadata() { + return () -> name; + } + + @Override + public void initialize(EvaluationContext evaluationContext) throws Exception { + throw new FatalError(); // throw a fatal error on startup (this will cause the SDK to short circuit evaluations) + } + + @Override + public ProviderEvaluation getBooleanEvaluation(String key, Boolean defaultValue, EvaluationContext ctx) { + throw new GeneralError(TestConstants.BROKEN_MESSAGE); + } + + @Override + public ProviderEvaluation getStringEvaluation(String key, String defaultValue, EvaluationContext ctx) { + throw new GeneralError(TestConstants.BROKEN_MESSAGE); + } + + @Override + public ProviderEvaluation getIntegerEvaluation(String key, Integer defaultValue, EvaluationContext ctx) { + throw new GeneralError(TestConstants.BROKEN_MESSAGE); + } + + @Override + public ProviderEvaluation getDoubleEvaluation(String key, Double defaultValue, EvaluationContext ctx) { + throw new GeneralError(TestConstants.BROKEN_MESSAGE); + } + + @Override + public ProviderEvaluation getObjectEvaluation( + String key, Value defaultValue, EvaluationContext invocationContext) { + throw new GeneralError(TestConstants.BROKEN_MESSAGE); + } +} diff --git a/src/test/java/dev/openfeature/sdk/HookSpecTest.java b/src/test/java/dev/openfeature/sdk/HookSpecTest.java index 4b08510dd..3a953d18a 100644 --- a/src/test/java/dev/openfeature/sdk/HookSpecTest.java +++ b/src/test/java/dev/openfeature/sdk/HookSpecTest.java @@ -594,6 +594,25 @@ void erroneous_flagResolution_setsAppropriateFieldsInFlagEvaluationDetails() { assertThat(evaluationDetails.getValue()).isTrue(); } + @Test + void shortCircuit_flagResolution_runsHooksWithAllFields() { + String domain = "shortCircuit_flagResolution_setsAppropriateFieldsInFlagEvaluationDetails"; + api.setProvider(domain, new FatalErrorProvider()); + + Hook hook = mockBooleanHook(); + String flagKey = "test-flag-key"; + Client client = api.getClient(domain); + client.getBooleanValue( + flagKey, + true, + new ImmutableContext(), + FlagEvaluationOptions.builder().hook(hook).build()); + + verify(hook).before(any(), any()); + verify(hook).error(any(HookContext.class), any(Exception.class), any(Map.class)); + verify(hook).finallyAfter(any(HookContext.class), any(FlagEvaluationDetails.class), any(Map.class)); + } + @Test void successful_flagResolution_setsAppropriateFieldsInFlagEvaluationDetails() { Hook hook = mockBooleanHook(); From 7f54c334da017ff8395edffefd51d02956ec8134 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 27 Mar 2025 15:48:06 -0400 Subject: [PATCH 069/391] chore(main): release 1.14.2 (#1334) * chore(main): release 1.15.0 * Update CHANGELOG.md Signed-off-by: Todd Baert * Update .release-please-manifest.json Signed-off-by: Todd Baert * Update CHANGELOG.md Signed-off-by: Todd Baert * Update version.txt Signed-off-by: Todd Baert * Update README.md Signed-off-by: Todd Baert * Update README.md Signed-off-by: Todd Baert * Update pom.xml Signed-off-by: Todd Baert --------- Signed-off-by: Todd Baert Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Todd Baert --- .release-please-manifest.json | 2 +- CHANGELOG.md | 63 +++++++++++++++++++++++++++++++++++ README.md | 8 ++--- pom.xml | 2 +- version.txt | 2 +- 5 files changed, 70 insertions(+), 7 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f459d7afd..762e32db5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{".":"1.14.1"} \ No newline at end of file +{".":"1.14.2"} diff --git a/CHANGELOG.md b/CHANGELOG.md index 6301fce0d..914cbfef3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,68 @@ # Changelog +## [1.14.2](https://github.com/open-feature/java-sdk/compare/v1.14.1...v1.14.2) (2025-03-27) + + +### ๐Ÿ› Bug Fixes + +* **deps:** update dependency org.slf4j:slf4j-api to v2.0.17 ([#1348](https://github.com/open-feature/java-sdk/issues/1348)) ([2ec7c6c](https://github.com/open-feature/java-sdk/commit/2ec7c6c7ff704380fdfd8116378adf78734e4f2b)) +* **deps:** update junit5 monorepo ([#1344](https://github.com/open-feature/java-sdk/issues/1344)) ([d95e270](https://github.com/open-feature/java-sdk/commit/d95e2706532259bd5739e5b4ea4813ef9f2196a6)) +* **deps:** update junit5 monorepo ([#1373](https://github.com/open-feature/java-sdk/issues/1373)) ([6b65e26](https://github.com/open-feature/java-sdk/commit/6b65e26c7439895652c3f64f2b4a7307a7ca582e)) +* equals and hashcode of several classes ([69b571e](https://github.com/open-feature/java-sdk/commit/69b571eda73b6f43c99864420b8663ae54ebf0ad)) +* equals and hashcode of several classes ([#1364](https://github.com/open-feature/java-sdk/issues/1364)) ([69b571e](https://github.com/open-feature/java-sdk/commit/69b571eda73b6f43c99864420b8663ae54ebf0ad)) +* hooks not run in NOT_READY/FATAL ([#1392](https://github.com/open-feature/java-sdk/issues/1392)) ([24ef9dd](https://github.com/open-feature/java-sdk/commit/24ef9dd2903d01ec029b70cd1e39e71ffe327499)) + + +### ๐Ÿงน Chore + +* **deps:** update actions/cache digest to 5a3ec84 ([#1380](https://github.com/open-feature/java-sdk/issues/1380)) ([8359ef1](https://github.com/open-feature/java-sdk/commit/8359ef13bb935ac1d144787cfd7181814a0b286c)) +* **deps:** update actions/cache digest to 7921ae2 ([#1337](https://github.com/open-feature/java-sdk/issues/1337)) ([3920c63](https://github.com/open-feature/java-sdk/commit/3920c638a49caddfb07041f812cc6bc0bf3101f9)) +* **deps:** update actions/cache digest to d4323d4 ([#1353](https://github.com/open-feature/java-sdk/issues/1353)) ([5901797](https://github.com/open-feature/java-sdk/commit/59017977a487a36c8a39f63b83299bc657134c0d)) +* **deps:** update actions/setup-java digest to 3b6c050 ([#1391](https://github.com/open-feature/java-sdk/issues/1391)) ([7536679](https://github.com/open-feature/java-sdk/commit/753667925a8803b3b227f762936ae397dde95484)) +* **deps:** update actions/setup-java digest to 799ee7c ([#1359](https://github.com/open-feature/java-sdk/issues/1359)) ([31444d6](https://github.com/open-feature/java-sdk/commit/31444d6c8f30f0dd35debacc9dab8da7397e11ed)) +* **deps:** update actions/setup-java digest to b8ebb8b ([#1381](https://github.com/open-feature/java-sdk/issues/1381)) ([2239f05](https://github.com/open-feature/java-sdk/commit/2239f054b90734dde6cdd4a23daec1c1daa96f07)) +* **deps:** update amannn/action-semantic-pull-request digest to 04501d4 ([#1390](https://github.com/open-feature/java-sdk/issues/1390)) ([87c06d9](https://github.com/open-feature/java-sdk/commit/87c06d9edd935287daf7ebc8db1e7da4831531de)) +* **deps:** update codecov/codecov-action action to v5.4.0 ([#1351](https://github.com/open-feature/java-sdk/issues/1351)) ([b133c2f](https://github.com/open-feature/java-sdk/commit/b133c2fa527a0dddb6de7f7781a00fc84feaa813)) +* **deps:** update dependency com.diffplug.spotless:spotless-maven-plugin to v2.44.3 ([#1341](https://github.com/open-feature/java-sdk/issues/1341)) ([5de33c0](https://github.com/open-feature/java-sdk/commit/5de33c02a675db6ca5966bfa3f58d99c8e53e36b)) +* **deps:** update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.9.1.0 ([#1332](https://github.com/open-feature/java-sdk/issues/1332)) ([cdcdc14](https://github.com/open-feature/java-sdk/commit/cdcdc143ea5ad2f003cb3f5450ec78314e619ea3)) +* **deps:** update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.9.2.0 ([#1360](https://github.com/open-feature/java-sdk/issues/1360)) ([ecea9df](https://github.com/open-feature/java-sdk/commit/ecea9df932ee4874613f219b73640fe964c99593)) +* **deps:** update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.9.3.0 ([#1375](https://github.com/open-feature/java-sdk/issues/1375)) ([de3e213](https://github.com/open-feature/java-sdk/commit/de3e213ac8b8931121904a3d12929405512e74dd)) +* **deps:** update dependency net.bytebuddy:byte-buddy to v1.17.2 ([#1355](https://github.com/open-feature/java-sdk/issues/1355)) ([2a1adca](https://github.com/open-feature/java-sdk/commit/2a1adca8c2ed8d61d51530969290793a5d3d15f3)) +* **deps:** update dependency net.bytebuddy:byte-buddy to v1.17.3 ([#1384](https://github.com/open-feature/java-sdk/issues/1384)) ([b6becac](https://github.com/open-feature/java-sdk/commit/b6becac2c4e0f98a8651cc2f77d4c0b081548991)) +* **deps:** update dependency net.bytebuddy:byte-buddy to v1.17.4 ([#1387](https://github.com/open-feature/java-sdk/issues/1387)) ([cb574d9](https://github.com/open-feature/java-sdk/commit/cb574d93b6210c89a188aa104ef4f1db68daf1c0)) +* **deps:** update dependency net.bytebuddy:byte-buddy-agent to v1.17.2 ([#1356](https://github.com/open-feature/java-sdk/issues/1356)) ([dd83114](https://github.com/open-feature/java-sdk/commit/dd83114c4d9389753575392fafcd56585d7178ae)) +* **deps:** update dependency net.bytebuddy:byte-buddy-agent to v1.17.3 ([#1385](https://github.com/open-feature/java-sdk/issues/1385)) ([4125ae8](https://github.com/open-feature/java-sdk/commit/4125ae83801a9f485059a9edaca090ee47b7632f)) +* **deps:** update dependency net.bytebuddy:byte-buddy-agent to v1.17.4 ([#1388](https://github.com/open-feature/java-sdk/issues/1388)) ([d8f6514](https://github.com/open-feature/java-sdk/commit/d8f6514598d53f43cb084ee746742a59d271363b)) +* **deps:** update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.14.0 ([#1342](https://github.com/open-feature/java-sdk/issues/1342)) ([88a778c](https://github.com/open-feature/java-sdk/commit/88a778cc03e112d45756428d1f0ae1ef0fe02c84)) +* **deps:** update dependency org.awaitility:awaitility to v4.3.0 ([#1343](https://github.com/open-feature/java-sdk/issues/1343)) ([1504d0f](https://github.com/open-feature/java-sdk/commit/1504d0f7982757a2b413eda593ce7057b90519e5)) +* **deps:** update dependency org.mockito:mockito-core to v5.15.2 ([#1339](https://github.com/open-feature/java-sdk/issues/1339)) ([4817864](https://github.com/open-feature/java-sdk/commit/4817864fd7ae70c1e19c3c09e82e1fb03dd88942)) +* **deps:** update dependency org.mockito:mockito-core to v5.16.0 ([#1358](https://github.com/open-feature/java-sdk/issues/1358)) ([30b6d00](https://github.com/open-feature/java-sdk/commit/30b6d004aaf3464547805f7eda6fad0e122de4f9)) +* **deps:** update dependency org.mockito:mockito-core to v5.16.1 ([#1376](https://github.com/open-feature/java-sdk/issues/1376)) ([9750f75](https://github.com/open-feature/java-sdk/commit/9750f75d04beb8339fc2e972f0ee97120eaff354)) +* **deps:** update github/codeql-action digest to 1bb15d0 ([#1336](https://github.com/open-feature/java-sdk/issues/1336)) ([e163ce1](https://github.com/open-feature/java-sdk/commit/e163ce1c060d0dc8812e4a8a3b37f52b0156324d)) +* **deps:** update github/codeql-action digest to 486ab5a ([#1389](https://github.com/open-feature/java-sdk/issues/1389)) ([85fd5e0](https://github.com/open-feature/java-sdk/commit/85fd5e0997ff1a5e5d7226d8bbfe2775769a6ca6)) +* **deps:** update github/codeql-action digest to 56b25d5 ([#1365](https://github.com/open-feature/java-sdk/issues/1365)) ([959e675](https://github.com/open-feature/java-sdk/commit/959e675e4c2363e5fd80d1d2f1edbfab11794fc8)) +* **deps:** update github/codeql-action digest to 608ccd6 ([#1361](https://github.com/open-feature/java-sdk/issues/1361)) ([67b34f8](https://github.com/open-feature/java-sdk/commit/67b34f84a373512013ab2f7649faaddfd2d61048)) +* **deps:** update github/codeql-action digest to 6349095 ([#1378](https://github.com/open-feature/java-sdk/issues/1378)) ([dbf92df](https://github.com/open-feature/java-sdk/commit/dbf92df33bf5657d50dc3b2f129207b0097c1f27)) +* **deps:** update github/codeql-action digest to 6a151cd ([#1377](https://github.com/open-feature/java-sdk/issues/1377)) ([7065655](https://github.com/open-feature/java-sdk/commit/706565581d78856dd73605b1a16b131f974c0731)) +* **deps:** update github/codeql-action digest to 70df9de ([#1372](https://github.com/open-feature/java-sdk/issues/1372)) ([d233480](https://github.com/open-feature/java-sdk/commit/d233480912f1d5e095f5034f36a838535d1ecdff)) +* **deps:** update github/codeql-action digest to 7254660 ([#1368](https://github.com/open-feature/java-sdk/issues/1368)) ([d54c68a](https://github.com/open-feature/java-sdk/commit/d54c68a8e9e4a0f67c99e7d76621a1c5724e4cd1)) +* **deps:** update github/codeql-action digest to 80f9930 ([#1357](https://github.com/open-feature/java-sdk/issues/1357)) ([6c03e5d](https://github.com/open-feature/java-sdk/commit/6c03e5d84aacee11f5b8e608a6114c11fced72b8)) +* **deps:** update github/codeql-action digest to 8392354 ([#1352](https://github.com/open-feature/java-sdk/issues/1352)) ([989f4ae](https://github.com/open-feature/java-sdk/commit/989f4ae54263b46ca2c81561acc70b39918c382d)) +* **deps:** update github/codeql-action digest to 8c1551c ([#1333](https://github.com/open-feature/java-sdk/issues/1333)) ([859a36c](https://github.com/open-feature/java-sdk/commit/859a36cbfafc94d4601b87d304237e6ddf97c08d)) +* **deps:** update github/codeql-action digest to 8c69433 ([#1347](https://github.com/open-feature/java-sdk/issues/1347)) ([6987568](https://github.com/open-feature/java-sdk/commit/698756856ba40e98d91ccf661dab409798861aa5)) +* **deps:** update github/codeql-action digest to 97aac9b ([#1350](https://github.com/open-feature/java-sdk/issues/1350)) ([7df9565](https://github.com/open-feature/java-sdk/commit/7df9565691731d164b534116b8a6b933b171d103)) +* **deps:** update github/codeql-action digest to a8849fb ([#1345](https://github.com/open-feature/java-sdk/issues/1345)) ([de64edd](https://github.com/open-feature/java-sdk/commit/de64eddfb3a6cc117bb108dbcf167830e9f6729d)) +* **deps:** update github/codeql-action digest to acadfed ([#1335](https://github.com/open-feature/java-sdk/issues/1335)) ([5436eb0](https://github.com/open-feature/java-sdk/commit/5436eb0d5db3a0e9bd9289fbef57b9eeada0a667)) +* **deps:** update github/codeql-action digest to b2e6519 ([#1366](https://github.com/open-feature/java-sdk/issues/1366)) ([d00e4b5](https://github.com/open-feature/java-sdk/commit/d00e4b5b24621aa55085827fbe6ea982491376de)) +* **deps:** update github/codeql-action digest to b46b37a ([#1367](https://github.com/open-feature/java-sdk/issues/1367)) ([c550d59](https://github.com/open-feature/java-sdk/commit/c550d597227bfc1e0e17357139f1fd8a87593be0)) +* **deps:** update github/codeql-action digest to bd1d9ab ([#1383](https://github.com/open-feature/java-sdk/issues/1383)) ([922e17e](https://github.com/open-feature/java-sdk/commit/922e17e677e15690e3df2fe93a961f16f21ff283)) +* **deps:** update github/codeql-action digest to c50c157 ([#1379](https://github.com/open-feature/java-sdk/issues/1379)) ([d61c33e](https://github.com/open-feature/java-sdk/commit/d61c33e466336c7120b870ca5e3843eba5f7175c)) +* **deps:** update github/codeql-action digest to d99c7e8 ([#1338](https://github.com/open-feature/java-sdk/issues/1338)) ([4e535fd](https://github.com/open-feature/java-sdk/commit/4e535fd10fac742ca472faa62c941fa51b282ca7)) +* **deps:** update github/codeql-action digest to dc49dca ([#1369](https://github.com/open-feature/java-sdk/issues/1369)) ([f8df5fb](https://github.com/open-feature/java-sdk/commit/f8df5fb84a765af917587dd509f9cec38103f787)) +* **deps:** update github/codeql-action digest to e0ea141 ([#1386](https://github.com/open-feature/java-sdk/issues/1386)) ([387e5f2](https://github.com/open-feature/java-sdk/commit/387e5f2e3bd24ccea6691b0d6dbfe542cfd05b52)) +* **deps:** update github/codeql-action digest to ff79de6 ([#1340](https://github.com/open-feature/java-sdk/issues/1340)) ([50b45b2](https://github.com/open-feature/java-sdk/commit/50b45b2be442bb89a431c9bcc45d825f63bd93a6)) +* update build and tooling to utilize new java version ([#1321](https://github.com/open-feature/java-sdk/issues/1321)) ([90217b2](https://github.com/open-feature/java-sdk/commit/90217b2083a2ba92c623365dc450326d49b46fab)) + ## [1.14.1](https://github.com/open-feature/java-sdk/compare/v1.14.0...v1.14.1) (2025-02-14) diff --git a/README.md b/README.md index 49d5562e0..22d85bd2d 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ - - Release + + Release @@ -59,7 +59,7 @@ Note that this library is intended to be used in server-side contexts and has no dev.openfeature sdk - 1.14.1 + 1.14.2 ``` @@ -84,7 +84,7 @@ If you would like snapshot builds, this is the relevant repository information: ```groovy dependencies { - implementation 'dev.openfeature:sdk:1.14.1' + implementation 'dev.openfeature:sdk:1.14.2' } ``` diff --git a/pom.xml b/pom.xml index f0d531dab..7b8e0d587 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ dev.openfeature sdk - 1.14.1 + 1.14.2 [17,) diff --git a/version.txt b/version.txt index 63e799cf4..a4cc55716 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.14.1 +1.14.2 From d7b591c9f910afad303d6d814f65c7f9dab33b89 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 27 Mar 2025 23:40:23 +0000 Subject: [PATCH 070/391] chore(deps): update github/codeql-action digest to 9bd18b4 (#1394) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index fc1ac720a..5a5248b15 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@486ab5a2922b634015408a83e10f6867efb5922c + uses: github/codeql-action/init@9bd18b486fd4e8174d935b2c781f53e02afb1eb6 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@486ab5a2922b634015408a83e10f6867efb5922c + uses: github/codeql-action/analyze@9bd18b486fd4e8174d935b2c781f53e02afb1eb6 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index a9b7a349d..bd468faf5 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@486ab5a2922b634015408a83e10f6867efb5922c + uses: github/codeql-action/init@9bd18b486fd4e8174d935b2c781f53e02afb1eb6 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@486ab5a2922b634015408a83e10f6867efb5922c + uses: github/codeql-action/autobuild@9bd18b486fd4e8174d935b2c781f53e02afb1eb6 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@486ab5a2922b634015408a83e10f6867efb5922c + uses: github/codeql-action/analyze@9bd18b486fd4e8174d935b2c781f53e02afb1eb6 From 37d76be697e83f524250a82b2a67cdb4a953d7bc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 28 Mar 2025 23:26:09 +0000 Subject: [PATCH 071/391] chore(deps): update github/codeql-action digest to 9f45e74 (#1396) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 5a5248b15..3580d2222 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@9bd18b486fd4e8174d935b2c781f53e02afb1eb6 + uses: github/codeql-action/init@9f45e7498becbbc08084a122b4be9ab534ac6d88 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@9bd18b486fd4e8174d935b2c781f53e02afb1eb6 + uses: github/codeql-action/analyze@9f45e7498becbbc08084a122b4be9ab534ac6d88 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index bd468faf5..ce8fea7b6 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@9bd18b486fd4e8174d935b2c781f53e02afb1eb6 + uses: github/codeql-action/init@9f45e7498becbbc08084a122b4be9ab534ac6d88 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@9bd18b486fd4e8174d935b2c781f53e02afb1eb6 + uses: github/codeql-action/autobuild@9f45e7498becbbc08084a122b4be9ab534ac6d88 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@9bd18b486fd4e8174d935b2c781f53e02afb1eb6 + uses: github/codeql-action/analyze@9f45e7498becbbc08084a122b4be9ab534ac6d88 From 1fcf0e77d956c88c54e10942d96d2afd4d79315c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 05:38:29 +0000 Subject: [PATCH 072/391] chore(deps): update dependency org.apache.maven.plugins:maven-failsafe-plugin to v3.5.3 (#1398) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 7b8e0d587..3e7ff47cc 100644 --- a/pom.xml +++ b/pom.xml @@ -287,7 +287,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.5.2 + 3.5.3 ${surefireArgLine} @@ -690,7 +690,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.5.2 + 3.5.3 ${surefireArgLine} From d6ebc161a93ad703e25592abdb0bf0fd9e281bbc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 10:47:07 +0000 Subject: [PATCH 073/391] chore(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.5.3 (#1399) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 3e7ff47cc..65c370ea2 100644 --- a/pom.xml +++ b/pom.xml @@ -268,7 +268,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.2 + 3.5.3 1 false @@ -674,7 +674,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.2 + 3.5.3 ${surefireArgLine} From 1f2d0715087ebd4554826d8552b250e4b8b950c8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 15:00:52 +0000 Subject: [PATCH 074/391] chore(deps): update dependency net.bytebuddy:byte-buddy to v1.17.5 (#1400) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 65c370ea2..d3c8d1875 100644 --- a/pom.xml +++ b/pom.xml @@ -189,7 +189,7 @@ net.bytebuddy byte-buddy - 1.17.4 + 1.17.5 test From 384953d30ecff83d60a2e5b9790e8228d1a52ac7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 18:29:21 +0000 Subject: [PATCH 075/391] chore(deps): update github/codeql-action digest to efffb48 (#1402) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 3580d2222..2967f1db5 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@9f45e7498becbbc08084a122b4be9ab534ac6d88 + uses: github/codeql-action/init@efffb483ec7bb162c4b7935f8b35ab6b94136c7b with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@9f45e7498becbbc08084a122b4be9ab534ac6d88 + uses: github/codeql-action/analyze@efffb483ec7bb162c4b7935f8b35ab6b94136c7b diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index ce8fea7b6..21ca3e569 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@9f45e7498becbbc08084a122b4be9ab534ac6d88 + uses: github/codeql-action/init@efffb483ec7bb162c4b7935f8b35ab6b94136c7b with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@9f45e7498becbbc08084a122b4be9ab534ac6d88 + uses: github/codeql-action/autobuild@efffb483ec7bb162c4b7935f8b35ab6b94136c7b - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@9f45e7498becbbc08084a122b4be9ab534ac6d88 + uses: github/codeql-action/analyze@efffb483ec7bb162c4b7935f8b35ab6b94136c7b From 07301bda3f5b65550eff1e025fc9c0bec3c25275 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 23:11:43 +0000 Subject: [PATCH 076/391] chore(deps): update dependency net.bytebuddy:byte-buddy-agent to v1.17.5 (#1401) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d3c8d1875..59d543027 100644 --- a/pom.xml +++ b/pom.xml @@ -196,7 +196,7 @@ net.bytebuddy byte-buddy-agent - 1.17.4 + 1.17.5 test From ef32f11571de4d3a981efec4f61113eb8b0d7d9d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 1 Apr 2025 03:02:58 +0000 Subject: [PATCH 077/391] fix(deps): update dependency org.projectlombok:lombok to v1.18.38 (#1403) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 59d543027..9e5128c38 100644 --- a/pom.xml +++ b/pom.xml @@ -54,7 +54,7 @@ org.projectlombok lombok - 1.18.36 + 1.18.38 provided From f834e11acc7ecf903e972d80e9dab324be97847e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 1 Apr 2025 22:21:36 +0000 Subject: [PATCH 078/391] chore(deps): update actions/setup-java digest to 148017a (#1404) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index b156383eb..151aa999b 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 - name: Set up JDK 17 - uses: actions/setup-java@3b6c050358614dd082e53cdbc55580431fc4e437 + uses: actions/setup-java@148017a9b0c6af80330bcc5db11d1c670d2e7074 with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 2967f1db5..838a54f68 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 - name: Set up JDK 8 - uses: actions/setup-java@3b6c050358614dd082e53cdbc55580431fc4e437 + uses: actions/setup-java@148017a9b0c6af80330bcc5db11d1c670d2e7074 with: java-version: ${{ matrix.build.java }} distribution: 'temurin' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 28b5798e2..10f92e236 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 - name: Set up JDK 17 if: ${{ steps.release.outputs.release_created }} - uses: actions/setup-java@3b6c050358614dd082e53cdbc55580431fc4e437 + uses: actions/setup-java@148017a9b0c6af80330bcc5db11d1c670d2e7074 with: java-version: '17' distribution: 'temurin' From 5b2f1513ab75ef6692978830e59eba87ffa494d5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 2 Apr 2025 17:47:53 +0000 Subject: [PATCH 079/391] chore(deps): update github/codeql-action digest to dab8a02 (#1405) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 838a54f68..152452a15 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@efffb483ec7bb162c4b7935f8b35ab6b94136c7b + uses: github/codeql-action/init@dab8a02091b7e1893928f2da086a62b5a8118c33 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@efffb483ec7bb162c4b7935f8b35ab6b94136c7b + uses: github/codeql-action/analyze@dab8a02091b7e1893928f2da086a62b5a8118c33 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 21ca3e569..66756bf4d 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@efffb483ec7bb162c4b7935f8b35ab6b94136c7b + uses: github/codeql-action/init@dab8a02091b7e1893928f2da086a62b5a8118c33 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@efffb483ec7bb162c4b7935f8b35ab6b94136c7b + uses: github/codeql-action/autobuild@dab8a02091b7e1893928f2da086a62b5a8118c33 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@efffb483ec7bb162c4b7935f8b35ab6b94136c7b + uses: github/codeql-action/analyze@dab8a02091b7e1893928f2da086a62b5a8118c33 From e211397d517e1263e1251f9c99093bf05cecd93f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 3 Apr 2025 02:18:17 +0000 Subject: [PATCH 080/391] chore(deps): update github/codeql-action digest to e13fe0d (#1406) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 152452a15..2ff95affa 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@dab8a02091b7e1893928f2da086a62b5a8118c33 + uses: github/codeql-action/init@e13fe0dd2d51f2b63b05fee9b9cda14b2050f678 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@dab8a02091b7e1893928f2da086a62b5a8118c33 + uses: github/codeql-action/analyze@e13fe0dd2d51f2b63b05fee9b9cda14b2050f678 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 66756bf4d..41db9e1be 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@dab8a02091b7e1893928f2da086a62b5a8118c33 + uses: github/codeql-action/init@e13fe0dd2d51f2b63b05fee9b9cda14b2050f678 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@dab8a02091b7e1893928f2da086a62b5a8118c33 + uses: github/codeql-action/autobuild@e13fe0dd2d51f2b63b05fee9b9cda14b2050f678 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@dab8a02091b7e1893928f2da086a62b5a8118c33 + uses: github/codeql-action/analyze@e13fe0dd2d51f2b63b05fee9b9cda14b2050f678 From ca160cab7ccd71527e06a0851502353ac50b8d0d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 3 Apr 2025 18:12:31 +0000 Subject: [PATCH 081/391] chore(deps): update github/codeql-action digest to 362ef4c (#1408) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 2ff95affa..6fde6ef26 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@e13fe0dd2d51f2b63b05fee9b9cda14b2050f678 + uses: github/codeql-action/init@362ef4ce205154842cd1d34794abd82bb8f12cd5 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@e13fe0dd2d51f2b63b05fee9b9cda14b2050f678 + uses: github/codeql-action/analyze@362ef4ce205154842cd1d34794abd82bb8f12cd5 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 41db9e1be..8e161d754 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@e13fe0dd2d51f2b63b05fee9b9cda14b2050f678 + uses: github/codeql-action/init@362ef4ce205154842cd1d34794abd82bb8f12cd5 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@e13fe0dd2d51f2b63b05fee9b9cda14b2050f678 + uses: github/codeql-action/autobuild@362ef4ce205154842cd1d34794abd82bb8f12cd5 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@e13fe0dd2d51f2b63b05fee9b9cda14b2050f678 + uses: github/codeql-action/analyze@362ef4ce205154842cd1d34794abd82bb8f12cd5 From 345cdcfa10da64c61d769746f335f38ac564e9ad Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 4 Apr 2025 18:42:05 +0000 Subject: [PATCH 082/391] chore(deps): update dependency org.mockito:mockito-core to v5.17.0 (#1409) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9e5128c38..6b303c904 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ ${maven.compiler.source} 5.12.1 7.21.1 - 5.16.1 + 5.17.0 **/e2e/*.java ${project.groupId}.${project.artifactId} From 3c69f2f36c4e975d690ecc2e790df632a33001ba Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 5 Apr 2025 06:25:16 +0000 Subject: [PATCH 083/391] chore(deps): update io.cucumber.version to v7.22.0 (#1410) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6b303c904..a6e5be43a 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ 1.8 ${maven.compiler.source} 5.12.1 - 7.21.1 + 7.22.0 5.17.0 **/e2e/*.java From e25181982af8e5d37be4876b71b337ca86e8454b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 5 Apr 2025 10:23:07 +0000 Subject: [PATCH 084/391] fix(deps): update dependency io.cucumber:cucumber-bom to v7.22.0 (#1411) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a6e5be43a..a725224ce 100644 --- a/pom.xml +++ b/pom.xml @@ -204,7 +204,7 @@ io.cucumber cucumber-bom - 7.21.1 + 7.22.0 pom import From 5b327eeb770d0a4222f3599be79543b7bed9abc2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 8 Apr 2025 01:31:00 +0000 Subject: [PATCH 085/391] chore(deps): update github/codeql-action digest to d26c46a (#1413) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 6fde6ef26..7400975d4 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@362ef4ce205154842cd1d34794abd82bb8f12cd5 + uses: github/codeql-action/init@d26c46acea4065b13fc57703621e0a7c8b9e836b with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@362ef4ce205154842cd1d34794abd82bb8f12cd5 + uses: github/codeql-action/analyze@d26c46acea4065b13fc57703621e0a7c8b9e836b diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 8e161d754..654d3fff4 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@362ef4ce205154842cd1d34794abd82bb8f12cd5 + uses: github/codeql-action/init@d26c46acea4065b13fc57703621e0a7c8b9e836b with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@362ef4ce205154842cd1d34794abd82bb8f12cd5 + uses: github/codeql-action/autobuild@d26c46acea4065b13fc57703621e0a7c8b9e836b - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@362ef4ce205154842cd1d34794abd82bb8f12cd5 + uses: github/codeql-action/analyze@d26c46acea4065b13fc57703621e0a7c8b9e836b From e066d3f749c09bb1ef79e3bcace1d205a39787df Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 8 Apr 2025 06:34:39 +0000 Subject: [PATCH 086/391] chore(deps): update dependency com.diffplug.spotless:spotless-maven-plugin to v2.44.4 (#1414) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a725224ce..7f9d47e66 100644 --- a/pom.xml +++ b/pom.xml @@ -473,7 +473,7 @@ com.diffplug.spotless spotless-maven-plugin - 2.44.3 + 2.44.4 From a5789038acc36cb2b0ddf12e534a1317e1c9b8e8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 8 Apr 2025 23:02:50 +0000 Subject: [PATCH 087/391] chore(deps): update actions/setup-java digest to c5195ef (#1415) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 151aa999b..e9c3dd12c 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 - name: Set up JDK 17 - uses: actions/setup-java@148017a9b0c6af80330bcc5db11d1c670d2e7074 + uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 7400975d4..501c96995 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 - name: Set up JDK 8 - uses: actions/setup-java@148017a9b0c6af80330bcc5db11d1c670d2e7074 + uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 with: java-version: ${{ matrix.build.java }} distribution: 'temurin' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 10f92e236..f5c1a2e74 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 - name: Set up JDK 17 if: ${{ steps.release.outputs.release_created }} - uses: actions/setup-java@148017a9b0c6af80330bcc5db11d1c670d2e7074 + uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 with: java-version: '17' distribution: 'temurin' From 4607c62f15f7ee572207b8ec012ad4b3626e0184 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 9 Apr 2025 22:09:23 +0000 Subject: [PATCH 088/391] chore(deps): update github/codeql-action digest to 56dd02f (#1416) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 501c96995..c7e8f2957 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@d26c46acea4065b13fc57703621e0a7c8b9e836b + uses: github/codeql-action/init@56dd02f26d99811d607284494ff84b7d862fe837 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@d26c46acea4065b13fc57703621e0a7c8b9e836b + uses: github/codeql-action/analyze@56dd02f26d99811d607284494ff84b7d862fe837 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 654d3fff4..2f9c1f074 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@d26c46acea4065b13fc57703621e0a7c8b9e836b + uses: github/codeql-action/init@56dd02f26d99811d607284494ff84b7d862fe837 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@d26c46acea4065b13fc57703621e0a7c8b9e836b + uses: github/codeql-action/autobuild@56dd02f26d99811d607284494ff84b7d862fe837 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@d26c46acea4065b13fc57703621e0a7c8b9e836b + uses: github/codeql-action/analyze@56dd02f26d99811d607284494ff84b7d862fe837 From 0c77c8446032eaac7e068d48901e1423c21db326 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 02:21:54 +0000 Subject: [PATCH 089/391] chore(deps): update github/codeql-action digest to 4c3e536 (#1417) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index c7e8f2957..ef35c9dce 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@56dd02f26d99811d607284494ff84b7d862fe837 + uses: github/codeql-action/init@4c3e5362829f0b0bb62ff5f6c938d7f95574c306 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@56dd02f26d99811d607284494ff84b7d862fe837 + uses: github/codeql-action/analyze@4c3e5362829f0b0bb62ff5f6c938d7f95574c306 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 2f9c1f074..ea6035c18 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@56dd02f26d99811d607284494ff84b7d862fe837 + uses: github/codeql-action/init@4c3e5362829f0b0bb62ff5f6c938d7f95574c306 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@56dd02f26d99811d607284494ff84b7d862fe837 + uses: github/codeql-action/autobuild@4c3e5362829f0b0bb62ff5f6c938d7f95574c306 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@56dd02f26d99811d607284494ff84b7d862fe837 + uses: github/codeql-action/analyze@4c3e5362829f0b0bb62ff5f6c938d7f95574c306 From 97b442ed6e8f2b99ca949ffd63e5cbf57718c796 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 21:45:27 +0000 Subject: [PATCH 090/391] fix(deps): update junit5 monorepo (#1418) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 7f9d47e66..5028322be 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ UTF-8 1.8 ${maven.compiler.source} - 5.12.1 + 5.12.2 7.22.0 5.17.0 @@ -125,7 +125,7 @@ org.junit.platform junit-platform-suite - 1.12.1 + 1.12.2 test @@ -212,7 +212,7 @@ org.junit junit-bom - 5.12.1 + 5.12.2 pom import From a6389e89f60aa7f4871f47d78fedd27a7f9991b4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 15 Apr 2025 03:44:53 +0000 Subject: [PATCH 091/391] chore(deps): update codecov/codecov-action action to v5.4.2 (#1419) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index e9c3dd12c..72a3a3c32 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -48,7 +48,7 @@ jobs: run: mvn --batch-mode --update-snapshots verify - name: Upload coverage to Codecov - uses: codecov/codecov-action@v5.4.0 + uses: codecov/codecov-action@v5.4.2 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos flags: unittests # optional diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index ef35c9dce..900a4025e 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -46,7 +46,7 @@ jobs: - if: matrix.build.java == '17' name: Upload coverage to Codecov - uses: codecov/codecov-action@v5.4.0 + uses: codecov/codecov-action@v5.4.2 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos flags: unittests # optional From 665dd51eb2b3b79d3ffccb6cef64d544aa5e7206 Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Wed, 16 Apr 2025 12:45:16 -0400 Subject: [PATCH 092/391] chore: add publish env (#1420) * chore: add publish env Signed-off-by: Todd Baert * Update release.yml Signed-off-by: Todd Baert * Update merge.yml Signed-off-by: Todd Baert --------- Signed-off-by: Todd Baert --- .github/workflows/merge.yml | 4 +++- .github/workflows/release.yml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 72a3a3c32..edb3c6ef7 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -9,13 +9,15 @@ name: on-merge on: push: - branches: [ master, main ] + branches: + - main permissions: contents: read jobs: build: + environment: publish runs-on: ubuntu-latest steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f5c1a2e74..7359285d0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,6 +12,7 @@ permissions: # added using https://github.com/step-security/secure-workflows jobs: release-please: + environment: publish permissions: contents: write # for google-github-actions/release-please-action to create release commit pull-requests: write # for google-github-actions/release-please-action to create release PR From a3e2a59aebee051ae8c7eb1c5769a04dc9da8de3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 16 Apr 2025 21:41:52 +0000 Subject: [PATCH 093/391] chore(deps): update actions/setup-java digest to f4f1212 (#1421) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index edb3c6ef7..58e096350 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 - name: Set up JDK 17 - uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 + uses: actions/setup-java@f4f1212c880fdec8162ea9a6493f4495191887b4 with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 900a4025e..08c65f7ed 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 - name: Set up JDK 8 - uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 + uses: actions/setup-java@f4f1212c880fdec8162ea9a6493f4495191887b4 with: java-version: ${{ matrix.build.java }} distribution: 'temurin' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7359285d0..e9b6c7641 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 - name: Set up JDK 17 if: ${{ steps.release.outputs.release_created }} - uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 + uses: actions/setup-java@f4f1212c880fdec8162ea9a6493f4495191887b4 with: java-version: '17' distribution: 'temurin' From 498fd382659669315b0db61db5f19ce054467bc9 Mon Sep 17 00:00:00 2001 From: Simon Schrottner Date: Thu, 17 Apr 2025 17:33:57 +0200 Subject: [PATCH 094/391] chore: update codeowners to give global maintainers code ownership (#1412) Signed-off-by: Simon Schrottner --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index e75c1d5f1..342eb8df1 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -3,4 +3,4 @@ # # Managed by Peribolos: https://github.com/open-feature/community/blob/main/config/open-feature/sdk-java/workgroup.yaml # -* @open-feature/sdk-java-maintainers +* @open-feature/sdk-java-maintainers @open-feature/maintainers From e19ccaa35d9ac4d89d72ea58a70d416d202078db Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 18 Apr 2025 08:15:55 +0200 Subject: [PATCH 095/391] chore(deps): update dependency org.jacoco:jacoco-maven-plugin to v0.8.13 (#1407) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5028322be..bac8ef2ef 100644 --- a/pom.xml +++ b/pom.xml @@ -354,7 +354,7 @@ org.jacoco jacoco-maven-plugin - 0.8.12 + 0.8.13 From 495da271bee976a942973cd23012f60db895bf24 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 20 Apr 2025 10:02:26 +0000 Subject: [PATCH 096/391] chore(deps): update dependency com.h3xstream.findsecbugs:findsecbugs-plugin to v1.14.0 (#1422) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bac8ef2ef..3a81fc2b6 100644 --- a/pom.xml +++ b/pom.xml @@ -420,7 +420,7 @@ com.h3xstream.findsecbugs findsecbugs-plugin - 1.13.0 + 1.14.0 From 6b6849f3a3ee8a7b66d859c8e522bc101d1ccd44 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 22 Apr 2025 19:25:23 +0000 Subject: [PATCH 097/391] chore(deps): update github/codeql-action digest to 2a8cbad (#1423) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 08c65f7ed..cc7b5f3f7 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@4c3e5362829f0b0bb62ff5f6c938d7f95574c306 + uses: github/codeql-action/init@2a8cbadc02bb64a7fd15d37c977acbad02496c80 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@4c3e5362829f0b0bb62ff5f6c938d7f95574c306 + uses: github/codeql-action/analyze@2a8cbadc02bb64a7fd15d37c977acbad02496c80 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index ea6035c18..d7208454a 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@4c3e5362829f0b0bb62ff5f6c938d7f95574c306 + uses: github/codeql-action/init@2a8cbadc02bb64a7fd15d37c977acbad02496c80 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@4c3e5362829f0b0bb62ff5f6c938d7f95574c306 + uses: github/codeql-action/autobuild@2a8cbadc02bb64a7fd15d37c977acbad02496c80 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@4c3e5362829f0b0bb62ff5f6c938d7f95574c306 + uses: github/codeql-action/analyze@2a8cbadc02bb64a7fd15d37c977acbad02496c80 From a7828e73a8f2e30f71bd2d9d4da180b2fa436424 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 23 Apr 2025 22:47:18 +0000 Subject: [PATCH 098/391] chore(deps): update github/codeql-action digest to 4ffa236 (#1425) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index cc7b5f3f7..40829322f 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@2a8cbadc02bb64a7fd15d37c977acbad02496c80 + uses: github/codeql-action/init@4ffa2364a07d4fa8656211f550f36d44e8148dae with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@2a8cbadc02bb64a7fd15d37c977acbad02496c80 + uses: github/codeql-action/analyze@4ffa2364a07d4fa8656211f550f36d44e8148dae diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index d7208454a..79ceaa6f6 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@2a8cbadc02bb64a7fd15d37c977acbad02496c80 + uses: github/codeql-action/init@4ffa2364a07d4fa8656211f550f36d44e8148dae with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@2a8cbadc02bb64a7fd15d37c977acbad02496c80 + uses: github/codeql-action/autobuild@4ffa2364a07d4fa8656211f550f36d44e8148dae - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@2a8cbadc02bb64a7fd15d37c977acbad02496c80 + uses: github/codeql-action/analyze@4ffa2364a07d4fa8656211f550f36d44e8148dae From 844374a42b94deffab6856e978766354a6f46576 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 24 Apr 2025 15:19:34 +0000 Subject: [PATCH 099/391] chore(deps): update io.cucumber.version to v7.22.1 (#1426) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3a81fc2b6..8a099a515 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ 1.8 ${maven.compiler.source} 5.12.2 - 7.22.0 + 7.22.1 5.17.0 **/e2e/*.java From 1c4d2efafdebb562f099ba1ec3a6a29eabc8ff91 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 24 Apr 2025 18:19:32 +0000 Subject: [PATCH 100/391] fix(deps): update dependency io.cucumber:cucumber-bom to v7.22.1 (#1427) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8a099a515..e93e07584 100644 --- a/pom.xml +++ b/pom.xml @@ -204,7 +204,7 @@ io.cucumber cucumber-bom - 7.22.0 + 7.22.1 pom import From 014f8a59da8f1e976e440ed1ea17e85561f98e2d Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Thu, 24 Apr 2025 19:32:45 -0400 Subject: [PATCH 101/391] chore: use PAT for release please Signed-off-by: Todd Baert --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e9b6c7641..ba5298e21 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: - uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee id: release with: - token: ${{secrets.GITHUB_TOKEN}} + token: ${{secrets.RELEASE_PLEASE_ACTION_TOKEN}} target-branch: main # These steps are only run if this was a merged release-please PR From 45ec4b1b7734c9117f43abf8fe5105c2903c3986 Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Thu, 24 Apr 2025 20:58:47 -0400 Subject: [PATCH 102/391] chore: add DCO to release please Signed-off-by: Todd Baert --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ba5298e21..15217bf4e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,7 @@ jobs: with: token: ${{secrets.RELEASE_PLEASE_ACTION_TOKEN}} target-branch: main + signoff: "OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com>" # These steps are only run if this was a merged release-please PR - name: checkout From 32137bfa82e9c0391c999bf0be2a36f201620931 Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Thu, 24 Apr 2025 21:14:07 -0400 Subject: [PATCH 103/391] chore: add DCO to release please (#1429) * chore: add DCO to release please Signed-off-by: Todd Baert * Update release-please-config.json Signed-off-by: Todd Baert --------- Signed-off-by: Todd Baert --- .github/workflows/release.yml | 1 - release-please-config.json | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 15217bf4e..ba5298e21 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,6 @@ jobs: with: token: ${{secrets.RELEASE_PLEASE_ACTION_TOKEN}} target-branch: main - signoff: "OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com>" # These steps are only run if this was a merged release-please PR - name: checkout diff --git a/release-please-config.json b/release-please-config.json index ad00d89a5..f1b6ee6bf 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1,5 +1,6 @@ { "bootstrap-sha": "c701a6c4ebbe1170a25ca7636a31508b9628831c", + "signoff": "OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com>", "packages": { ".": { "package-name": "dev.openfeature.sdk", From 1cc851b293008a8dd273e904e4c77a650ad71146 Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Thu, 24 Apr 2025 21:41:37 -0400 Subject: [PATCH 104/391] chore: update release please action (#1430) Signed-off-by: Todd Baert --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ba5298e21..41d308de1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,11 +20,10 @@ jobs: # Release-please creates a PR that tracks all changes steps: - - uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee + - uses: googleapis/release-please-action@v4 id: release with: token: ${{secrets.RELEASE_PLEASE_ACTION_TOKEN}} - target-branch: main # These steps are only run if this was a merged release-please PR - name: checkout From 99faaf88aa07bd45fc473db5bafce3b8eafaf9e0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 25 Apr 2025 22:07:09 +0000 Subject: [PATCH 105/391] chore(deps): update github/codeql-action digest to f843d94 (#1432) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 40829322f..f1fcdc0b3 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@4ffa2364a07d4fa8656211f550f36d44e8148dae + uses: github/codeql-action/init@f843d94177a3bba7c0d0366e9bb9ff7de65547a9 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@4ffa2364a07d4fa8656211f550f36d44e8148dae + uses: github/codeql-action/analyze@f843d94177a3bba7c0d0366e9bb9ff7de65547a9 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 79ceaa6f6..62b6fc929 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@4ffa2364a07d4fa8656211f550f36d44e8148dae + uses: github/codeql-action/init@f843d94177a3bba7c0d0366e9bb9ff7de65547a9 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@4ffa2364a07d4fa8656211f550f36d44e8148dae + uses: github/codeql-action/autobuild@f843d94177a3bba7c0d0366e9bb9ff7de65547a9 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@4ffa2364a07d4fa8656211f550f36d44e8148dae + uses: github/codeql-action/analyze@f843d94177a3bba7c0d0366e9bb9ff7de65547a9 From 96cf9c7f5463e4e0de394117845aebdd9a69425f Mon Sep 17 00:00:00 2001 From: Abhay Porwal Date: Mon, 28 Apr 2025 18:04:19 +0530 Subject: [PATCH 106/391] docs: add try-catch example for setProviderAndWait usage (#1433) * added the detailed instructions for the setProviderAndWait Signed-off-by: Abhay * fixup: checkstyle issues Signed-off-by: Simon Schrottner --------- Signed-off-by: Abhay Signed-off-by: Simon Schrottner Co-authored-by: Abhay Co-authored-by: Simon Schrottner --- README.md | 14 ++++++++++++-- .../java/dev/openfeature/sdk/OpenFeatureAPI.java | 12 +++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 22d85bd2d..429d2ae44 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,12 @@ public void example(){ // configure a provider OpenFeatureAPI api = OpenFeatureAPI.getInstance(); - api.setProviderAndWait(new InMemoryProvider(myFlags)); + try { + api.setProviderAndWait(new InMemoryProvider(myFlags)); + } catch (Exception e) { + // handle initialization failure + e.printStackTrace(); + } // create a client Client client = api.getClient(); @@ -149,7 +154,12 @@ To register a provider in a blocking manner to ensure it is ready before further ```java OpenFeatureAPI api = OpenFeatureAPI.getInstance(); - api.setProviderAndWait(new MyProvider()); + try { + api.setProviderAndWait(new MyProvider()); + } catch (Exception e) { + // handle initialization failure + e.printStackTrace(); + } ``` #### Asynchronous diff --git a/src/main/java/dev/openfeature/sdk/OpenFeatureAPI.java b/src/main/java/dev/openfeature/sdk/OpenFeatureAPI.java index bd60cc78a..66d40736f 100644 --- a/src/main/java/dev/openfeature/sdk/OpenFeatureAPI.java +++ b/src/main/java/dev/openfeature/sdk/OpenFeatureAPI.java @@ -207,7 +207,13 @@ public void setProvider(String domain, FeatureProvider provider) { } /** - * Set the default provider and wait for initialization to finish. + * Sets the default provider and waits for its initialization to complete. + * + *

Note: If the provider fails during initialization, an {@link OpenFeatureError} will be thrown. + * It is recommended to wrap this call in a try-catch block to handle potential initialization failures gracefully. + * + * @param provider the {@link FeatureProvider} to set as the default. + * @throws OpenFeatureError if the provider fails during initialization. */ public void setProviderAndWait(FeatureProvider provider) throws OpenFeatureError { try (AutoCloseableLock __ = lock.writeLockAutoCloseable()) { @@ -224,8 +230,12 @@ public void setProviderAndWait(FeatureProvider provider) throws OpenFeatureError /** * Add a provider for a domain and wait for initialization to finish. * + *

Note: If the provider fails during initialization, an {@link OpenFeatureError} will be thrown. + * It is recommended to wrap this call in a try-catch block to handle potential initialization failures gracefully. + * * @param domain The domain to bind the provider to. * @param provider The provider to set. + * @throws OpenFeatureError if the provider fails during initialization. */ public void setProviderAndWait(String domain, FeatureProvider provider) throws OpenFeatureError { try (AutoCloseableLock __ = lock.writeLockAutoCloseable()) { From 62ba6db457358d759fe83f23318b1cf4200756ac Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 20:32:23 +0000 Subject: [PATCH 107/391] chore(deps): update amannn/action-semantic-pull-request digest to 3352882 (#1434) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/lint-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml index 1b909c15e..50c295b5d 100644 --- a/.github/workflows/lint-pr.yml +++ b/.github/workflows/lint-pr.yml @@ -18,6 +18,6 @@ jobs: name: Validate PR title runs-on: ubuntu-latest steps: - - uses: amannn/action-semantic-pull-request@04501d43b574e4c1d23c629ffe4dcec27acfdeff + - uses: amannn/action-semantic-pull-request@335288255954904a41ddda8947c8f2c844b8bfeb env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 7e74f2aa3ad2dc8f7a3e4ad398e7705b3e3db364 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 02:56:28 +0000 Subject: [PATCH 108/391] chore(deps): update github/codeql-action digest to 83605b3 (#1435) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index f1fcdc0b3..08abd2556 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@f843d94177a3bba7c0d0366e9bb9ff7de65547a9 + uses: github/codeql-action/init@83605b3ce2a0e9ed794fb5c17e77a82069816b16 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@f843d94177a3bba7c0d0366e9bb9ff7de65547a9 + uses: github/codeql-action/analyze@83605b3ce2a0e9ed794fb5c17e77a82069816b16 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 62b6fc929..17d29aca5 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@f843d94177a3bba7c0d0366e9bb9ff7de65547a9 + uses: github/codeql-action/init@83605b3ce2a0e9ed794fb5c17e77a82069816b16 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@f843d94177a3bba7c0d0366e9bb9ff7de65547a9 + uses: github/codeql-action/autobuild@83605b3ce2a0e9ed794fb5c17e77a82069816b16 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@f843d94177a3bba7c0d0366e9bb9ff7de65547a9 + uses: github/codeql-action/analyze@83605b3ce2a0e9ed794fb5c17e77a82069816b16 From b09e88798fed529161c61b96c20a8f257d355d3c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 19:28:15 +0000 Subject: [PATCH 109/391] chore(deps): update github/codeql-action digest to ed51cb5 (#1436) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 08abd2556..097079202 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@83605b3ce2a0e9ed794fb5c17e77a82069816b16 + uses: github/codeql-action/init@ed51cb5abd90d0e898e492d5e3f24423da71c2fb with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@83605b3ce2a0e9ed794fb5c17e77a82069816b16 + uses: github/codeql-action/analyze@ed51cb5abd90d0e898e492d5e3f24423da71c2fb diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 17d29aca5..fd88af888 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@83605b3ce2a0e9ed794fb5c17e77a82069816b16 + uses: github/codeql-action/init@ed51cb5abd90d0e898e492d5e3f24423da71c2fb with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@83605b3ce2a0e9ed794fb5c17e77a82069816b16 + uses: github/codeql-action/autobuild@ed51cb5abd90d0e898e492d5e3f24423da71c2fb - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@83605b3ce2a0e9ed794fb5c17e77a82069816b16 + uses: github/codeql-action/analyze@ed51cb5abd90d0e898e492d5e3f24423da71c2fb From f965cbcb37d20724e15b76c15842a88574810b1a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 30 Apr 2025 23:46:35 +0000 Subject: [PATCH 110/391] chore(deps): update github/codeql-action digest to 40e16ed (#1437) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 097079202..c64e4df18 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@ed51cb5abd90d0e898e492d5e3f24423da71c2fb + uses: github/codeql-action/init@40e16edda1c08370bd06454cc0d3b0d4270d7c75 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ed51cb5abd90d0e898e492d5e3f24423da71c2fb + uses: github/codeql-action/analyze@40e16edda1c08370bd06454cc0d3b0d4270d7c75 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index fd88af888..f469e8fbc 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@ed51cb5abd90d0e898e492d5e3f24423da71c2fb + uses: github/codeql-action/init@40e16edda1c08370bd06454cc0d3b0d4270d7c75 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@ed51cb5abd90d0e898e492d5e3f24423da71c2fb + uses: github/codeql-action/autobuild@40e16edda1c08370bd06454cc0d3b0d4270d7c75 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ed51cb5abd90d0e898e492d5e3f24423da71c2fb + uses: github/codeql-action/analyze@40e16edda1c08370bd06454cc0d3b0d4270d7c75 From 85b200a08b9f8a71de3b5a19eaa057ec04e0801e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 1 May 2025 18:38:45 +0000 Subject: [PATCH 111/391] chore(deps): update github/codeql-action digest to 97a2bfd (#1438) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index c64e4df18..6807936af 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@40e16edda1c08370bd06454cc0d3b0d4270d7c75 + uses: github/codeql-action/init@97a2bfd2a3d26d458da69e548f7f859d6fca634d with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@40e16edda1c08370bd06454cc0d3b0d4270d7c75 + uses: github/codeql-action/analyze@97a2bfd2a3d26d458da69e548f7f859d6fca634d diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index f469e8fbc..d278a519d 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@40e16edda1c08370bd06454cc0d3b0d4270d7c75 + uses: github/codeql-action/init@97a2bfd2a3d26d458da69e548f7f859d6fca634d with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@40e16edda1c08370bd06454cc0d3b0d4270d7c75 + uses: github/codeql-action/autobuild@97a2bfd2a3d26d458da69e548f7f859d6fca634d - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@40e16edda1c08370bd06454cc0d3b0d4270d7c75 + uses: github/codeql-action/analyze@97a2bfd2a3d26d458da69e548f7f859d6fca634d From f2348ea370412351389c60eef390f36edbea68b0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 2 May 2025 18:13:36 +0000 Subject: [PATCH 112/391] chore(deps): update github/codeql-action digest to 5eb3ed6 (#1439) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 6807936af..74c7fc822 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@97a2bfd2a3d26d458da69e548f7f859d6fca634d + uses: github/codeql-action/init@5eb3ed6614230b1931d5c08df9e096e4ba524f21 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@97a2bfd2a3d26d458da69e548f7f859d6fca634d + uses: github/codeql-action/analyze@5eb3ed6614230b1931d5c08df9e096e4ba524f21 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index d278a519d..9dee17eec 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@97a2bfd2a3d26d458da69e548f7f859d6fca634d + uses: github/codeql-action/init@5eb3ed6614230b1931d5c08df9e096e4ba524f21 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@97a2bfd2a3d26d458da69e548f7f859d6fca634d + uses: github/codeql-action/autobuild@5eb3ed6614230b1931d5c08df9e096e4ba524f21 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@97a2bfd2a3d26d458da69e548f7f859d6fca634d + uses: github/codeql-action/analyze@5eb3ed6614230b1931d5c08df9e096e4ba524f21 From 4dc988b637a9e9c377edf7df7b29bf6407319f16 Mon Sep 17 00:00:00 2001 From: jarebudev <23311805+jarebudev@users.noreply.github.com> Date: Mon, 5 May 2025 10:30:23 +0100 Subject: [PATCH 113/391] feat!: Raise required Java version to 11 (#1393) * bumped to java 11, altered CI to target java 11 Signed-off-by: jarebudev <23311805+jarebudev@users.noreply.github.com> * changed profile and toolchain Signed-off-by: jarebudev <23311805+jarebudev@users.noreply.github.com> * corrected toolchain version Signed-off-by: jarebudev <23311805+jarebudev@users.noreply.github.com> --------- Signed-off-by: jarebudev <23311805+jarebudev@users.noreply.github.com> Co-authored-by: Simon Schrottner --- .github/workflows/pullrequest.yml | 6 +++--- README.md | 2 +- pom.xml | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 74c7fc822..36989fde1 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -13,15 +13,15 @@ jobs: build: - java: 17 profile: codequality - - java: 8 - profile: java8 + - java: 11 + profile: java11 name: with Java ${{ matrix.build.java }} runs-on: ${{ matrix.os}} steps: - name: Check out the code uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 - - name: Set up JDK 8 + - name: Set up JDK 11 uses: actions/setup-java@f4f1212c880fdec8162ea9a6493f4495191887b4 with: java-version: ${{ matrix.build.java }} diff --git a/README.md b/README.md index 429d2ae44..09f9683eb 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ ### Requirements -- Java 8+ (compiler target is 1.8) +- Java 11+ (compiler target is 11) Note that this library is intended to be used in server-side contexts and has not been evaluated for use on mobile devices. diff --git a/pom.xml b/pom.xml index e93e07584..239aa420e 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ [17,) UTF-8 - 1.8 + 11 ${maven.compiler.source} 5.12.2 7.22.1 @@ -20,7 +20,7 @@ ${project.groupId}.${project.artifactId} false - 8 + 11 OpenFeature Java SDK @@ -646,14 +646,14 @@ - - + + - java8 + java11 - (1.8,9) + [11,) true From 34035105154b7945c02de2a88fe83eb2414526ef Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 6 May 2025 06:19:41 +0000 Subject: [PATCH 114/391] chore(deps): update dependency com.puppycrawl.tools:checkstyle to v10 (#103) * chore(deps): update dependency com.puppycrawl.tools:checkstyle to v10 * Fix javadoc format Signed-off-by: christian.lutnik --------- Signed-off-by: christian.lutnik Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: christian.lutnik Co-authored-by: Simon Schrottner --- pom.xml | 2 +- src/main/java/dev/openfeature/sdk/FeatureProvider.java | 2 ++ .../java/dev/openfeature/sdk/TransactionContextPropagator.java | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 239aa420e..585533ada 100644 --- a/pom.xml +++ b/pom.xml @@ -457,7 +457,7 @@ com.puppycrawl.tools checkstyle - 9.3 + 10.23.1 diff --git a/src/main/java/dev/openfeature/sdk/FeatureProvider.java b/src/main/java/dev/openfeature/sdk/FeatureProvider.java index 4c630cb80..22819ef10 100644 --- a/src/main/java/dev/openfeature/sdk/FeatureProvider.java +++ b/src/main/java/dev/openfeature/sdk/FeatureProvider.java @@ -30,6 +30,7 @@ default List getProviderHooks() { * can overwrite this method, * if they have special initialization needed prior being called for flag * evaluation. + * *

* It is ok if the method is expensive as it is executed in the background. All * runtime exceptions will be @@ -45,6 +46,7 @@ default void initialize(EvaluationContext evaluationContext) throws Exception { * flags, or the SDK is shut down. * Providers can overwrite this method, if they have special shutdown actions * needed. + * *

* It is ok if the method is expensive as it is executed in the background. All * runtime exceptions will be diff --git a/src/main/java/dev/openfeature/sdk/TransactionContextPropagator.java b/src/main/java/dev/openfeature/sdk/TransactionContextPropagator.java index 05f7d3eb8..9e2718787 100644 --- a/src/main/java/dev/openfeature/sdk/TransactionContextPropagator.java +++ b/src/main/java/dev/openfeature/sdk/TransactionContextPropagator.java @@ -5,6 +5,7 @@ * for the duration of a single transaction. * Examples of potential transaction specific context include: a user id, user agent, IP. * Transaction context is merged with evaluation context prior to flag evaluation. + * *

* The precedence of merging context can be seen in * the specification. From 78657ee79efdc94018387cdf8263a73d4abf7191 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 8 May 2025 03:06:04 +0000 Subject: [PATCH 115/391] chore(deps): update dependency com.tngtech.archunit:archunit-junit5 to v1.4.1 (#1440) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 585533ada..16d72688a 100644 --- a/pom.xml +++ b/pom.xml @@ -76,7 +76,7 @@ com.tngtech.archunit archunit-junit5 - 1.4.0 + 1.4.1 test From 58454b4eaabfd3327f7ceaff4bf335a5a839ed41 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 12 May 2025 09:01:29 +0200 Subject: [PATCH 116/391] chore(deps): update io.cucumber.version to v7.22.2 (#1441) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 16d72688a..a1093bffe 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ 11 ${maven.compiler.source} 5.12.2 - 7.22.1 + 7.22.2 5.17.0 **/e2e/*.java From e568f3a4f560187586d5473aa7bc12a673340e24 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 12 May 2025 07:07:53 +0000 Subject: [PATCH 117/391] fix(deps): update dependency io.cucumber:cucumber-bom to v7.22.2 (#1442) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a1093bffe..1d4fb6f73 100644 --- a/pom.xml +++ b/pom.xml @@ -204,7 +204,7 @@ io.cucumber cucumber-bom - 7.22.1 + 7.22.2 pom import From d0ae5482771f4d1701bce25381cdf4e92e2d4882 Mon Sep 17 00:00:00 2001 From: Liran M <77168114+liran2000@users.noreply.github.com> Date: Tue, 13 May 2025 10:45:16 +0300 Subject: [PATCH 118/391] feat: add telemetry helper utils (#1346) * feat: add telemetry helper utils Signed-off-by: liran2000 * updates Signed-off-by: liran2000 * fixup: apply changes according to the semconv The semconv has changed, and some attributes have been renamed. Furthermore, the body usage is deprecated and should be part of the attributes. see: https://github.com/open-telemetry/semantic-conventions/pull/1990/ Signed-off-by: Simon Schrottner * fixup: fix tests Signed-off-by: Simon Schrottner * fixup: fix spotless Signed-off-by: Simon Schrottner --------- Signed-off-by: liran2000 Signed-off-by: Simon Schrottner Co-authored-by: Simon Schrottner --- .../dev/openfeature/sdk/EvaluationEvent.java | 24 ++ .../java/dev/openfeature/sdk/Telemetry.java | 95 +++++++ .../dev/openfeature/sdk/TelemetryTest.java | 231 ++++++++++++++++++ 3 files changed, 350 insertions(+) create mode 100644 src/main/java/dev/openfeature/sdk/EvaluationEvent.java create mode 100644 src/main/java/dev/openfeature/sdk/Telemetry.java create mode 100644 src/test/java/dev/openfeature/sdk/TelemetryTest.java diff --git a/src/main/java/dev/openfeature/sdk/EvaluationEvent.java b/src/main/java/dev/openfeature/sdk/EvaluationEvent.java new file mode 100644 index 000000000..f92e24d5a --- /dev/null +++ b/src/main/java/dev/openfeature/sdk/EvaluationEvent.java @@ -0,0 +1,24 @@ +package dev.openfeature.sdk; + +import java.util.HashMap; +import java.util.Map; +import lombok.Builder; +import lombok.Getter; +import lombok.Singular; + +/** + * Represents an evaluation event. + */ +@Builder +@Getter +public class EvaluationEvent { + + private String name; + + @Singular("attribute") + private Map attributes; + + public Map getAttributes() { + return new HashMap<>(attributes); + } +} diff --git a/src/main/java/dev/openfeature/sdk/Telemetry.java b/src/main/java/dev/openfeature/sdk/Telemetry.java new file mode 100644 index 000000000..7e94983ee --- /dev/null +++ b/src/main/java/dev/openfeature/sdk/Telemetry.java @@ -0,0 +1,95 @@ +package dev.openfeature.sdk; + +/** + * The Telemetry class provides constants and methods for creating OpenTelemetry compliant + * evaluation events. + */ +public class Telemetry { + + private Telemetry() {} + + /* + The OpenTelemetry compliant event attributes for flag evaluation. + Specification: https://opentelemetry.io/docs/specs/semconv/feature-flags/feature-flags-logs/ + */ + public static final String TELEMETRY_KEY = "feature_flag.key"; + public static final String TELEMETRY_ERROR_CODE = "error.type"; + public static final String TELEMETRY_VARIANT = "feature_flag.result.variant"; + public static final String TELEMETRY_VALUE = "feature_flag.result.value"; + public static final String TELEMETRY_CONTEXT_ID = "feature_flag.context.id"; + public static final String TELEMETRY_ERROR_MSG = "feature_flag.evaluation.error.message"; + public static final String TELEMETRY_REASON = "feature_flag.result.reason"; + public static final String TELEMETRY_PROVIDER = "feature_flag.provider.name"; + public static final String TELEMETRY_FLAG_SET_ID = "feature_flag.set.id"; + public static final String TELEMETRY_VERSION = "feature_flag.version"; + + // Well-known flag metadata attributes for telemetry events. + // Specification: https://openfeature.dev/specification/appendix-d#flag-metadata + public static final String TELEMETRY_FLAG_META_CONTEXT_ID = "contextId"; + public static final String TELEMETRY_FLAG_META_FLAG_SET_ID = "flagSetId"; + public static final String TELEMETRY_FLAG_META_VERSION = "version"; + + public static final String FLAG_EVALUATION_EVENT_NAME = "feature_flag.evaluation"; + + /** + * Creates an EvaluationEvent using the provided HookContext and ProviderEvaluation. + * + * @param hookContext the context containing flag evaluation details + * @param evaluationDetails the evaluation result from the provider + * + * @return an EvaluationEvent populated with telemetry data + */ + public static EvaluationEvent createEvaluationEvent( + HookContext hookContext, FlagEvaluationDetails evaluationDetails) { + EvaluationEvent.EvaluationEventBuilder evaluationEventBuilder = EvaluationEvent.builder() + .name(FLAG_EVALUATION_EVENT_NAME) + .attribute(TELEMETRY_KEY, hookContext.getFlagKey()) + .attribute(TELEMETRY_PROVIDER, hookContext.getProviderMetadata().getName()); + + if (evaluationDetails.getReason() != null) { + evaluationEventBuilder.attribute( + TELEMETRY_REASON, evaluationDetails.getReason().toLowerCase()); + } else { + evaluationEventBuilder.attribute( + TELEMETRY_REASON, Reason.UNKNOWN.name().toLowerCase()); + } + + if (evaluationDetails.getVariant() != null) { + evaluationEventBuilder.attribute(TELEMETRY_VARIANT, evaluationDetails.getVariant()); + } else { + evaluationEventBuilder.attribute(TELEMETRY_VALUE, evaluationDetails.getValue()); + } + + String contextId = evaluationDetails.getFlagMetadata().getString(TELEMETRY_FLAG_META_CONTEXT_ID); + if (contextId != null) { + evaluationEventBuilder.attribute(TELEMETRY_CONTEXT_ID, contextId); + } else { + evaluationEventBuilder.attribute( + TELEMETRY_CONTEXT_ID, hookContext.getCtx().getTargetingKey()); + } + + String setID = evaluationDetails.getFlagMetadata().getString(TELEMETRY_FLAG_META_FLAG_SET_ID); + if (setID != null) { + evaluationEventBuilder.attribute(TELEMETRY_FLAG_SET_ID, setID); + } + + String version = evaluationDetails.getFlagMetadata().getString(TELEMETRY_FLAG_META_VERSION); + if (version != null) { + evaluationEventBuilder.attribute(TELEMETRY_VERSION, version); + } + + if (Reason.ERROR.name().equals(evaluationDetails.getReason())) { + if (evaluationDetails.getErrorCode() != null) { + evaluationEventBuilder.attribute(TELEMETRY_ERROR_CODE, evaluationDetails.getErrorCode()); + } else { + evaluationEventBuilder.attribute(TELEMETRY_ERROR_CODE, ErrorCode.GENERAL); + } + + if (evaluationDetails.getErrorMessage() != null) { + evaluationEventBuilder.attribute(TELEMETRY_ERROR_MSG, evaluationDetails.getErrorMessage()); + } + } + + return evaluationEventBuilder.build(); + } +} diff --git a/src/test/java/dev/openfeature/sdk/TelemetryTest.java b/src/test/java/dev/openfeature/sdk/TelemetryTest.java new file mode 100644 index 000000000..2752683b8 --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/TelemetryTest.java @@ -0,0 +1,231 @@ +package dev.openfeature.sdk; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import org.junit.jupiter.api.Test; + +public class TelemetryTest { + + @Test + void testCreatesEvaluationEventWithMandatoryFields() { + // Arrange + String flagKey = "test-flag"; + String providerName = "test-provider"; + String reason = "static"; + + Metadata providerMetadata = mock(Metadata.class); + when(providerMetadata.getName()).thenReturn(providerName); + + HookContext hookContext = HookContext.builder() + .flagKey(flagKey) + .providerMetadata(providerMetadata) + .type(FlagValueType.BOOLEAN) + .defaultValue(false) + .ctx(new ImmutableContext()) + .build(); + + FlagEvaluationDetails evaluation = FlagEvaluationDetails.builder() + .reason(reason) + .value(true) + .build(); + + EvaluationEvent event = Telemetry.createEvaluationEvent(hookContext, evaluation); + + assertEquals(Telemetry.FLAG_EVALUATION_EVENT_NAME, event.getName()); + assertEquals(flagKey, event.getAttributes().get(Telemetry.TELEMETRY_KEY)); + assertEquals(providerName, event.getAttributes().get(Telemetry.TELEMETRY_PROVIDER)); + assertEquals(reason.toLowerCase(), event.getAttributes().get(Telemetry.TELEMETRY_REASON)); + } + + @Test + void testHandlesNullReason() { + // Arrange + String flagKey = "test-flag"; + String providerName = "test-provider"; + + Metadata providerMetadata = mock(Metadata.class); + when(providerMetadata.getName()).thenReturn(providerName); + + HookContext hookContext = HookContext.builder() + .flagKey(flagKey) + .providerMetadata(providerMetadata) + .type(FlagValueType.BOOLEAN) + .defaultValue(false) + .ctx(new ImmutableContext()) + .build(); + + FlagEvaluationDetails evaluation = FlagEvaluationDetails.builder() + .reason(null) + .value(true) + .build(); + + EvaluationEvent event = Telemetry.createEvaluationEvent(hookContext, evaluation); + + assertEquals(Reason.UNKNOWN.name().toLowerCase(), event.getAttributes().get(Telemetry.TELEMETRY_REASON)); + } + + @Test + void testSetsVariantAttributeWhenVariantExists() { + HookContext hookContext = HookContext.builder() + .flagKey("testFlag") + .type(FlagValueType.STRING) + .defaultValue("default") + .ctx(mock(EvaluationContext.class)) + .clientMetadata(mock(ClientMetadata.class)) + .providerMetadata(mock(Metadata.class)) + .build(); + + FlagEvaluationDetails providerEvaluation = FlagEvaluationDetails.builder() + .variant("testVariant") + .flagMetadata(ImmutableMetadata.builder().build()) + .build(); + + EvaluationEvent event = Telemetry.createEvaluationEvent(hookContext, providerEvaluation); + + assertEquals("testVariant", event.getAttributes().get(Telemetry.TELEMETRY_VARIANT)); + } + + @Test + void test_sets_value_in_body_when_variant_is_null() { + HookContext hookContext = HookContext.builder() + .flagKey("testFlag") + .type(FlagValueType.STRING) + .defaultValue("default") + .ctx(mock(EvaluationContext.class)) + .clientMetadata(mock(ClientMetadata.class)) + .providerMetadata(mock(Metadata.class)) + .build(); + + FlagEvaluationDetails providerEvaluation = FlagEvaluationDetails.builder() + .value("testValue") + .flagMetadata(ImmutableMetadata.builder().build()) + .build(); + + EvaluationEvent event = Telemetry.createEvaluationEvent(hookContext, providerEvaluation); + + assertEquals("testValue", event.getAttributes().get(Telemetry.TELEMETRY_VALUE)); + } + + @Test + void testAllFieldsPopulated() { + EvaluationContext evaluationContext = mock(EvaluationContext.class); + when(evaluationContext.getTargetingKey()).thenReturn("realTargetingKey"); + + Metadata providerMetadata = mock(Metadata.class); + when(providerMetadata.getName()).thenReturn("realProviderName"); + + HookContext hookContext = HookContext.builder() + .flagKey("realFlag") + .type(FlagValueType.STRING) + .defaultValue("realDefault") + .ctx(evaluationContext) + .clientMetadata(mock(ClientMetadata.class)) + .providerMetadata(providerMetadata) + .build(); + + FlagEvaluationDetails providerEvaluation = FlagEvaluationDetails.builder() + .flagMetadata(ImmutableMetadata.builder() + .addString("contextId", "realContextId") + .addString("flagSetId", "realFlagSetId") + .addString("version", "realVersion") + .build()) + .reason(Reason.DEFAULT.name()) + .variant("realVariant") + .build(); + + EvaluationEvent event = Telemetry.createEvaluationEvent(hookContext, providerEvaluation); + + assertEquals("realFlag", event.getAttributes().get(Telemetry.TELEMETRY_KEY)); + assertEquals("realProviderName", event.getAttributes().get(Telemetry.TELEMETRY_PROVIDER)); + assertEquals("default", event.getAttributes().get(Telemetry.TELEMETRY_REASON)); + assertEquals("realContextId", event.getAttributes().get(Telemetry.TELEMETRY_CONTEXT_ID)); + assertEquals("realFlagSetId", event.getAttributes().get(Telemetry.TELEMETRY_FLAG_SET_ID)); + assertEquals("realVersion", event.getAttributes().get(Telemetry.TELEMETRY_VERSION)); + assertNull(event.getAttributes().get(Telemetry.TELEMETRY_ERROR_CODE)); + assertEquals("realVariant", event.getAttributes().get(Telemetry.TELEMETRY_VARIANT)); + } + + @Test + void testErrorEvaluation() { + EvaluationContext evaluationContext = mock(EvaluationContext.class); + when(evaluationContext.getTargetingKey()).thenReturn("realTargetingKey"); + + Metadata providerMetadata = mock(Metadata.class); + when(providerMetadata.getName()).thenReturn("realProviderName"); + + HookContext hookContext = HookContext.builder() + .flagKey("realFlag") + .type(FlagValueType.STRING) + .defaultValue("realDefault") + .ctx(evaluationContext) + .clientMetadata(mock(ClientMetadata.class)) + .providerMetadata(providerMetadata) + .build(); + + FlagEvaluationDetails providerEvaluation = FlagEvaluationDetails.builder() + .flagMetadata(ImmutableMetadata.builder() + .addString("contextId", "realContextId") + .addString("flagSetId", "realFlagSetId") + .addString("version", "realVersion") + .build()) + .reason(Reason.ERROR.name()) + .errorMessage("realErrorMessage") + .build(); + + EvaluationEvent event = Telemetry.createEvaluationEvent(hookContext, providerEvaluation); + + assertEquals("realFlag", event.getAttributes().get(Telemetry.TELEMETRY_KEY)); + assertEquals("realProviderName", event.getAttributes().get(Telemetry.TELEMETRY_PROVIDER)); + assertEquals("error", event.getAttributes().get(Telemetry.TELEMETRY_REASON)); + assertEquals("realContextId", event.getAttributes().get(Telemetry.TELEMETRY_CONTEXT_ID)); + assertEquals("realFlagSetId", event.getAttributes().get(Telemetry.TELEMETRY_FLAG_SET_ID)); + assertEquals("realVersion", event.getAttributes().get(Telemetry.TELEMETRY_VERSION)); + assertEquals(ErrorCode.GENERAL, event.getAttributes().get(Telemetry.TELEMETRY_ERROR_CODE)); + assertEquals("realErrorMessage", event.getAttributes().get(Telemetry.TELEMETRY_ERROR_MSG)); + assertNull(event.getAttributes().get(Telemetry.TELEMETRY_VARIANT)); + } + + @Test + void testErrorCodeEvaluation() { + EvaluationContext evaluationContext = mock(EvaluationContext.class); + when(evaluationContext.getTargetingKey()).thenReturn("realTargetingKey"); + + Metadata providerMetadata = mock(Metadata.class); + when(providerMetadata.getName()).thenReturn("realProviderName"); + + HookContext hookContext = HookContext.builder() + .flagKey("realFlag") + .type(FlagValueType.STRING) + .defaultValue("realDefault") + .ctx(evaluationContext) + .clientMetadata(mock(ClientMetadata.class)) + .providerMetadata(providerMetadata) + .build(); + + FlagEvaluationDetails providerEvaluation = FlagEvaluationDetails.builder() + .flagMetadata(ImmutableMetadata.builder() + .addString("contextId", "realContextId") + .addString("flagSetId", "realFlagSetId") + .addString("version", "realVersion") + .build()) + .reason(Reason.ERROR.name()) + .errorMessage("realErrorMessage") + .errorCode(ErrorCode.INVALID_CONTEXT) + .build(); + + EvaluationEvent event = Telemetry.createEvaluationEvent(hookContext, providerEvaluation); + + assertEquals("realFlag", event.getAttributes().get(Telemetry.TELEMETRY_KEY)); + assertEquals("realProviderName", event.getAttributes().get(Telemetry.TELEMETRY_PROVIDER)); + assertEquals("error", event.getAttributes().get(Telemetry.TELEMETRY_REASON)); + assertEquals("realContextId", event.getAttributes().get(Telemetry.TELEMETRY_CONTEXT_ID)); + assertEquals("realFlagSetId", event.getAttributes().get(Telemetry.TELEMETRY_FLAG_SET_ID)); + assertEquals("realVersion", event.getAttributes().get(Telemetry.TELEMETRY_VERSION)); + assertEquals(ErrorCode.INVALID_CONTEXT, event.getAttributes().get(Telemetry.TELEMETRY_ERROR_CODE)); + assertEquals("realErrorMessage", event.getAttributes().get(Telemetry.TELEMETRY_ERROR_MSG)); + assertNull(event.getAttributes().get(Telemetry.TELEMETRY_VARIANT)); + } +} From 7182a7fc4197e70218e829971dae2cff09f948c9 Mon Sep 17 00:00:00 2001 From: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Date: Tue, 13 May 2025 12:38:55 -0400 Subject: [PATCH 119/391] chore(main): release 1.15.0 (#1431) Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 71 +++++++++++++++++++++++++++++++++++ README.md | 8 ++-- pom.xml | 2 +- version.txt | 2 +- 5 files changed, 78 insertions(+), 7 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 762e32db5..634797f5a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{".":"1.14.2"} +{".":"1.15.0"} diff --git a/CHANGELOG.md b/CHANGELOG.md index 914cbfef3..b18f9cc71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,76 @@ # Changelog +## [1.15.0](https://github.com/open-feature/java-sdk/compare/v1.14.2...v1.15.0) (2025-05-13) + + +### NOTABLE CHANGES + +* Raise required Java version to 11 ([#1393](https://github.com/open-feature/java-sdk/issues/1393)) + +### ๐Ÿ› Bug Fixes + +* **deps:** update dependency io.cucumber:cucumber-bom to v7.22.0 ([#1411](https://github.com/open-feature/java-sdk/issues/1411)) ([e251819](https://github.com/open-feature/java-sdk/commit/e25181982af8e5d37be4876b71b337ca86e8454b)) +* **deps:** update dependency io.cucumber:cucumber-bom to v7.22.1 ([#1427](https://github.com/open-feature/java-sdk/issues/1427)) ([1c4d2ef](https://github.com/open-feature/java-sdk/commit/1c4d2efafdebb562f099ba1ec3a6a29eabc8ff91)) +* **deps:** update dependency io.cucumber:cucumber-bom to v7.22.2 ([#1442](https://github.com/open-feature/java-sdk/issues/1442)) ([e568f3a](https://github.com/open-feature/java-sdk/commit/e568f3a4f560187586d5473aa7bc12a673340e24)) +* **deps:** update dependency org.projectlombok:lombok to v1.18.38 ([#1403](https://github.com/open-feature/java-sdk/issues/1403)) ([ef32f11](https://github.com/open-feature/java-sdk/commit/ef32f11571de4d3a981efec4f61113eb8b0d7d9d)) +* **deps:** update junit5 monorepo ([#1418](https://github.com/open-feature/java-sdk/issues/1418)) ([97b442e](https://github.com/open-feature/java-sdk/commit/97b442ed6e8f2b99ca949ffd63e5cbf57718c796)) + + +### โœจ New Features + +* add telemetry helper utils ([#1346](https://github.com/open-feature/java-sdk/issues/1346)) ([d0ae548](https://github.com/open-feature/java-sdk/commit/d0ae5482771f4d1701bce25381cdf4e92e2d4882)) +* Raise required Java version to 11 ([#1393](https://github.com/open-feature/java-sdk/issues/1393)) ([4dc988b](https://github.com/open-feature/java-sdk/commit/4dc988b637a9e9c377edf7df7b29bf6407319f16)) + + +### ๐Ÿงน Chore + +* add DCO to release please ([45ec4b1](https://github.com/open-feature/java-sdk/commit/45ec4b1b7734c9117f43abf8fe5105c2903c3986)) +* add DCO to release please ([#1429](https://github.com/open-feature/java-sdk/issues/1429)) ([32137bf](https://github.com/open-feature/java-sdk/commit/32137bfa82e9c0391c999bf0be2a36f201620931)) +* add publish env ([#1420](https://github.com/open-feature/java-sdk/issues/1420)) ([665dd51](https://github.com/open-feature/java-sdk/commit/665dd51eb2b3b79d3ffccb6cef64d544aa5e7206)) +* **deps:** update actions/setup-java digest to 148017a ([#1404](https://github.com/open-feature/java-sdk/issues/1404)) ([f834e11](https://github.com/open-feature/java-sdk/commit/f834e11acc7ecf903e972d80e9dab324be97847e)) +* **deps:** update actions/setup-java digest to c5195ef ([#1415](https://github.com/open-feature/java-sdk/issues/1415)) ([a578903](https://github.com/open-feature/java-sdk/commit/a5789038acc36cb2b0ddf12e534a1317e1c9b8e8)) +* **deps:** update actions/setup-java digest to f4f1212 ([#1421](https://github.com/open-feature/java-sdk/issues/1421)) ([a3e2a59](https://github.com/open-feature/java-sdk/commit/a3e2a59aebee051ae8c7eb1c5769a04dc9da8de3)) +* **deps:** update amannn/action-semantic-pull-request digest to 3352882 ([#1434](https://github.com/open-feature/java-sdk/issues/1434)) ([62ba6db](https://github.com/open-feature/java-sdk/commit/62ba6db457358d759fe83f23318b1cf4200756ac)) +* **deps:** update codecov/codecov-action action to v5.4.2 ([#1419](https://github.com/open-feature/java-sdk/issues/1419)) ([a6389e8](https://github.com/open-feature/java-sdk/commit/a6389e89f60aa7f4871f47d78fedd27a7f9991b4)) +* **deps:** update dependency com.diffplug.spotless:spotless-maven-plugin to v2.44.4 ([#1414](https://github.com/open-feature/java-sdk/issues/1414)) ([e066d3f](https://github.com/open-feature/java-sdk/commit/e066d3f749c09bb1ef79e3bcace1d205a39787df)) +* **deps:** update dependency com.h3xstream.findsecbugs:findsecbugs-plugin to v1.14.0 ([#1422](https://github.com/open-feature/java-sdk/issues/1422)) ([495da27](https://github.com/open-feature/java-sdk/commit/495da271bee976a942973cd23012f60db895bf24)) +* **deps:** update dependency com.puppycrawl.tools:checkstyle to v10 ([#103](https://github.com/open-feature/java-sdk/issues/103)) ([3403510](https://github.com/open-feature/java-sdk/commit/34035105154b7945c02de2a88fe83eb2414526ef)) +* **deps:** update dependency com.tngtech.archunit:archunit-junit5 to v1.4.1 ([#1440](https://github.com/open-feature/java-sdk/issues/1440)) ([78657ee](https://github.com/open-feature/java-sdk/commit/78657ee79efdc94018387cdf8263a73d4abf7191)) +* **deps:** update dependency net.bytebuddy:byte-buddy to v1.17.5 ([#1400](https://github.com/open-feature/java-sdk/issues/1400)) ([1f2d071](https://github.com/open-feature/java-sdk/commit/1f2d0715087ebd4554826d8552b250e4b8b950c8)) +* **deps:** update dependency net.bytebuddy:byte-buddy-agent to v1.17.5 ([#1401](https://github.com/open-feature/java-sdk/issues/1401)) ([07301bd](https://github.com/open-feature/java-sdk/commit/07301bda3f5b65550eff1e025fc9c0bec3c25275)) +* **deps:** update dependency org.apache.maven.plugins:maven-failsafe-plugin to v3.5.3 ([#1398](https://github.com/open-feature/java-sdk/issues/1398)) ([1fcf0e7](https://github.com/open-feature/java-sdk/commit/1fcf0e77d956c88c54e10942d96d2afd4d79315c)) +* **deps:** update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.5.3 ([#1399](https://github.com/open-feature/java-sdk/issues/1399)) ([d6ebc16](https://github.com/open-feature/java-sdk/commit/d6ebc161a93ad703e25592abdb0bf0fd9e281bbc)) +* **deps:** update dependency org.jacoco:jacoco-maven-plugin to v0.8.13 ([#1407](https://github.com/open-feature/java-sdk/issues/1407)) ([e19ccaa](https://github.com/open-feature/java-sdk/commit/e19ccaa35d9ac4d89d72ea58a70d416d202078db)) +* **deps:** update dependency org.mockito:mockito-core to v5.17.0 ([#1409](https://github.com/open-feature/java-sdk/issues/1409)) ([345cdcf](https://github.com/open-feature/java-sdk/commit/345cdcfa10da64c61d769746f335f38ac564e9ad)) +* **deps:** update github/codeql-action digest to 2a8cbad ([#1423](https://github.com/open-feature/java-sdk/issues/1423)) ([6b6849f](https://github.com/open-feature/java-sdk/commit/6b6849f3a3ee8a7b66d859c8e522bc101d1ccd44)) +* **deps:** update github/codeql-action digest to 362ef4c ([#1408](https://github.com/open-feature/java-sdk/issues/1408)) ([ca160ca](https://github.com/open-feature/java-sdk/commit/ca160cab7ccd71527e06a0851502353ac50b8d0d)) +* **deps:** update github/codeql-action digest to 40e16ed ([#1437](https://github.com/open-feature/java-sdk/issues/1437)) ([f965cbc](https://github.com/open-feature/java-sdk/commit/f965cbcb37d20724e15b76c15842a88574810b1a)) +* **deps:** update github/codeql-action digest to 4c3e536 ([#1417](https://github.com/open-feature/java-sdk/issues/1417)) ([0c77c84](https://github.com/open-feature/java-sdk/commit/0c77c8446032eaac7e068d48901e1423c21db326)) +* **deps:** update github/codeql-action digest to 4ffa236 ([#1425](https://github.com/open-feature/java-sdk/issues/1425)) ([a7828e7](https://github.com/open-feature/java-sdk/commit/a7828e73a8f2e30f71bd2d9d4da180b2fa436424)) +* **deps:** update github/codeql-action digest to 56dd02f ([#1416](https://github.com/open-feature/java-sdk/issues/1416)) ([4607c62](https://github.com/open-feature/java-sdk/commit/4607c62f15f7ee572207b8ec012ad4b3626e0184)) +* **deps:** update github/codeql-action digest to 5eb3ed6 ([#1439](https://github.com/open-feature/java-sdk/issues/1439)) ([f2348ea](https://github.com/open-feature/java-sdk/commit/f2348ea370412351389c60eef390f36edbea68b0)) +* **deps:** update github/codeql-action digest to 83605b3 ([#1435](https://github.com/open-feature/java-sdk/issues/1435)) ([7e74f2a](https://github.com/open-feature/java-sdk/commit/7e74f2aa3ad2dc8f7a3e4ad398e7705b3e3db364)) +* **deps:** update github/codeql-action digest to 97a2bfd ([#1438](https://github.com/open-feature/java-sdk/issues/1438)) ([85b200a](https://github.com/open-feature/java-sdk/commit/85b200a08b9f8a71de3b5a19eaa057ec04e0801e)) +* **deps:** update github/codeql-action digest to 9bd18b4 ([#1394](https://github.com/open-feature/java-sdk/issues/1394)) ([d7b591c](https://github.com/open-feature/java-sdk/commit/d7b591c9f910afad303d6d814f65c7f9dab33b89)) +* **deps:** update github/codeql-action digest to 9f45e74 ([#1396](https://github.com/open-feature/java-sdk/issues/1396)) ([37d76be](https://github.com/open-feature/java-sdk/commit/37d76be697e83f524250a82b2a67cdb4a953d7bc)) +* **deps:** update github/codeql-action digest to d26c46a ([#1413](https://github.com/open-feature/java-sdk/issues/1413)) ([5b327ee](https://github.com/open-feature/java-sdk/commit/5b327eeb770d0a4222f3599be79543b7bed9abc2)) +* **deps:** update github/codeql-action digest to dab8a02 ([#1405](https://github.com/open-feature/java-sdk/issues/1405)) ([5b2f151](https://github.com/open-feature/java-sdk/commit/5b2f1513ab75ef6692978830e59eba87ffa494d5)) +* **deps:** update github/codeql-action digest to e13fe0d ([#1406](https://github.com/open-feature/java-sdk/issues/1406)) ([e211397](https://github.com/open-feature/java-sdk/commit/e211397d517e1263e1251f9c99093bf05cecd93f)) +* **deps:** update github/codeql-action digest to ed51cb5 ([#1436](https://github.com/open-feature/java-sdk/issues/1436)) ([b09e887](https://github.com/open-feature/java-sdk/commit/b09e88798fed529161c61b96c20a8f257d355d3c)) +* **deps:** update github/codeql-action digest to efffb48 ([#1402](https://github.com/open-feature/java-sdk/issues/1402)) ([384953d](https://github.com/open-feature/java-sdk/commit/384953d30ecff83d60a2e5b9790e8228d1a52ac7)) +* **deps:** update github/codeql-action digest to f843d94 ([#1432](https://github.com/open-feature/java-sdk/issues/1432)) ([99faaf8](https://github.com/open-feature/java-sdk/commit/99faaf88aa07bd45fc473db5bafce3b8eafaf9e0)) +* **deps:** update io.cucumber.version to v7.22.0 ([#1410](https://github.com/open-feature/java-sdk/issues/1410)) ([3c69f2f](https://github.com/open-feature/java-sdk/commit/3c69f2f36c4e975d690ecc2e790df632a33001ba)) +* **deps:** update io.cucumber.version to v7.22.1 ([#1426](https://github.com/open-feature/java-sdk/issues/1426)) ([844374a](https://github.com/open-feature/java-sdk/commit/844374a42b94deffab6856e978766354a6f46576)) +* **deps:** update io.cucumber.version to v7.22.2 ([#1441](https://github.com/open-feature/java-sdk/issues/1441)) ([58454b4](https://github.com/open-feature/java-sdk/commit/58454b4eaabfd3327f7ceaff4bf335a5a839ed41)) +* update codeowners to give global maintainers code ownership ([#1412](https://github.com/open-feature/java-sdk/issues/1412)) ([498fd38](https://github.com/open-feature/java-sdk/commit/498fd382659669315b0db61db5f19ce054467bc9)) +* update release please action ([#1430](https://github.com/open-feature/java-sdk/issues/1430)) ([1cc851b](https://github.com/open-feature/java-sdk/commit/1cc851b293008a8dd273e904e4c77a650ad71146)) +* use PAT for release please ([014f8a5](https://github.com/open-feature/java-sdk/commit/014f8a59da8f1e976e440ed1ea17e85561f98e2d)) + + +### ๐Ÿ“š Documentation + +* add try-catch example for setProviderAndWait usage ([#1433](https://github.com/open-feature/java-sdk/issues/1433)) ([96cf9c7](https://github.com/open-feature/java-sdk/commit/96cf9c7f5463e4e0de394117845aebdd9a69425f)) + ## [1.14.2](https://github.com/open-feature/java-sdk/compare/v1.14.1...v1.14.2) (2025-03-27) diff --git a/README.md b/README.md index 09f9683eb..3f1a487b3 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ - - Release + + Release @@ -59,7 +59,7 @@ Note that this library is intended to be used in server-side contexts and has no dev.openfeature sdk - 1.14.2 + 1.15.0 ``` @@ -84,7 +84,7 @@ If you would like snapshot builds, this is the relevant repository information: ```groovy dependencies { - implementation 'dev.openfeature:sdk:1.14.2' + implementation 'dev.openfeature:sdk:1.15.0' } ``` diff --git a/pom.xml b/pom.xml index 1d4fb6f73..1ae9f9b17 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ dev.openfeature sdk - 1.14.2 + 1.15.0 [17,) diff --git a/version.txt b/version.txt index a4cc55716..141f2e805 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.14.2 +1.15.0 From bc10bacb5a68d0d2e498cb41c087505490f19de8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 13 May 2025 22:40:47 +0000 Subject: [PATCH 120/391] chore(deps): update github/codeql-action digest to 15bce5b (#1443) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 36989fde1..ae3651a3c 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@5eb3ed6614230b1931d5c08df9e096e4ba524f21 + uses: github/codeql-action/init@15bce5bb14748fcfd6fe32738ca1cba36e5f218f with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@5eb3ed6614230b1931d5c08df9e096e4ba524f21 + uses: github/codeql-action/analyze@15bce5bb14748fcfd6fe32738ca1cba36e5f218f diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 9dee17eec..f9a9cf613 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@5eb3ed6614230b1931d5c08df9e096e4ba524f21 + uses: github/codeql-action/init@15bce5bb14748fcfd6fe32738ca1cba36e5f218f with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@5eb3ed6614230b1931d5c08df9e096e4ba524f21 + uses: github/codeql-action/autobuild@15bce5bb14748fcfd6fe32738ca1cba36e5f218f - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@5eb3ed6614230b1931d5c08df9e096e4ba524f21 + uses: github/codeql-action/analyze@15bce5bb14748fcfd6fe32738ca1cba36e5f218f From e2813b2e5df8e548caf16e3e425b35962045ca6c Mon Sep 17 00:00:00 2001 From: chrfwow Date: Wed, 14 May 2025 11:11:36 +0200 Subject: [PATCH 121/391] feat: add logging on provider state transitions (#1444) * NOISSUE add logging on provider state transitions Signed-off-by: christian.lutnik * fix npe Signed-off-by: christian.lutnik * fix failing test Signed-off-by: christian.lutnik * fix failing test Signed-off-by: christian.lutnik * format Signed-off-by: christian.lutnik --------- Signed-off-by: christian.lutnik Co-authored-by: Simon Schrottner --- .../sdk/FeatureProviderStateManager.java | 43 +++++++++++++------ .../openfeature/sdk/OpenFeatureAPITest.java | 3 +- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/src/main/java/dev/openfeature/sdk/FeatureProviderStateManager.java b/src/main/java/dev/openfeature/sdk/FeatureProviderStateManager.java index 2c39ece6b..5fd70221b 100644 --- a/src/main/java/dev/openfeature/sdk/FeatureProviderStateManager.java +++ b/src/main/java/dev/openfeature/sdk/FeatureProviderStateManager.java @@ -2,14 +2,14 @@ import dev.openfeature.sdk.exceptions.OpenFeatureError; import java.util.concurrent.atomic.AtomicBoolean; -import lombok.Getter; +import java.util.concurrent.atomic.AtomicReference; +import lombok.extern.slf4j.Slf4j; +@Slf4j class FeatureProviderStateManager implements EventProviderListener { private final FeatureProvider delegate; private final AtomicBoolean isInitialized = new AtomicBoolean(); - - @Getter - private ProviderState state = ProviderState.NOT_READY; + private final AtomicReference state = new AtomicReference<>(ProviderState.NOT_READY); public FeatureProviderStateManager(FeatureProvider delegate) { this.delegate = delegate; @@ -24,17 +24,17 @@ public void initialize(EvaluationContext evaluationContext) throws Exception { } try { delegate.initialize(evaluationContext); - state = ProviderState.READY; + setState(ProviderState.READY); } catch (OpenFeatureError openFeatureError) { if (ErrorCode.PROVIDER_FATAL.equals(openFeatureError.getErrorCode())) { - state = ProviderState.FATAL; + setState(ProviderState.FATAL); } else { - state = ProviderState.ERROR; + setState(ProviderState.ERROR); } isInitialized.set(false); throw openFeatureError; } catch (Exception e) { - state = ProviderState.ERROR; + setState(ProviderState.ERROR); isInitialized.set(false); throw e; } @@ -42,7 +42,7 @@ public void initialize(EvaluationContext evaluationContext) throws Exception { public void shutdown() { delegate.shutdown(); - state = ProviderState.NOT_READY; + setState(ProviderState.NOT_READY); isInitialized.set(false); } @@ -50,17 +50,34 @@ public void shutdown() { public void onEmit(ProviderEvent event, ProviderEventDetails details) { if (ProviderEvent.PROVIDER_ERROR.equals(event)) { if (details != null && details.getErrorCode() == ErrorCode.PROVIDER_FATAL) { - state = ProviderState.FATAL; + setState(ProviderState.FATAL); } else { - state = ProviderState.ERROR; + setState(ProviderState.ERROR); } } else if (ProviderEvent.PROVIDER_STALE.equals(event)) { - state = ProviderState.STALE; + setState(ProviderState.STALE); } else if (ProviderEvent.PROVIDER_READY.equals(event)) { - state = ProviderState.READY; + setState(ProviderState.READY); + } + } + + private void setState(ProviderState state) { + ProviderState oldState = this.state.getAndSet(state); + if (oldState != state) { + String providerName; + if (delegate.getMetadata() == null || delegate.getMetadata().getName() == null) { + providerName = "unknown"; + } else { + providerName = delegate.getMetadata().getName(); + } + log.info("Provider {} transitioned from state {} to state {}", providerName, oldState, state); } } + public ProviderState getState() { + return state.get(); + } + FeatureProvider getProvider() { return delegate; } diff --git a/src/test/java/dev/openfeature/sdk/OpenFeatureAPITest.java b/src/test/java/dev/openfeature/sdk/OpenFeatureAPITest.java index e8e8b27b0..66fd06d55 100644 --- a/src/test/java/dev/openfeature/sdk/OpenFeatureAPITest.java +++ b/src/test/java/dev/openfeature/sdk/OpenFeatureAPITest.java @@ -5,6 +5,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import dev.openfeature.sdk.providers.memory.InMemoryProvider; @@ -112,7 +113,7 @@ void featureProviderTrackIsCalled() throws Exception { api.getClient().track("track-event", new ImmutableContext(), new MutableTrackingEventDetails(22.2f)); verify(featureProvider).initialize(any()); - verify(featureProvider).getMetadata(); + verify(featureProvider, times(2)).getMetadata(); verify(featureProvider).track(any(), any(), any()); } } From f6bd30db93e37e596d211d899315a62d9f810199 Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Wed, 14 May 2025 07:57:13 -0400 Subject: [PATCH 122/391] chore: update boostrap sha for release please Creating a new build Signed-off-by: Todd Baert --- release-please-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-please-config.json b/release-please-config.json index f1b6ee6bf..bc4fa6b53 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1,5 +1,5 @@ { - "bootstrap-sha": "c701a6c4ebbe1170a25ca7636a31508b9628831c", + "bootstrap-sha": "d7b591c9f910afad303d6d814f65c7f9dab33b89", "signoff": "OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com>", "packages": { ".": { From cfd95127289d81e2511ae21438ce94ae443b447a Mon Sep 17 00:00:00 2001 From: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Date: Wed, 14 May 2025 08:12:11 -0400 Subject: [PATCH 123/391] chore(main): release 1.15.1 (#1448) * chore(main): release 1.15.1 Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> * fixup: change version Signed-off-by: Simon Schrottner --------- Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: Simon Schrottner Co-authored-by: Simon Schrottner --- .release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++-- README.md | 8 ++++---- pom.xml | 2 +- version.txt | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 634797f5a..8c4a75878 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{".":"1.15.0"} +{".":"1.15.1"} diff --git a/CHANGELOG.md b/CHANGELOG.md index b18f9cc71..8d2871346 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## [1.15.0](https://github.com/open-feature/java-sdk/compare/v1.14.2...v1.15.0) (2025-05-13) +## [1.15.1](https://github.com/open-feature/java-sdk/compare/v1.14.2...v1.15.1) (2025-05-14) ### NOTABLE CHANGES @@ -18,6 +18,7 @@ ### โœจ New Features +* add logging on provider state transitions ([#1444](https://github.com/open-feature/java-sdk/issues/1444)) ([e2813b2](https://github.com/open-feature/java-sdk/commit/e2813b2e5df8e548caf16e3e425b35962045ca6c)) * add telemetry helper utils ([#1346](https://github.com/open-feature/java-sdk/issues/1346)) ([d0ae548](https://github.com/open-feature/java-sdk/commit/d0ae5482771f4d1701bce25381cdf4e92e2d4882)) * Raise required Java version to 11 ([#1393](https://github.com/open-feature/java-sdk/issues/1393)) ([4dc988b](https://github.com/open-feature/java-sdk/commit/4dc988b637a9e9c377edf7df7b29bf6407319f16)) @@ -42,6 +43,7 @@ * **deps:** update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.5.3 ([#1399](https://github.com/open-feature/java-sdk/issues/1399)) ([d6ebc16](https://github.com/open-feature/java-sdk/commit/d6ebc161a93ad703e25592abdb0bf0fd9e281bbc)) * **deps:** update dependency org.jacoco:jacoco-maven-plugin to v0.8.13 ([#1407](https://github.com/open-feature/java-sdk/issues/1407)) ([e19ccaa](https://github.com/open-feature/java-sdk/commit/e19ccaa35d9ac4d89d72ea58a70d416d202078db)) * **deps:** update dependency org.mockito:mockito-core to v5.17.0 ([#1409](https://github.com/open-feature/java-sdk/issues/1409)) ([345cdcf](https://github.com/open-feature/java-sdk/commit/345cdcfa10da64c61d769746f335f38ac564e9ad)) +* **deps:** update github/codeql-action digest to 15bce5b ([#1443](https://github.com/open-feature/java-sdk/issues/1443)) ([bc10bac](https://github.com/open-feature/java-sdk/commit/bc10bacb5a68d0d2e498cb41c087505490f19de8)) * **deps:** update github/codeql-action digest to 2a8cbad ([#1423](https://github.com/open-feature/java-sdk/issues/1423)) ([6b6849f](https://github.com/open-feature/java-sdk/commit/6b6849f3a3ee8a7b66d859c8e522bc101d1ccd44)) * **deps:** update github/codeql-action digest to 362ef4c ([#1408](https://github.com/open-feature/java-sdk/issues/1408)) ([ca160ca](https://github.com/open-feature/java-sdk/commit/ca160cab7ccd71527e06a0851502353ac50b8d0d)) * **deps:** update github/codeql-action digest to 40e16ed ([#1437](https://github.com/open-feature/java-sdk/issues/1437)) ([f965cbc](https://github.com/open-feature/java-sdk/commit/f965cbcb37d20724e15b76c15842a88574810b1a)) @@ -51,7 +53,6 @@ * **deps:** update github/codeql-action digest to 5eb3ed6 ([#1439](https://github.com/open-feature/java-sdk/issues/1439)) ([f2348ea](https://github.com/open-feature/java-sdk/commit/f2348ea370412351389c60eef390f36edbea68b0)) * **deps:** update github/codeql-action digest to 83605b3 ([#1435](https://github.com/open-feature/java-sdk/issues/1435)) ([7e74f2a](https://github.com/open-feature/java-sdk/commit/7e74f2aa3ad2dc8f7a3e4ad398e7705b3e3db364)) * **deps:** update github/codeql-action digest to 97a2bfd ([#1438](https://github.com/open-feature/java-sdk/issues/1438)) ([85b200a](https://github.com/open-feature/java-sdk/commit/85b200a08b9f8a71de3b5a19eaa057ec04e0801e)) -* **deps:** update github/codeql-action digest to 9bd18b4 ([#1394](https://github.com/open-feature/java-sdk/issues/1394)) ([d7b591c](https://github.com/open-feature/java-sdk/commit/d7b591c9f910afad303d6d814f65c7f9dab33b89)) * **deps:** update github/codeql-action digest to 9f45e74 ([#1396](https://github.com/open-feature/java-sdk/issues/1396)) ([37d76be](https://github.com/open-feature/java-sdk/commit/37d76be697e83f524250a82b2a67cdb4a953d7bc)) * **deps:** update github/codeql-action digest to d26c46a ([#1413](https://github.com/open-feature/java-sdk/issues/1413)) ([5b327ee](https://github.com/open-feature/java-sdk/commit/5b327eeb770d0a4222f3599be79543b7bed9abc2)) * **deps:** update github/codeql-action digest to dab8a02 ([#1405](https://github.com/open-feature/java-sdk/issues/1405)) ([5b2f151](https://github.com/open-feature/java-sdk/commit/5b2f1513ab75ef6692978830e59eba87ffa494d5)) @@ -62,6 +63,8 @@ * **deps:** update io.cucumber.version to v7.22.0 ([#1410](https://github.com/open-feature/java-sdk/issues/1410)) ([3c69f2f](https://github.com/open-feature/java-sdk/commit/3c69f2f36c4e975d690ecc2e790df632a33001ba)) * **deps:** update io.cucumber.version to v7.22.1 ([#1426](https://github.com/open-feature/java-sdk/issues/1426)) ([844374a](https://github.com/open-feature/java-sdk/commit/844374a42b94deffab6856e978766354a6f46576)) * **deps:** update io.cucumber.version to v7.22.2 ([#1441](https://github.com/open-feature/java-sdk/issues/1441)) ([58454b4](https://github.com/open-feature/java-sdk/commit/58454b4eaabfd3327f7ceaff4bf335a5a839ed41)) +* **main:** release 1.15.0 ([#1431](https://github.com/open-feature/java-sdk/issues/1431)) ([7182a7f](https://github.com/open-feature/java-sdk/commit/7182a7fc4197e70218e829971dae2cff09f948c9)) +* update boostrap sha for release please ([f6bd30d](https://github.com/open-feature/java-sdk/commit/f6bd30db93e37e596d211d899315a62d9f810199)) * update codeowners to give global maintainers code ownership ([#1412](https://github.com/open-feature/java-sdk/issues/1412)) ([498fd38](https://github.com/open-feature/java-sdk/commit/498fd382659669315b0db61db5f19ce054467bc9)) * update release please action ([#1430](https://github.com/open-feature/java-sdk/issues/1430)) ([1cc851b](https://github.com/open-feature/java-sdk/commit/1cc851b293008a8dd273e904e4c77a650ad71146)) * use PAT for release please ([014f8a5](https://github.com/open-feature/java-sdk/commit/014f8a59da8f1e976e440ed1ea17e85561f98e2d)) diff --git a/README.md b/README.md index 3f1a487b3..6593c9b1e 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ - - Release + + Release @@ -59,7 +59,7 @@ Note that this library is intended to be used in server-side contexts and has no dev.openfeature sdk - 1.15.0 + 1.15.1 ``` @@ -84,7 +84,7 @@ If you would like snapshot builds, this is the relevant repository information: ```groovy dependencies { - implementation 'dev.openfeature:sdk:1.15.0' + implementation 'dev.openfeature:sdk:1.15.1' } ``` diff --git a/pom.xml b/pom.xml index 1ae9f9b17..0146f15f8 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ dev.openfeature sdk - 1.15.0 + 1.15.1 [17,) diff --git a/version.txt b/version.txt index 141f2e805..ace44233b 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.15.0 +1.15.1 From d9a72d2aafd787a1814132f000897ad1c94181e4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 14 May 2025 22:43:05 +0000 Subject: [PATCH 124/391] chore(deps): update github/codeql-action digest to 510dfa3 (#1450) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index ae3651a3c..d258e0312 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@15bce5bb14748fcfd6fe32738ca1cba36e5f218f + uses: github/codeql-action/init@510dfa3460b15b34a807ab5609b4691aed5ebbee with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@15bce5bb14748fcfd6fe32738ca1cba36e5f218f + uses: github/codeql-action/analyze@510dfa3460b15b34a807ab5609b4691aed5ebbee diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index f9a9cf613..b49e054fa 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@15bce5bb14748fcfd6fe32738ca1cba36e5f218f + uses: github/codeql-action/init@510dfa3460b15b34a807ab5609b4691aed5ebbee with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@15bce5bb14748fcfd6fe32738ca1cba36e5f218f + uses: github/codeql-action/autobuild@510dfa3460b15b34a807ab5609b4691aed5ebbee - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@15bce5bb14748fcfd6fe32738ca1cba36e5f218f + uses: github/codeql-action/analyze@510dfa3460b15b34a807ab5609b4691aed5ebbee From 1714efe81aa6ae025f4f8b12c9c042561498d25e Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Thu, 15 May 2025 11:22:10 -0400 Subject: [PATCH 125/391] chore: improvements to release workflow (#1451) Signed-off-by: Todd Baert Co-authored-by: chrfwow --- .github/workflows/release.yml | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 41d308de1..546747584 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,11 +12,11 @@ permissions: # added using https://github.com/step-security/secure-workflows jobs: release-please: - environment: publish - permissions: - contents: write # for google-github-actions/release-please-action to create release commit - pull-requests: write # for google-github-actions/release-please-action to create release PR runs-on: ubuntu-latest + permissions: + contents: write # for googleapis/release-please-action to create release commit + pull-requests: write # for googleapis/release-please-action to create release PR + issues: write # for googleapis/release-please-action to create labels # Release-please creates a PR that tracks all changes steps: @@ -24,13 +24,22 @@ jobs: id: release with: token: ${{secrets.RELEASE_PLEASE_ACTION_TOKEN}} + outputs: + release_created: ${{ fromJSON(steps.release.outputs.paths_released)[0] != null }} # if we have a single release path, do the release - # These steps are only run if this was a merged release-please PR - - name: checkout - if: ${{ steps.release.outputs.release_created }} + publish: + environment: publish + runs-on: ubuntu-latest + permissions: + contents: read + needs: release-please + if: ${{ fromJSON(needs.release-please.outputs.release_created || false) }} + + steps: + - name: Checkout Repository uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 + - name: Set up JDK 17 - if: ${{ steps.release.outputs.release_created }} uses: actions/setup-java@f4f1212c880fdec8162ea9a6493f4495191887b4 with: java-version: '17' @@ -41,17 +50,15 @@ jobs: server-password: ${{ secrets.OSSRH_PASSWORD }} - name: Configure GPG Key - if: ${{ steps.release.outputs.release_created }} run: | echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import env: GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} - name: Deploy - if: ${{ steps.release.outputs.release_created }} run: | mvn --batch-mode \ - --settings release/m2-settings.xml clean deploy + --settings release/m2-settings.xml -DskipTests clean deploy env: OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} From b667aa325136b78c01867d40342f81eeb7e16f46 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 15 May 2025 20:01:17 +0000 Subject: [PATCH 126/391] chore(deps): update github/codeql-action digest to b86edfc (#1453) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index d258e0312..c9398132d 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@510dfa3460b15b34a807ab5609b4691aed5ebbee + uses: github/codeql-action/init@b86edfc27a1e0d3b55127a7496a1c770a02b2f84 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@510dfa3460b15b34a807ab5609b4691aed5ebbee + uses: github/codeql-action/analyze@b86edfc27a1e0d3b55127a7496a1c770a02b2f84 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index b49e054fa..c63d8876d 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@510dfa3460b15b34a807ab5609b4691aed5ebbee + uses: github/codeql-action/init@b86edfc27a1e0d3b55127a7496a1c770a02b2f84 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@510dfa3460b15b34a807ab5609b4691aed5ebbee + uses: github/codeql-action/autobuild@b86edfc27a1e0d3b55127a7496a1c770a02b2f84 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@510dfa3460b15b34a807ab5609b4691aed5ebbee + uses: github/codeql-action/analyze@b86edfc27a1e0d3b55127a7496a1c770a02b2f84 From e3379395e6bfb0ce811d8372761a3cb015ad2cde Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 16 May 2025 01:40:23 +0000 Subject: [PATCH 127/391] chore(deps): update codecov/codecov-action action to v5.4.3 (#1454) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 58e096350..c92523417 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -50,7 +50,7 @@ jobs: run: mvn --batch-mode --update-snapshots verify - name: Upload coverage to Codecov - uses: codecov/codecov-action@v5.4.2 + uses: codecov/codecov-action@v5.4.3 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos flags: unittests # optional diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index c9398132d..755a4fc04 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -46,7 +46,7 @@ jobs: - if: matrix.build.java == '17' name: Upload coverage to Codecov - uses: codecov/codecov-action@v5.4.2 + uses: codecov/codecov-action@v5.4.3 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos flags: unittests # optional From 36eed065e763bbfa0f8f97d704202bbd219332ca Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 16 May 2025 15:06:06 +0000 Subject: [PATCH 128/391] chore(deps): update github/codeql-action digest to 57eebf6 (#1455) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 755a4fc04..8fbfd3182 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@b86edfc27a1e0d3b55127a7496a1c770a02b2f84 + uses: github/codeql-action/init@57eebf61a2246ab60a0c2f5a85766db783ad3553 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@b86edfc27a1e0d3b55127a7496a1c770a02b2f84 + uses: github/codeql-action/analyze@57eebf61a2246ab60a0c2f5a85766db783ad3553 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index c63d8876d..db87c3e3a 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@b86edfc27a1e0d3b55127a7496a1c770a02b2f84 + uses: github/codeql-action/init@57eebf61a2246ab60a0c2f5a85766db783ad3553 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@b86edfc27a1e0d3b55127a7496a1c770a02b2f84 + uses: github/codeql-action/autobuild@57eebf61a2246ab60a0c2f5a85766db783ad3553 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@b86edfc27a1e0d3b55127a7496a1c770a02b2f84 + uses: github/codeql-action/analyze@57eebf61a2246ab60a0c2f5a85766db783ad3553 From b45a9370173e3d3b97c78449dfc99225fb572228 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 19 May 2025 23:54:03 +0000 Subject: [PATCH 129/391] chore(deps): update github/codeql-action digest to 396fd27 (#1456) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 8fbfd3182..9fd72b6de 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@57eebf61a2246ab60a0c2f5a85766db783ad3553 + uses: github/codeql-action/init@396fd27c308b7ab96df64e7e4cb9a7c6e22f4ebc with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@57eebf61a2246ab60a0c2f5a85766db783ad3553 + uses: github/codeql-action/analyze@396fd27c308b7ab96df64e7e4cb9a7c6e22f4ebc diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index db87c3e3a..f0fd3b95e 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@57eebf61a2246ab60a0c2f5a85766db783ad3553 + uses: github/codeql-action/init@396fd27c308b7ab96df64e7e4cb9a7c6e22f4ebc with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@57eebf61a2246ab60a0c2f5a85766db783ad3553 + uses: github/codeql-action/autobuild@396fd27c308b7ab96df64e7e4cb9a7c6e22f4ebc - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@57eebf61a2246ab60a0c2f5a85766db783ad3553 + uses: github/codeql-action/analyze@396fd27c308b7ab96df64e7e4cb9a7c6e22f4ebc From e17b0b29758ae7cdbdac9ddb2178382c55eb1277 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 04:08:45 +0000 Subject: [PATCH 130/391] chore(deps): update dependency org.mockito:mockito-core to v5.18.0 (#1457) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0146f15f8..ff52af7ad 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ ${maven.compiler.source} 5.12.2 7.22.2 - 5.17.0 + 5.18.0 **/e2e/*.java ${project.groupId}.${project.artifactId} From dcbfd265a3875271695af760fce9870e53c69f13 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 06:29:34 +0000 Subject: [PATCH 131/391] chore(deps): update dependency com.puppycrawl.tools:checkstyle to v10.24.0 (#1458) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ff52af7ad..6ec4b1fb1 100644 --- a/pom.xml +++ b/pom.xml @@ -457,7 +457,7 @@ com.puppycrawl.tools checkstyle - 10.23.1 + 10.24.0 From 6a95c008e975dd3c7328c32f1d7cf626bbaecfa6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 22:59:22 +0000 Subject: [PATCH 132/391] chore(deps): update github/codeql-action digest to 7b0fb5a (#1459) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 9fd72b6de..96cada045 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@396fd27c308b7ab96df64e7e4cb9a7c6e22f4ebc + uses: github/codeql-action/init@7b0fb5a4ac3b38ee6ee9a3ab6ffe59c27e9c4d3b with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@396fd27c308b7ab96df64e7e4cb9a7c6e22f4ebc + uses: github/codeql-action/analyze@7b0fb5a4ac3b38ee6ee9a3ab6ffe59c27e9c4d3b diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index f0fd3b95e..1bfc48a62 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@396fd27c308b7ab96df64e7e4cb9a7c6e22f4ebc + uses: github/codeql-action/init@7b0fb5a4ac3b38ee6ee9a3ab6ffe59c27e9c4d3b with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@396fd27c308b7ab96df64e7e4cb9a7c6e22f4ebc + uses: github/codeql-action/autobuild@7b0fb5a4ac3b38ee6ee9a3ab6ffe59c27e9c4d3b - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@396fd27c308b7ab96df64e7e4cb9a7c6e22f4ebc + uses: github/codeql-action/analyze@7b0fb5a4ac3b38ee6ee9a3ab6ffe59c27e9c4d3b From 5e922cf3efc156135563707de92e508b0a4d19f3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 22:26:25 +0000 Subject: [PATCH 133/391] chore(deps): update github/codeql-action digest to bc02a25 (#1460) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 96cada045..6ce471baf 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@7b0fb5a4ac3b38ee6ee9a3ab6ffe59c27e9c4d3b + uses: github/codeql-action/init@bc02a25f6449997c5e9d5a368879b28f56ae19a1 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@7b0fb5a4ac3b38ee6ee9a3ab6ffe59c27e9c4d3b + uses: github/codeql-action/analyze@bc02a25f6449997c5e9d5a368879b28f56ae19a1 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 1bfc48a62..9405793c7 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@7b0fb5a4ac3b38ee6ee9a3ab6ffe59c27e9c4d3b + uses: github/codeql-action/init@bc02a25f6449997c5e9d5a368879b28f56ae19a1 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@7b0fb5a4ac3b38ee6ee9a3ab6ffe59c27e9c4d3b + uses: github/codeql-action/autobuild@bc02a25f6449997c5e9d5a368879b28f56ae19a1 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@7b0fb5a4ac3b38ee6ee9a3ab6ffe59c27e9c4d3b + uses: github/codeql-action/analyze@bc02a25f6449997c5e9d5a368879b28f56ae19a1 From 40b319c5de0461bec13f76978ae09edc958310cd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 28 May 2025 04:12:52 +0000 Subject: [PATCH 134/391] chore(deps): update dependency com.diffplug.spotless:spotless-maven-plugin to v2.44.5 (#1462) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6ec4b1fb1..027f477bf 100644 --- a/pom.xml +++ b/pom.xml @@ -473,7 +473,7 @@ com.diffplug.spotless spotless-maven-plugin - 2.44.4 + 2.44.5 From f10aaaa357581b573895f4d6e2329abb705582aa Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 28 May 2025 22:25:40 +0000 Subject: [PATCH 135/391] chore(deps): update github/codeql-action digest to 7fd6215 (#1464) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 6ce471baf..1ee66b175 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@bc02a25f6449997c5e9d5a368879b28f56ae19a1 + uses: github/codeql-action/init@7fd62151d9daff11d4b981415ffb365dcd93f75a with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@bc02a25f6449997c5e9d5a368879b28f56ae19a1 + uses: github/codeql-action/analyze@7fd62151d9daff11d4b981415ffb365dcd93f75a diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 9405793c7..29a95683d 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@bc02a25f6449997c5e9d5a368879b28f56ae19a1 + uses: github/codeql-action/init@7fd62151d9daff11d4b981415ffb365dcd93f75a with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@bc02a25f6449997c5e9d5a368879b28f56ae19a1 + uses: github/codeql-action/autobuild@7fd62151d9daff11d4b981415ffb365dcd93f75a - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@bc02a25f6449997c5e9d5a368879b28f56ae19a1 + uses: github/codeql-action/analyze@7fd62151d9daff11d4b981415ffb365dcd93f75a From 2de76166764bacd34883b13220dd0bad824c8b1a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 29 May 2025 23:00:03 +0000 Subject: [PATCH 136/391] chore(deps): update io.cucumber.version to v7.23.0 (#1465) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 027f477bf..035a3dcb5 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ 11 ${maven.compiler.source} 5.12.2 - 7.22.2 + 7.23.0 5.18.0 **/e2e/*.java From b6ceff2ecb0e34be2ccdb83f7f37c1177de6f27e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 30 May 2025 02:01:25 +0000 Subject: [PATCH 137/391] chore(deps): update dependency org.codehaus.mojo:exec-maven-plugin to v3.5.1 (#1461) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 035a3dcb5..c02254e96 100644 --- a/pom.xml +++ b/pom.xml @@ -622,7 +622,7 @@ org.codehaus.mojo exec-maven-plugin - 3.5.0 + 3.5.1 update-test-harness-submodule From 50a6b168a7de40337aa51ef3d79d122030956cb9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 30 May 2025 05:38:25 +0000 Subject: [PATCH 138/391] fix(deps): update dependency io.cucumber:cucumber-bom to v7.23.0 (#1466) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c02254e96..2f00ce9a8 100644 --- a/pom.xml +++ b/pom.xml @@ -204,7 +204,7 @@ io.cucumber cucumber-bom - 7.22.2 + 7.23.0 pom import From f8260a1c3a345c877eba95bfe41184ad11f6555e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 30 May 2025 21:02:38 +0000 Subject: [PATCH 139/391] fix(deps): update junit5 monorepo (#1467) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 2f00ce9a8..b9d48d566 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ UTF-8 11 ${maven.compiler.source} - 5.12.2 + 5.13.0 7.23.0 5.18.0 @@ -125,7 +125,7 @@ org.junit.platform junit-platform-suite - 1.12.2 + 1.13.0 test @@ -212,7 +212,7 @@ org.junit junit-bom - 5.12.2 + 5.13.0 pom import From 1558a862497c0e133d11d53ff6d7f28437653d43 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 31 May 2025 21:27:57 +0000 Subject: [PATCH 140/391] chore(deps): update dependency com.puppycrawl.tools:checkstyle to v10.25.0 (#1468) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b9d48d566..7fb333134 100644 --- a/pom.xml +++ b/pom.xml @@ -457,7 +457,7 @@ com.puppycrawl.tools checkstyle - 10.24.0 + 10.25.0 From 376f81f5c3b66d7e3e298aac30ac7544b84e7362 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 19:28:18 +0000 Subject: [PATCH 141/391] chore(deps): update github/codeql-action digest to 4a00331 (#1469) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 1ee66b175..7185b39ff 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@7fd62151d9daff11d4b981415ffb365dcd93f75a + uses: github/codeql-action/init@4a00331d4ecf79a214751520faf8e540e60c7567 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@7fd62151d9daff11d4b981415ffb365dcd93f75a + uses: github/codeql-action/analyze@4a00331d4ecf79a214751520faf8e540e60c7567 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 29a95683d..2563d859d 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@7fd62151d9daff11d4b981415ffb365dcd93f75a + uses: github/codeql-action/init@4a00331d4ecf79a214751520faf8e540e60c7567 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@7fd62151d9daff11d4b981415ffb365dcd93f75a + uses: github/codeql-action/autobuild@4a00331d4ecf79a214751520faf8e540e60c7567 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@7fd62151d9daff11d4b981415ffb365dcd93f75a + uses: github/codeql-action/analyze@4a00331d4ecf79a214751520faf8e540e60c7567 From 6597de7a98e0fae10a541a8a9b60837623c133a8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 3 Jun 2025 18:05:22 +0000 Subject: [PATCH 142/391] chore(deps): update github/codeql-action digest to 075e08a (#1470) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 7185b39ff..578dfa453 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@4a00331d4ecf79a214751520faf8e540e60c7567 + uses: github/codeql-action/init@075e08aca6be12984ae56ae245bd0767609134f2 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@4a00331d4ecf79a214751520faf8e540e60c7567 + uses: github/codeql-action/analyze@075e08aca6be12984ae56ae245bd0767609134f2 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 2563d859d..4273ba2d3 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@4a00331d4ecf79a214751520faf8e540e60c7567 + uses: github/codeql-action/init@075e08aca6be12984ae56ae245bd0767609134f2 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@4a00331d4ecf79a214751520faf8e540e60c7567 + uses: github/codeql-action/autobuild@075e08aca6be12984ae56ae245bd0767609134f2 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@4a00331d4ecf79a214751520faf8e540e60c7567 + uses: github/codeql-action/analyze@075e08aca6be12984ae56ae245bd0767609134f2 From 3ed65cfb0cb5ee5b70793cd68a27909c81cd4fab Mon Sep 17 00:00:00 2001 From: Simon Schrottner Date: Wed, 4 Jun 2025 16:44:38 +0200 Subject: [PATCH 143/391] chore: remove unneeded version information (#1428) Signed-off-by: Simon Schrottner --- pom.xml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/pom.xml b/pom.xml index 7fb333134..052f1c6cd 100644 --- a/pom.xml +++ b/pom.xml @@ -12,8 +12,6 @@ UTF-8 11 ${maven.compiler.source} - 5.13.0 - 7.23.0 5.18.0 **/e2e/*.java @@ -97,56 +95,48 @@ org.junit.jupiter junit-jupiter - ${junit.jupiter.version} test org.junit.jupiter junit-jupiter-engine - ${junit.jupiter.version} test org.junit.jupiter junit-jupiter-api - ${junit.jupiter.version} test org.junit.jupiter junit-jupiter-params - ${junit.jupiter.version} test org.junit.platform junit-platform-suite - 1.13.0 test io.cucumber cucumber-java - ${io.cucumber.version} test io.cucumber cucumber-junit-platform-engine - ${io.cucumber.version} test io.cucumber cucumber-picocontainer - ${io.cucumber.version} test From 2dcd6a1dd0c80ee676b9860afd6a6002d0ea4aea Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 5 Jun 2025 06:27:45 +0000 Subject: [PATCH 144/391] chore(deps): update github/codeql-action digest to b1e4dc3 (#1471) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 578dfa453..a711d4b34 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@075e08aca6be12984ae56ae245bd0767609134f2 + uses: github/codeql-action/init@b1e4dc3db58c9601794e22a9f6d28d45461b9dbf with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@075e08aca6be12984ae56ae245bd0767609134f2 + uses: github/codeql-action/analyze@b1e4dc3db58c9601794e22a9f6d28d45461b9dbf diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 4273ba2d3..c567e9d0f 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@075e08aca6be12984ae56ae245bd0767609134f2 + uses: github/codeql-action/init@b1e4dc3db58c9601794e22a9f6d28d45461b9dbf with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@075e08aca6be12984ae56ae245bd0767609134f2 + uses: github/codeql-action/autobuild@b1e4dc3db58c9601794e22a9f6d28d45461b9dbf - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@075e08aca6be12984ae56ae245bd0767609134f2 + uses: github/codeql-action/analyze@b1e4dc3db58c9601794e22a9f6d28d45461b9dbf From 545d6aac09dbc74c00a0a4e5c26f4ef80be22379 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 7 Jun 2025 13:08:10 +0000 Subject: [PATCH 145/391] fix(deps): update dependency org.junit:junit-bom to v5.13.1 (#1475) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 052f1c6cd..4f36c2689 100644 --- a/pom.xml +++ b/pom.xml @@ -202,7 +202,7 @@ org.junit junit-bom - 5.13.0 + 5.13.1 pom import From b5d873e44d3c41b42f11569b0fafccc0a002ebdd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 7 Jun 2025 17:39:13 +0000 Subject: [PATCH 146/391] chore(deps): update actions/checkout digest to 09d2aca (#1473) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/static-code-scanning.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index c92523417..77a649385 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 + - uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f - name: Set up JDK 17 uses: actions/setup-java@f4f1212c880fdec8162ea9a6493f4495191887b4 with: diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index a711d4b34..1cde047fb 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -19,7 +19,7 @@ jobs: runs-on: ${{ matrix.os}} steps: - name: Check out the code - uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 + uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f - name: Set up JDK 11 uses: actions/setup-java@f4f1212c880fdec8162ea9a6493f4495191887b4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 546747584..61df7d93e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,7 +37,7 @@ jobs: steps: - name: Checkout Repository - uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 + uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f - name: Set up JDK 17 uses: actions/setup-java@f4f1212c880fdec8162ea9a6493f4495191887b4 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index c567e9d0f..cb9c940c4 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -29,7 +29,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 + uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL From 4481537cebc213dcfe19bb8cd9b70a4c91a682b2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 7 Jun 2025 21:59:01 +0000 Subject: [PATCH 147/391] chore(deps): update dependency maven to v3.9.10 (#1474) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .mvn/wrapper/maven-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index d58dfb70b..2f94e6169 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -16,4 +16,4 @@ # under the License. wrapperVersion=3.3.2 distributionType=only-script -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.10/apache-maven-3.9.10-bin.zip From 6cca721be5bc6f5926fe64668a7c03728cab3cb0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 10 Jun 2025 01:27:44 +0000 Subject: [PATCH 148/391] chore(deps): update github/codeql-action digest to 7cb9b16 (#1476) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 1cde047fb..e3b4f4aca 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@b1e4dc3db58c9601794e22a9f6d28d45461b9dbf + uses: github/codeql-action/init@7cb9b16051842e6c23c8b9fbcf92481f92d0644a with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@b1e4dc3db58c9601794e22a9f6d28d45461b9dbf + uses: github/codeql-action/analyze@7cb9b16051842e6c23c8b9fbcf92481f92d0644a diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index cb9c940c4..55764e9bf 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@b1e4dc3db58c9601794e22a9f6d28d45461b9dbf + uses: github/codeql-action/init@7cb9b16051842e6c23c8b9fbcf92481f92d0644a with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@b1e4dc3db58c9601794e22a9f6d28d45461b9dbf + uses: github/codeql-action/autobuild@7cb9b16051842e6c23c8b9fbcf92481f92d0644a - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@b1e4dc3db58c9601794e22a9f6d28d45461b9dbf + uses: github/codeql-action/analyze@7cb9b16051842e6c23c8b9fbcf92481f92d0644a From 3dd7d5d4262f1f4461e13c13a7d64d2fa8bfd764 Mon Sep 17 00:00:00 2001 From: chrfwow Date: Tue, 10 Jun 2025 17:27:15 +0200 Subject: [PATCH 149/391] feat: add means of awaiting event emission, fix flaky build (#1463) ## This PR - adds the ability to await event emissions by returning a new construct - uses this construct in tests :warning: in rare cases, this could be a breaking change, but the events API is currently experimental, so we will not do a major version ubmp ### Related Issues Fixes #1449 --- .../java/dev/openfeature/sdk/Awaitable.java | 44 +++++++++++ .../dev/openfeature/sdk/EventProvider.java | 47 ++++++++---- .../dev/openfeature/sdk/EventSupport.java | 28 +++---- .../dev/openfeature/sdk/AwaitableTest.java | 75 +++++++++++++++++++ .../sdk/DeveloperExperienceTest.java | 8 +- .../openfeature/sdk/EventProviderTest.java | 1 + .../java/dev/openfeature/sdk/EventsTest.java | 12 +-- .../memory/InMemoryProviderTest.java | 18 ++++- 8 files changed, 189 insertions(+), 44 deletions(-) create mode 100644 src/main/java/dev/openfeature/sdk/Awaitable.java create mode 100644 src/test/java/dev/openfeature/sdk/AwaitableTest.java diff --git a/src/main/java/dev/openfeature/sdk/Awaitable.java b/src/main/java/dev/openfeature/sdk/Awaitable.java new file mode 100644 index 000000000..7d5f477dc --- /dev/null +++ b/src/main/java/dev/openfeature/sdk/Awaitable.java @@ -0,0 +1,44 @@ +package dev.openfeature.sdk; + +/** + * A class to help with synchronization by allowing the optional awaiting of the associated action. + */ +public class Awaitable { + + /** + * An already-completed Awaitable. Awaiting this will return immediately. + */ + public static final Awaitable FINISHED = new Awaitable(true); + + private boolean isDone = false; + + public Awaitable() {} + + private Awaitable(boolean isDone) { + this.isDone = isDone; + } + + /** + * Lets the calling thread wait until some other thread calls {@link Awaitable#wakeup()}. If + * {@link Awaitable#wakeup()} has been called before the current thread invokes this method, it will return + * immediately. + */ + @SuppressWarnings("java:S2142") + public synchronized void await() { + while (!isDone) { + try { + this.wait(); + } catch (InterruptedException ignored) { + // ignored, do not propagate the interrupted state + } + } + } + + /** + * Wakes up all threads that have called {@link Awaitable#await()} and lets them proceed. + */ + public synchronized void wakeup() { + isDone = true; + this.notifyAll(); + } +} diff --git a/src/main/java/dev/openfeature/sdk/EventProvider.java b/src/main/java/dev/openfeature/sdk/EventProvider.java index 659c6ad46..0d7e897c2 100644 --- a/src/main/java/dev/openfeature/sdk/EventProvider.java +++ b/src/main/java/dev/openfeature/sdk/EventProvider.java @@ -76,15 +76,32 @@ public void shutdown() { * @param event The event type * @param details The details of the event */ - public void emit(ProviderEvent event, ProviderEventDetails details) { - if (eventProviderListener != null) { - eventProviderListener.onEmit(event, details); - } + public Awaitable emit(final ProviderEvent event, final ProviderEventDetails details) { + final var localEventProviderListener = this.eventProviderListener; + final var localOnEmit = this.onEmit; - final TriConsumer localOnEmit = this.onEmit; - if (localOnEmit != null) { - emitterExecutor.submit(() -> localOnEmit.accept(this, event, details)); + if (localEventProviderListener == null && localOnEmit == null) { + return Awaitable.FINISHED; } + + final var awaitable = new Awaitable(); + + // These calls need to be executed on a different thread to prevent deadlocks when the provider initialization + // relies on a ready event to be emitted + emitterExecutor.submit(() -> { + try (var ignored = OpenFeatureAPI.lock.readLockAutoCloseable()) { + if (localEventProviderListener != null) { + localEventProviderListener.onEmit(event, details); + } + if (localOnEmit != null) { + localOnEmit.accept(this, event, details); + } + } finally { + awaitable.wakeup(); + } + }); + + return awaitable; } /** @@ -93,8 +110,8 @@ public void emit(ProviderEvent event, ProviderEventDetails details) { * * @param details The details of the event */ - public void emitProviderReady(ProviderEventDetails details) { - emit(ProviderEvent.PROVIDER_READY, details); + public Awaitable emitProviderReady(ProviderEventDetails details) { + return emit(ProviderEvent.PROVIDER_READY, details); } /** @@ -104,8 +121,8 @@ public void emitProviderReady(ProviderEventDetails details) { * * @param details The details of the event */ - public void emitProviderConfigurationChanged(ProviderEventDetails details) { - emit(ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, details); + public Awaitable emitProviderConfigurationChanged(ProviderEventDetails details) { + return emit(ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, details); } /** @@ -114,8 +131,8 @@ public void emitProviderConfigurationChanged(ProviderEventDetails details) { * * @param details The details of the event */ - public void emitProviderStale(ProviderEventDetails details) { - emit(ProviderEvent.PROVIDER_STALE, details); + public Awaitable emitProviderStale(ProviderEventDetails details) { + return emit(ProviderEvent.PROVIDER_STALE, details); } /** @@ -124,7 +141,7 @@ public void emitProviderStale(ProviderEventDetails details) { * * @param details The details of the event */ - public void emitProviderError(ProviderEventDetails details) { - emit(ProviderEvent.PROVIDER_ERROR, details); + public Awaitable emitProviderError(ProviderEventDetails details) { + return emit(ProviderEvent.PROVIDER_ERROR, details); } } diff --git a/src/main/java/dev/openfeature/sdk/EventSupport.java b/src/main/java/dev/openfeature/sdk/EventSupport.java index 5ebe90a4c..8396795bd 100644 --- a/src/main/java/dev/openfeature/sdk/EventSupport.java +++ b/src/main/java/dev/openfeature/sdk/EventSupport.java @@ -1,12 +1,12 @@ package dev.openfeature.sdk; -import java.util.ArrayList; -import java.util.List; +import java.util.Collection; import java.util.Map; import java.util.Optional; import java.util.Set; import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; @@ -23,13 +23,10 @@ class EventSupport { // we use a v4 uuid as a "placeholder" for anonymous clients, since // ConcurrentHashMap doesn't support nulls - private static final String defaultClientUuid = UUID.randomUUID().toString(); + private static final String DEFAULT_CLIENT_UUID = UUID.randomUUID().toString(); private final Map handlerStores = new ConcurrentHashMap<>(); private final HandlerStore globalHandlerStore = new HandlerStore(); - private final ExecutorService taskExecutor = Executors.newCachedThreadPool(runnable -> { - final Thread thread = new Thread(runnable); - return thread; - }); + private final ExecutorService taskExecutor = Executors.newCachedThreadPool(); /** * Run all the event handlers associated with this domain. @@ -40,11 +37,10 @@ class EventSupport { * @param eventDetails the event details */ public void runClientHandlers(String domain, ProviderEvent event, EventDetails eventDetails) { - domain = Optional.ofNullable(domain).orElse(defaultClientUuid); + domain = Optional.ofNullable(domain).orElse(DEFAULT_CLIENT_UUID); // run handlers if they exist Optional.ofNullable(handlerStores.get(domain)) - .filter(store -> Optional.of(store).isPresent()) .map(store -> store.handlerMap.get(event)) .ifPresent(handlers -> handlers.forEach(handler -> runHandler(handler, eventDetails))); } @@ -69,7 +65,7 @@ public void runGlobalHandlers(ProviderEvent event, EventDetails eventDetails) { * @param handler the handler function to run */ public void addClientHandler(String domain, ProviderEvent event, Consumer handler) { - final String name = Optional.ofNullable(domain).orElse(defaultClientUuid); + final String name = Optional.ofNullable(domain).orElse(DEFAULT_CLIENT_UUID); // lazily create and cache a HandlerStore if it doesn't exist HandlerStore store = Optional.ofNullable(this.handlerStores.get(name)).orElseGet(() -> { @@ -89,7 +85,7 @@ public void addClientHandler(String domain, ProviderEvent event, Consumer handler) { - domain = Optional.ofNullable(domain).orElse(defaultClientUuid); + domain = Optional.ofNullable(domain).orElse(DEFAULT_CLIENT_UUID); this.handlerStores.get(domain).removeHandler(event, handler); } @@ -160,14 +156,14 @@ public void shutdown() { // instantiated when a handler is added to that client. static class HandlerStore { - private final Map>> handlerMap; + private final Map>> handlerMap; HandlerStore() { handlerMap = new ConcurrentHashMap<>(); - handlerMap.put(ProviderEvent.PROVIDER_READY, new ArrayList<>()); - handlerMap.put(ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, new ArrayList<>()); - handlerMap.put(ProviderEvent.PROVIDER_ERROR, new ArrayList<>()); - handlerMap.put(ProviderEvent.PROVIDER_STALE, new ArrayList<>()); + handlerMap.put(ProviderEvent.PROVIDER_READY, new ConcurrentLinkedQueue<>()); + handlerMap.put(ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, new ConcurrentLinkedQueue<>()); + handlerMap.put(ProviderEvent.PROVIDER_ERROR, new ConcurrentLinkedQueue<>()); + handlerMap.put(ProviderEvent.PROVIDER_STALE, new ConcurrentLinkedQueue<>()); } void addHandler(ProviderEvent event, Consumer handler) { diff --git a/src/test/java/dev/openfeature/sdk/AwaitableTest.java b/src/test/java/dev/openfeature/sdk/AwaitableTest.java new file mode 100644 index 000000000..70ef7902c --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/AwaitableTest.java @@ -0,0 +1,75 @@ +package dev.openfeature.sdk; + +import static org.awaitility.Awaitility.await; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Timeout; + +@Timeout(value = 5, threadMode = Timeout.ThreadMode.SEPARATE_THREAD) +class AwaitableTest { + @Test + void waitingForFinishedIsANoOp() { + var startTime = System.currentTimeMillis(); + Awaitable.FINISHED.await(); + var endTime = System.currentTimeMillis(); + assertTrue(endTime - startTime < 10); + } + + @Test + void waitingForNotFinishedWaitsEvenWhenInterrupted() throws InterruptedException { + var awaitable = new Awaitable(); + var mayProceed = new AtomicBoolean(false); + + var thread = new Thread(() -> { + awaitable.await(); + if (!mayProceed.get()) { + fail(); + } + }); + thread.start(); + + var startTime = System.currentTimeMillis(); + do { + thread.interrupt(); + } while (startTime + 1000 > System.currentTimeMillis()); + mayProceed.set(true); + awaitable.wakeup(); + thread.join(); + } + + @Test + void callingWakeUpWakesUpAllWaitingThreads() throws InterruptedException { + var awaitable = new Awaitable(); + var isRunning = new AtomicInteger(); + + Runnable runnable = () -> { + isRunning.incrementAndGet(); + var start = System.currentTimeMillis(); + awaitable.await(); + var end = System.currentTimeMillis(); + if (end - start > 10) { + fail(); + } + }; + + var numThreads = 2; + var threads = new Thread[numThreads]; + for (int i = 0; i < numThreads; i++) { + threads[i] = new Thread(runnable); + threads[i].start(); + } + + await().atMost(1, TimeUnit.SECONDS).until(() -> isRunning.get() == numThreads); + + awaitable.wakeup(); + + for (int i = 0; i < numThreads; i++) { + threads[i].join(); + } + } +} diff --git a/src/test/java/dev/openfeature/sdk/DeveloperExperienceTest.java b/src/test/java/dev/openfeature/sdk/DeveloperExperienceTest.java index 32fa605c2..c954c8b19 100644 --- a/src/test/java/dev/openfeature/sdk/DeveloperExperienceTest.java +++ b/src/test/java/dev/openfeature/sdk/DeveloperExperienceTest.java @@ -150,7 +150,7 @@ void shouldPutTheProviderInStateErrorAfterEmittingErrorEvent() { api.setProviderAndWait(domain, provider); Client client = api.getClient(domain); assertThat(client.getProviderState()).isEqualTo(ProviderState.READY); - provider.emitProviderError(ProviderEventDetails.builder().build()); + provider.emitProviderError(ProviderEventDetails.builder().build()).await(); assertThat(client.getProviderState()).isEqualTo(ProviderState.ERROR); } @@ -165,7 +165,7 @@ void shouldPutTheProviderInStateStaleAfterEmittingStaleEvent() { api.setProviderAndWait(domain, provider); Client client = api.getClient(domain); assertThat(client.getProviderState()).isEqualTo(ProviderState.READY); - provider.emitProviderStale(ProviderEventDetails.builder().build()); + provider.emitProviderStale(ProviderEventDetails.builder().build()).await(); assertThat(client.getProviderState()).isEqualTo(ProviderState.STALE); } @@ -180,9 +180,9 @@ void shouldPutTheProviderInStateReadyAfterEmittingReadyEvent() { api.setProviderAndWait(domain, provider); Client client = api.getClient(domain); assertThat(client.getProviderState()).isEqualTo(ProviderState.READY); - provider.emitProviderStale(ProviderEventDetails.builder().build()); + provider.emitProviderStale(ProviderEventDetails.builder().build()).await(); assertThat(client.getProviderState()).isEqualTo(ProviderState.STALE); - provider.emitProviderReady(ProviderEventDetails.builder().build()); + provider.emitProviderReady(ProviderEventDetails.builder().build()).await(); assertThat(client.getProviderState()).isEqualTo(ProviderState.READY); } } diff --git a/src/test/java/dev/openfeature/sdk/EventProviderTest.java b/src/test/java/dev/openfeature/sdk/EventProviderTest.java index ebf8901cb..d04fa88d1 100644 --- a/src/test/java/dev/openfeature/sdk/EventProviderTest.java +++ b/src/test/java/dev/openfeature/sdk/EventProviderTest.java @@ -32,6 +32,7 @@ public static void resetDefaultProvider() { } @Test + @Timeout(value = 2, threadMode = Timeout.ThreadMode.SEPARATE_THREAD) @DisplayName("should run attached onEmit with emitters") void emitsEventsWhenAttached() { TriConsumer onEmit = mockOnEmit(); diff --git a/src/test/java/dev/openfeature/sdk/EventsTest.java b/src/test/java/dev/openfeature/sdk/EventsTest.java index 157c0bafe..b232f1177 100644 --- a/src/test/java/dev/openfeature/sdk/EventsTest.java +++ b/src/test/java/dev/openfeature/sdk/EventsTest.java @@ -24,7 +24,7 @@ class EventsTest { private OpenFeatureAPI api; @BeforeEach - public void setUp() throws Exception { + void setUp() { api = new OpenFeatureAPI(); } @@ -578,7 +578,7 @@ void shouldHaveAllProperties() { number = "5.3.3", text = "Handlers attached after the provider is already in the associated state, MUST run immediately.") void matchingReadyEventsMustRunImmediately() { - final String name = "matchingEventsMustRunImmediately"; + final String name = "matchingReadyEventsMustRunImmediately"; final Consumer handler = mockHandler(); // provider which is already ready @@ -597,14 +597,14 @@ void matchingReadyEventsMustRunImmediately() { number = "5.3.3", text = "Handlers attached after the provider is already in the associated state, MUST run immediately.") void matchingStaleEventsMustRunImmediately() { - final String name = "matchingEventsMustRunImmediately"; + final String name = "matchingStaleEventsMustRunImmediately"; final Consumer handler = mockHandler(); // provider which is already stale TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); Client client = api.getClient(name); api.setProviderAndWait(name, provider); - provider.emitProviderStale(ProviderEventDetails.builder().build()); + provider.emitProviderStale(ProviderEventDetails.builder().build()).await(); assertThat(client.getProviderState()).isEqualTo(ProviderState.STALE); // should run even though handler was added after stale @@ -618,14 +618,14 @@ void matchingStaleEventsMustRunImmediately() { number = "5.3.3", text = "Handlers attached after the provider is already in the associated state, MUST run immediately.") void matchingErrorEventsMustRunImmediately() { - final String name = "matchingEventsMustRunImmediately"; + final String name = "matchingErrorEventsMustRunImmediately"; final Consumer handler = mockHandler(); // provider which is already in error TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); Client client = api.getClient(name); api.setProviderAndWait(name, provider); - provider.emitProviderError(ProviderEventDetails.builder().build()); + provider.emitProviderError(ProviderEventDetails.builder().build()).await(); assertThat(client.getProviderState()).isEqualTo(ProviderState.ERROR); verify(handler, never()).accept(any()); diff --git a/src/test/java/dev/openfeature/sdk/providers/memory/InMemoryProviderTest.java b/src/test/java/dev/openfeature/sdk/providers/memory/InMemoryProviderTest.java index 4d2a8b287..970495940 100644 --- a/src/test/java/dev/openfeature/sdk/providers/memory/InMemoryProviderTest.java +++ b/src/test/java/dev/openfeature/sdk/providers/memory/InMemoryProviderTest.java @@ -3,9 +3,14 @@ import static dev.openfeature.sdk.Structure.mapToStructure; import static dev.openfeature.sdk.testutils.TestFlagsUtils.buildFlags; import static org.awaitility.Awaitility.await; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.argThat; -import static org.mockito.Mockito.*; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; import com.google.common.collect.ImmutableMap; import dev.openfeature.sdk.Client; @@ -19,6 +24,7 @@ import dev.openfeature.sdk.exceptions.TypeMismatchError; import java.util.HashMap; import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Consumer; import lombok.SneakyThrows; import org.junit.jupiter.api.BeforeEach; @@ -34,10 +40,11 @@ class InMemoryProviderTest { @SneakyThrows @BeforeEach void beforeEach() { + final var configChangedEventCounter = new AtomicInteger(); Map> flags = buildFlags(); provider = spy(new InMemoryProvider(flags)); api = OpenFeatureAPITestUtil.createAPI(); - api.onProviderConfigurationChanged(eventDetails -> {}); + api.onProviderConfigurationChanged(eventDetails -> configChangedEventCounter.incrementAndGet()); api.setProviderAndWait(provider); client = api.getClient(); provider.updateFlags(flags); @@ -48,6 +55,11 @@ void beforeEach() { .variant("off", false) .defaultVariant("on") .build()); + + // wait for the two config changed events to be fired, otherwise they could mess with our tests + while (configChangedEventCounter.get() < 2) { + Thread.sleep(1); + } } @Test From 0b57bcafc14b946000feb4a3421d73b9616e83cb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 11 Jun 2025 21:43:28 +0000 Subject: [PATCH 150/391] chore(deps): update github/codeql-action digest to 466d6ce (#1477) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index e3b4f4aca..5537d253f 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@7cb9b16051842e6c23c8b9fbcf92481f92d0644a + uses: github/codeql-action/init@466d6ce58447f9589003cca18ec288b128465541 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@7cb9b16051842e6c23c8b9fbcf92481f92d0644a + uses: github/codeql-action/analyze@466d6ce58447f9589003cca18ec288b128465541 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 55764e9bf..e3f9d39ca 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@7cb9b16051842e6c23c8b9fbcf92481f92d0644a + uses: github/codeql-action/init@466d6ce58447f9589003cca18ec288b128465541 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@7cb9b16051842e6c23c8b9fbcf92481f92d0644a + uses: github/codeql-action/autobuild@466d6ce58447f9589003cca18ec288b128465541 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@7cb9b16051842e6c23c8b9fbcf92481f92d0644a + uses: github/codeql-action/analyze@466d6ce58447f9589003cca18ec288b128465541 From 844d5e244b02703b624cf75e5bf8448c07e62d3d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 13 Jun 2025 18:52:24 +0000 Subject: [PATCH 151/391] chore(deps): update github/codeql-action digest to be30325 (#1479) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 5537d253f..5dfbb656f 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@466d6ce58447f9589003cca18ec288b128465541 + uses: github/codeql-action/init@be30325fa679497c9a67f006166793cfa1d5840d with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@466d6ce58447f9589003cca18ec288b128465541 + uses: github/codeql-action/analyze@be30325fa679497c9a67f006166793cfa1d5840d diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index e3f9d39ca..d0f39dafc 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@466d6ce58447f9589003cca18ec288b128465541 + uses: github/codeql-action/init@be30325fa679497c9a67f006166793cfa1d5840d with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@466d6ce58447f9589003cca18ec288b128465541 + uses: github/codeql-action/autobuild@be30325fa679497c9a67f006166793cfa1d5840d - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@466d6ce58447f9589003cca18ec288b128465541 + uses: github/codeql-action/analyze@be30325fa679497c9a67f006166793cfa1d5840d From 8e51e6fe101882184a5d09be31fa65563d82c673 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 18:37:11 +0200 Subject: [PATCH 152/391] chore(deps): update dependency net.bytebuddy:byte-buddy to v1.17.6 (#1482) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4f36c2689..664210c66 100644 --- a/pom.xml +++ b/pom.xml @@ -179,7 +179,7 @@ net.bytebuddy byte-buddy - 1.17.5 + 1.17.6 test From 99a3006de878ab0ba1f0e61a4cb5432914425795 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 16:44:00 +0000 Subject: [PATCH 153/391] chore(deps): update github/codeql-action digest to 3de706a (#1481) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 5dfbb656f..53d32e03f 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@be30325fa679497c9a67f006166793cfa1d5840d + uses: github/codeql-action/init@3de706a4a34b7e2fe37e4a10aecbdd3ec5dc0664 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@be30325fa679497c9a67f006166793cfa1d5840d + uses: github/codeql-action/analyze@3de706a4a34b7e2fe37e4a10aecbdd3ec5dc0664 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index d0f39dafc..b90bb964b 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@be30325fa679497c9a67f006166793cfa1d5840d + uses: github/codeql-action/init@3de706a4a34b7e2fe37e4a10aecbdd3ec5dc0664 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@be30325fa679497c9a67f006166793cfa1d5840d + uses: github/codeql-action/autobuild@3de706a4a34b7e2fe37e4a10aecbdd3ec5dc0664 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@be30325fa679497c9a67f006166793cfa1d5840d + uses: github/codeql-action/analyze@3de706a4a34b7e2fe37e4a10aecbdd3ec5dc0664 From 936ff60fac471a83a7c14412d2e825b2a7f9704c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 16:50:34 +0000 Subject: [PATCH 154/391] chore(deps): update dependency net.bytebuddy:byte-buddy-agent to v1.17.6 (#1483) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 664210c66..e7b875bfc 100644 --- a/pom.xml +++ b/pom.xml @@ -186,7 +186,7 @@ net.bytebuddy byte-buddy-agent - 1.17.5 + 1.17.6 test From 8bf777a7e99be4dfac8917b8e61cb6c23385b8ce Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 04:48:36 +0000 Subject: [PATCH 155/391] chore(deps): update github/codeql-action digest to ef36b69 (#1484) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 53d32e03f..440023909 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@3de706a4a34b7e2fe37e4a10aecbdd3ec5dc0664 + uses: github/codeql-action/init@ef36b69c6d7c22bd9d0183f534d82d47639dc745 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@3de706a4a34b7e2fe37e4a10aecbdd3ec5dc0664 + uses: github/codeql-action/analyze@ef36b69c6d7c22bd9d0183f534d82d47639dc745 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index b90bb964b..d914fe240 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@3de706a4a34b7e2fe37e4a10aecbdd3ec5dc0664 + uses: github/codeql-action/init@ef36b69c6d7c22bd9d0183f534d82d47639dc745 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@3de706a4a34b7e2fe37e4a10aecbdd3ec5dc0664 + uses: github/codeql-action/autobuild@ef36b69c6d7c22bd9d0183f534d82d47639dc745 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@3de706a4a34b7e2fe37e4a10aecbdd3ec5dc0664 + uses: github/codeql-action/analyze@ef36b69c6d7c22bd9d0183f534d82d47639dc745 From 7c2af57a362ee11f757a431ee17eff3ee448bf6c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 20:05:59 +0000 Subject: [PATCH 156/391] chore(deps): update actions/cache digest to 640a1c2 (#1485) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 77a649385..6e50995a9 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -33,7 +33,7 @@ jobs: server-password: ${{ secrets.OSSRH_PASSWORD }} - name: Cache local Maven repository - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@640a1c2554105b57832a23eea0b4672fc7a790d5 with: path: ~/.m2/repository key: ${{ runner.os }}-17-maven-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 440023909..6ad2a03e2 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -34,7 +34,7 @@ jobs: languages: java - name: Cache local Maven repository - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 + uses: actions/cache@640a1c2554105b57832a23eea0b4672fc7a790d5 with: path: ~/.m2/repository key: ${{ runner.os }}${{ matrix.build.java }}-maven-${{ hashFiles('**/pom.xml') }} From c3eaecdb8b34d3b33946bd205ee92d49584602bd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 01:25:24 +0000 Subject: [PATCH 157/391] chore(deps): update github/codeql-action digest to 66d7255 (#1487) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 6ad2a03e2..3ac011ce5 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@ef36b69c6d7c22bd9d0183f534d82d47639dc745 + uses: github/codeql-action/init@66d72553a22659994d73473ae27a699b25587b48 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ef36b69c6d7c22bd9d0183f534d82d47639dc745 + uses: github/codeql-action/analyze@66d72553a22659994d73473ae27a699b25587b48 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index d914fe240..478a26250 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@ef36b69c6d7c22bd9d0183f534d82d47639dc745 + uses: github/codeql-action/init@66d72553a22659994d73473ae27a699b25587b48 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@ef36b69c6d7c22bd9d0183f534d82d47639dc745 + uses: github/codeql-action/autobuild@66d72553a22659994d73473ae27a699b25587b48 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ef36b69c6d7c22bd9d0183f534d82d47639dc745 + uses: github/codeql-action/analyze@66d72553a22659994d73473ae27a699b25587b48 From 8fad544b17ee08b4280d7975073d00a874c374db Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 19:08:37 +0000 Subject: [PATCH 158/391] chore(deps): update github/codeql-action digest to ac30a39 (#1488) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 3ac011ce5..7622ecef2 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@66d72553a22659994d73473ae27a699b25587b48 + uses: github/codeql-action/init@ac30a39d8c6142a41d62949496fef51750e6f1bf with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@66d72553a22659994d73473ae27a699b25587b48 + uses: github/codeql-action/analyze@ac30a39d8c6142a41d62949496fef51750e6f1bf diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 478a26250..08811ea73 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@66d72553a22659994d73473ae27a699b25587b48 + uses: github/codeql-action/init@ac30a39d8c6142a41d62949496fef51750e6f1bf with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@66d72553a22659994d73473ae27a699b25587b48 + uses: github/codeql-action/autobuild@ac30a39d8c6142a41d62949496fef51750e6f1bf - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@66d72553a22659994d73473ae27a699b25587b48 + uses: github/codeql-action/analyze@ac30a39d8c6142a41d62949496fef51750e6f1bf From 312b6df5d2c891ac758bf398f8399ecd25b7597e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 21 Jun 2025 21:10:50 +0000 Subject: [PATCH 159/391] chore(deps): update dependency com.puppycrawl.tools:checkstyle to v10.25.1 (#1489) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e7b875bfc..67b4c5722 100644 --- a/pom.xml +++ b/pom.xml @@ -447,7 +447,7 @@ com.puppycrawl.tools checkstyle - 10.25.0 + 10.25.1 From e67f5983573afff805a56ef18584d1a7291ccafc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 22:42:58 +0000 Subject: [PATCH 160/391] chore(deps): update actions/setup-java digest to ebb356c (#1490) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 6e50995a9..37295eb31 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f - name: Set up JDK 17 - uses: actions/setup-java@f4f1212c880fdec8162ea9a6493f4495191887b4 + uses: actions/setup-java@ebb356cc4e59bcf94f518203228485f5d40e4b58 with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 7622ecef2..8defbae23 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f - name: Set up JDK 11 - uses: actions/setup-java@f4f1212c880fdec8162ea9a6493f4495191887b4 + uses: actions/setup-java@ebb356cc4e59bcf94f518203228485f5d40e4b58 with: java-version: ${{ matrix.build.java }} distribution: 'temurin' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 61df7d93e..53141b448 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f - name: Set up JDK 17 - uses: actions/setup-java@f4f1212c880fdec8162ea9a6493f4495191887b4 + uses: actions/setup-java@ebb356cc4e59bcf94f518203228485f5d40e4b58 with: java-version: '17' distribution: 'temurin' From 6f67b06f712c461f331681a76f5cb2c3ddb0d36b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 20:50:48 +0000 Subject: [PATCH 161/391] chore(deps): update github/codeql-action digest to 9b02dc2 (#1491) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 8defbae23..61ab2e54c 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@ac30a39d8c6142a41d62949496fef51750e6f1bf + uses: github/codeql-action/init@9b02dc2f60288b463e7a66e39c78829b62780db7 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ac30a39d8c6142a41d62949496fef51750e6f1bf + uses: github/codeql-action/analyze@9b02dc2f60288b463e7a66e39c78829b62780db7 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 08811ea73..7d113656c 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@ac30a39d8c6142a41d62949496fef51750e6f1bf + uses: github/codeql-action/init@9b02dc2f60288b463e7a66e39c78829b62780db7 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@ac30a39d8c6142a41d62949496fef51750e6f1bf + uses: github/codeql-action/autobuild@9b02dc2f60288b463e7a66e39c78829b62780db7 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ac30a39d8c6142a41d62949496fef51750e6f1bf + uses: github/codeql-action/analyze@9b02dc2f60288b463e7a66e39c78829b62780db7 From b64efe82d993defe070dfeb9aa60e740ccf757cd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 02:49:37 +0000 Subject: [PATCH 162/391] chore(deps): update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.9.3.1 (#1493) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 67b4c5722..e8c280551 100644 --- a/pom.xml +++ b/pom.xml @@ -403,7 +403,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.9.3.0 + 4.9.3.1 spotbugs-exclusions.xml From 300a705e0af959da7ed0e88e9975379ff6fc4138 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 08:32:52 +0200 Subject: [PATCH 163/391] chore(deps): update dependency com.puppycrawl.tools:checkstyle to v10.26.0 (#1494) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e8c280551..66443a758 100644 --- a/pom.xml +++ b/pom.xml @@ -447,7 +447,7 @@ com.puppycrawl.tools checkstyle - 10.25.1 + 10.26.0 From 34b22e8d93a986fdb81500ab539b4d2fe038b618 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 06:40:04 +0000 Subject: [PATCH 164/391] fix(deps): update dependency org.junit:junit-bom to v5.13.2 (#1492) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 66443a758..19740e671 100644 --- a/pom.xml +++ b/pom.xml @@ -202,7 +202,7 @@ org.junit junit-bom - 5.13.1 + 5.13.2 pom import From 86a5916f0dc6116b5b9e5dc897ff4b8705ac01e3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 14:54:48 +0200 Subject: [PATCH 165/391] chore(deps): update github/codeql-action digest to 8ef1782 (#1495) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 61ab2e54c..d6a3d81fd 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@9b02dc2f60288b463e7a66e39c78829b62780db7 + uses: github/codeql-action/init@8ef17824cfb2a3f40cbc7f41bac7e055e53b8164 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@9b02dc2f60288b463e7a66e39c78829b62780db7 + uses: github/codeql-action/analyze@8ef17824cfb2a3f40cbc7f41bac7e055e53b8164 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 7d113656c..bb4bc312e 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@9b02dc2f60288b463e7a66e39c78829b62780db7 + uses: github/codeql-action/init@8ef17824cfb2a3f40cbc7f41bac7e055e53b8164 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@9b02dc2f60288b463e7a66e39c78829b62780db7 + uses: github/codeql-action/autobuild@8ef17824cfb2a3f40cbc7f41bac7e055e53b8164 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@9b02dc2f60288b463e7a66e39c78829b62780db7 + uses: github/codeql-action/analyze@8ef17824cfb2a3f40cbc7f41bac7e055e53b8164 From fc430c3e1d57a532d8c0c879c3e7e25c46d4ad84 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 07:35:50 +0200 Subject: [PATCH 166/391] chore(deps): update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.9.3.2 (#1496) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 19740e671..0da829ac5 100644 --- a/pom.xml +++ b/pom.xml @@ -403,7 +403,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.9.3.1 + 4.9.3.2 spotbugs-exclusions.xml From 49214b7282ddde1ee16cf80f92c11cc90ef7612a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 23:59:31 +0000 Subject: [PATCH 167/391] chore(deps): update github/codeql-action digest to 4c57370 (#1497) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index d6a3d81fd..46af658f1 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@8ef17824cfb2a3f40cbc7f41bac7e055e53b8164 + uses: github/codeql-action/init@4c57370d0304fbff638216539f81d9163f77712a with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@8ef17824cfb2a3f40cbc7f41bac7e055e53b8164 + uses: github/codeql-action/analyze@4c57370d0304fbff638216539f81d9163f77712a diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index bb4bc312e..8a8f26944 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@8ef17824cfb2a3f40cbc7f41bac7e055e53b8164 + uses: github/codeql-action/init@4c57370d0304fbff638216539f81d9163f77712a with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@8ef17824cfb2a3f40cbc7f41bac7e055e53b8164 + uses: github/codeql-action/autobuild@4c57370d0304fbff638216539f81d9163f77712a - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@8ef17824cfb2a3f40cbc7f41bac7e055e53b8164 + uses: github/codeql-action/analyze@4c57370d0304fbff638216539f81d9163f77712a From 2e3b479cb1e8b0b65652ee813eaa2e1940d53c8e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 01:58:05 +0000 Subject: [PATCH 168/391] chore(deps): update dependency com.puppycrawl.tools:checkstyle to v10.26.1 (#1498) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0da829ac5..433487606 100644 --- a/pom.xml +++ b/pom.xml @@ -447,7 +447,7 @@ com.puppycrawl.tools checkstyle - 10.26.0 + 10.26.1 From 69519b1ef7274ceae39d6746c5a5a98dc69f562f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 20:37:12 +0000 Subject: [PATCH 169/391] chore(deps): update github/codeql-action digest to dcc1a66 (#1499) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 46af658f1..89def2ed2 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@4c57370d0304fbff638216539f81d9163f77712a + uses: github/codeql-action/init@dcc1a6637b570d406bec5125dce2e2157d914359 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@4c57370d0304fbff638216539f81d9163f77712a + uses: github/codeql-action/analyze@dcc1a6637b570d406bec5125dce2e2157d914359 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 8a8f26944..ca875406d 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@4c57370d0304fbff638216539f81d9163f77712a + uses: github/codeql-action/init@dcc1a6637b570d406bec5125dce2e2157d914359 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@4c57370d0304fbff638216539f81d9163f77712a + uses: github/codeql-action/autobuild@dcc1a6637b570d406bec5125dce2e2157d914359 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@4c57370d0304fbff638216539f81d9163f77712a + uses: github/codeql-action/analyze@dcc1a6637b570d406bec5125dce2e2157d914359 From 0515ad54c4f71863373eb1b7f429393923b27d90 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 13:05:20 +0200 Subject: [PATCH 170/391] chore(deps): update dependency org.apache.maven.plugins:maven-gpg-plugin to v3.2.8 (#1501) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 433487606..78f30389c 100644 --- a/pom.xml +++ b/pom.xml @@ -571,7 +571,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.2.7 + 3.2.8 sign-artifacts From 0fd9d3dcfb1fd65197a42885b12d40a1cc152d3b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 3 Jul 2025 00:11:36 +0000 Subject: [PATCH 171/391] chore(deps): update github/codeql-action digest to 33f8489 (#1502) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 89def2ed2..c2636fbe8 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@dcc1a6637b570d406bec5125dce2e2157d914359 + uses: github/codeql-action/init@33f84897c384aaa4dcd214fb006aaa3f0f2dc34a with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@dcc1a6637b570d406bec5125dce2e2157d914359 + uses: github/codeql-action/analyze@33f84897c384aaa4dcd214fb006aaa3f0f2dc34a diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index ca875406d..5e2b38a24 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@dcc1a6637b570d406bec5125dce2e2157d914359 + uses: github/codeql-action/init@33f84897c384aaa4dcd214fb006aaa3f0f2dc34a with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@dcc1a6637b570d406bec5125dce2e2157d914359 + uses: github/codeql-action/autobuild@33f84897c384aaa4dcd214fb006aaa3f0f2dc34a - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@dcc1a6637b570d406bec5125dce2e2157d914359 + uses: github/codeql-action/analyze@33f84897c384aaa4dcd214fb006aaa3f0f2dc34a From a5d1cbced4658fadb63f362b4512bdbd68ae7d6a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 3 Jul 2025 19:13:17 +0000 Subject: [PATCH 172/391] chore(deps): update github/codeql-action digest to b694213 (#1503) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index c2636fbe8..7acac6305 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@33f84897c384aaa4dcd214fb006aaa3f0f2dc34a + uses: github/codeql-action/init@b69421388d5449cc5a5e1ca344d71926bda69e07 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@33f84897c384aaa4dcd214fb006aaa3f0f2dc34a + uses: github/codeql-action/analyze@b69421388d5449cc5a5e1ca344d71926bda69e07 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 5e2b38a24..c210033e4 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@33f84897c384aaa4dcd214fb006aaa3f0f2dc34a + uses: github/codeql-action/init@b69421388d5449cc5a5e1ca344d71926bda69e07 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@33f84897c384aaa4dcd214fb006aaa3f0f2dc34a + uses: github/codeql-action/autobuild@b69421388d5449cc5a5e1ca344d71926bda69e07 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@33f84897c384aaa4dcd214fb006aaa3f0f2dc34a + uses: github/codeql-action/analyze@b69421388d5449cc5a5e1ca344d71926bda69e07 From 08f549afd1fd26581b2a8e063832ec986c5e3267 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 3 Jul 2025 23:29:05 +0000 Subject: [PATCH 173/391] chore(deps): update actions/setup-java digest to 67aec00 (#1504) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 37295eb31..d4684852d 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f - name: Set up JDK 17 - uses: actions/setup-java@ebb356cc4e59bcf94f518203228485f5d40e4b58 + uses: actions/setup-java@67aec007b3fcabe15ca665bfccc1e255dd52e30d with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 7acac6305..00cf0a525 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f - name: Set up JDK 11 - uses: actions/setup-java@ebb356cc4e59bcf94f518203228485f5d40e4b58 + uses: actions/setup-java@67aec007b3fcabe15ca665bfccc1e255dd52e30d with: java-version: ${{ matrix.build.java }} distribution: 'temurin' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 53141b448..baf5b5bbb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f - name: Set up JDK 17 - uses: actions/setup-java@ebb356cc4e59bcf94f518203228485f5d40e4b58 + uses: actions/setup-java@67aec007b3fcabe15ca665bfccc1e255dd52e30d with: java-version: '17' distribution: 'temurin' From ebea0fdf1cf3e6f4d2e8aebf2dcb7c7e1f31acc2 Mon Sep 17 00:00:00 2001 From: chrfwow Date: Fri, 4 Jul 2025 15:17:56 +0200 Subject: [PATCH 174/391] fix: Reduce locking and concurrency issues (#1478) * Reduce locking and concurrency issues Signed-off-by: christian.lutnik * Reduce locking and concurrency issues Signed-off-by: christian.lutnik * formatting Signed-off-by: christian.lutnik * use concurrent data structure for hooks Signed-off-by: christian.lutnik * use concurrent data structure for hooks Signed-off-by: christian.lutnik --------- Signed-off-by: christian.lutnik Co-authored-by: Todd Baert --- .../dev/openfeature/sdk/OpenFeatureAPI.java | 82 +++++++++---------- .../openfeature/sdk/OpenFeatureClient.java | 54 ++++++------ .../openfeature/sdk/internal/ObjectUtils.java | 5 +- .../openfeature/sdk/LockingSingeltonTest.java | 55 ------------- 4 files changed, 67 insertions(+), 129 deletions(-) diff --git a/src/main/java/dev/openfeature/sdk/OpenFeatureAPI.java b/src/main/java/dev/openfeature/sdk/OpenFeatureAPI.java index 66d40736f..6d0d8feb4 100644 --- a/src/main/java/dev/openfeature/sdk/OpenFeatureAPI.java +++ b/src/main/java/dev/openfeature/sdk/OpenFeatureAPI.java @@ -5,9 +5,12 @@ import dev.openfeature.sdk.internal.AutoCloseableReentrantReadWriteLock; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; import java.util.List; import java.util.Optional; import java.util.Set; +import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; import lombok.extern.slf4j.Slf4j; @@ -21,14 +24,14 @@ public class OpenFeatureAPI implements EventBus { // package-private multi-read/single-write lock static AutoCloseableReentrantReadWriteLock lock = new AutoCloseableReentrantReadWriteLock(); - private final List apiHooks; + private final ConcurrentLinkedQueue apiHooks; private ProviderRepository providerRepository; private EventSupport eventSupport; - private EvaluationContext evaluationContext; + private final AtomicReference evaluationContext = new AtomicReference<>(); private TransactionContextPropagator transactionContextPropagator; protected OpenFeatureAPI() { - apiHooks = new ArrayList<>(); + apiHooks = new ConcurrentLinkedQueue<>(); providerRepository = new ProviderRepository(this); eventSupport = new EventSupport(); transactionContextPropagator = new NoOpTransactionContextPropagator(); @@ -115,9 +118,7 @@ public Client getClient(String domain, String version) { * @return api instance */ public OpenFeatureAPI setEvaluationContext(EvaluationContext evaluationContext) { - try (AutoCloseableLock __ = lock.writeLockAutoCloseable()) { - this.evaluationContext = evaluationContext; - } + this.evaluationContext.set(evaluationContext); return this; } @@ -127,16 +128,14 @@ public OpenFeatureAPI setEvaluationContext(EvaluationContext evaluationContext) * @return evaluation context */ public EvaluationContext getEvaluationContext() { - try (AutoCloseableLock __ = lock.readLockAutoCloseable()) { - return this.evaluationContext; - } + return evaluationContext.get(); } /** * Return the transaction context propagator. */ public TransactionContextPropagator getTransactionContextPropagator() { - try (AutoCloseableLock __ = lock.readLockAutoCloseable()) { + try (AutoCloseableLock ignored = lock.readLockAutoCloseable()) { return this.transactionContextPropagator; } } @@ -150,7 +149,7 @@ public void setTransactionContextPropagator(TransactionContextPropagator transac if (transactionContextPropagator == null) { throw new IllegalArgumentException("Transaction context propagator cannot be null"); } - try (AutoCloseableLock __ = lock.writeLockAutoCloseable()) { + try (AutoCloseableLock ignored = lock.writeLockAutoCloseable()) { this.transactionContextPropagator = transactionContextPropagator; } } @@ -176,7 +175,7 @@ public void setTransactionContext(EvaluationContext evaluationContext) { * Set the default provider. */ public void setProvider(FeatureProvider provider) { - try (AutoCloseableLock __ = lock.writeLockAutoCloseable()) { + try (AutoCloseableLock ignored = lock.writeLockAutoCloseable()) { providerRepository.setProvider( provider, this::attachEventProvider, @@ -194,7 +193,7 @@ public void setProvider(FeatureProvider provider) { * @param provider The provider to set. */ public void setProvider(String domain, FeatureProvider provider) { - try (AutoCloseableLock __ = lock.writeLockAutoCloseable()) { + try (AutoCloseableLock ignored = lock.writeLockAutoCloseable()) { providerRepository.setProvider( domain, provider, @@ -216,7 +215,7 @@ public void setProvider(String domain, FeatureProvider provider) { * @throws OpenFeatureError if the provider fails during initialization. */ public void setProviderAndWait(FeatureProvider provider) throws OpenFeatureError { - try (AutoCloseableLock __ = lock.writeLockAutoCloseable()) { + try (AutoCloseableLock ignored = lock.writeLockAutoCloseable()) { providerRepository.setProvider( provider, this::attachEventProvider, @@ -238,7 +237,7 @@ public void setProviderAndWait(FeatureProvider provider) throws OpenFeatureError * @throws OpenFeatureError if the provider fails during initialization. */ public void setProviderAndWait(String domain, FeatureProvider provider) throws OpenFeatureError { - try (AutoCloseableLock __ = lock.writeLockAutoCloseable()) { + try (AutoCloseableLock ignored = lock.writeLockAutoCloseable()) { providerRepository.setProvider( domain, provider, @@ -252,9 +251,7 @@ public void setProviderAndWait(String domain, FeatureProvider provider) throws O private void attachEventProvider(FeatureProvider provider) { if (provider instanceof EventProvider) { - ((EventProvider) provider).attach((p, event, details) -> { - runHandlersForProvider(p, event, details); - }); + ((EventProvider) provider).attach(this::runHandlersForProvider); } } @@ -307,9 +304,7 @@ public FeatureProvider getProvider(String domain) { * @param hooks The hook to add. */ public void addHooks(Hook... hooks) { - try (AutoCloseableLock __ = lock.writeLockAutoCloseable()) { - this.apiHooks.addAll(Arrays.asList(hooks)); - } + this.apiHooks.addAll(Arrays.asList(hooks)); } /** @@ -318,18 +313,23 @@ public void addHooks(Hook... hooks) { * @return A list of {@link Hook}s. */ public List getHooks() { - try (AutoCloseableLock __ = lock.readLockAutoCloseable()) { - return this.apiHooks; - } + return new ArrayList<>(this.apiHooks); + } + + /** + * Returns a reference to the collection of {@link Hook}s. + * + * @return The collection of {@link Hook}s. + */ + Collection getMutableHooks() { + return this.apiHooks; } /** * Removes all hooks. */ public void clearHooks() { - try (AutoCloseableLock __ = lock.writeLockAutoCloseable()) { - this.apiHooks.clear(); - } + this.apiHooks.clear(); } /** @@ -339,7 +339,7 @@ public void clearHooks() { * Once shut down is complete, API is reset and ready to use again. */ public void shutdown() { - try (AutoCloseableLock __ = lock.writeLockAutoCloseable()) { + try (AutoCloseableLock ignored = lock.writeLockAutoCloseable()) { providerRepository.shutdown(); eventSupport.shutdown(); @@ -385,7 +385,7 @@ public OpenFeatureAPI onProviderError(Consumer handler) { */ @Override public OpenFeatureAPI on(ProviderEvent event, Consumer handler) { - try (AutoCloseableLock __ = lock.writeLockAutoCloseable()) { + try (AutoCloseableLock ignored = lock.writeLockAutoCloseable()) { this.eventSupport.addGlobalHandler(event, handler); return this; } @@ -396,18 +396,20 @@ public OpenFeatureAPI on(ProviderEvent event, Consumer handler) { */ @Override public OpenFeatureAPI removeHandler(ProviderEvent event, Consumer handler) { - this.eventSupport.removeGlobalHandler(event, handler); + try (AutoCloseableLock ignored = lock.writeLockAutoCloseable()) { + this.eventSupport.removeGlobalHandler(event, handler); + } return this; } void removeHandler(String domain, ProviderEvent event, Consumer handler) { - try (AutoCloseableLock __ = lock.writeLockAutoCloseable()) { + try (AutoCloseableLock ignored = lock.writeLockAutoCloseable()) { eventSupport.removeClientHandler(domain, event, handler); } } void addHandler(String domain, ProviderEvent event, Consumer handler) { - try (AutoCloseableLock __ = lock.writeLockAutoCloseable()) { + try (AutoCloseableLock ignored = lock.writeLockAutoCloseable()) { // if the provider is in the state associated with event, run immediately if (Optional.ofNullable(this.providerRepository.getProviderState(domain)) .orElse(ProviderState.READY) @@ -431,32 +433,28 @@ FeatureProviderStateManager getFeatureProviderStateManager(String domain) { * @param details the event details */ private void runHandlersForProvider(FeatureProvider provider, ProviderEvent event, ProviderEventDetails details) { - try (AutoCloseableLock __ = lock.readLockAutoCloseable()) { + try (AutoCloseableLock ignored = lock.readLockAutoCloseable()) { List domainsForProvider = providerRepository.getDomainsForProvider(provider); final String providerName = Optional.ofNullable(provider.getMetadata()) - .map(metadata -> metadata.getName()) + .map(Metadata::getName) .orElse(null); // run the global handlers eventSupport.runGlobalHandlers(event, EventDetails.fromProviderEventDetails(details, providerName)); // run the handlers associated with domains for this provider - domainsForProvider.forEach(domain -> { - eventSupport.runClientHandlers( - domain, event, EventDetails.fromProviderEventDetails(details, providerName, domain)); - }); + domainsForProvider.forEach(domain -> eventSupport.runClientHandlers( + domain, event, EventDetails.fromProviderEventDetails(details, providerName, domain))); if (providerRepository.isDefaultProvider(provider)) { // run handlers for clients that have no bound providers (since this is the default) Set allDomainNames = eventSupport.getAllDomainNames(); Set boundDomains = providerRepository.getAllBoundDomains(); allDomainNames.removeAll(boundDomains); - allDomainNames.forEach(domain -> { - eventSupport.runClientHandlers( - domain, event, EventDetails.fromProviderEventDetails(details, providerName, domain)); - }); + allDomainNames.forEach(domain -> eventSupport.runClientHandlers( + domain, event, EventDetails.fromProviderEventDetails(details, providerName, domain))); } } } diff --git a/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java b/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java index e68d28f79..b5522b66a 100644 --- a/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java +++ b/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java @@ -5,9 +5,8 @@ import dev.openfeature.sdk.exceptions.GeneralError; import dev.openfeature.sdk.exceptions.OpenFeatureError; import dev.openfeature.sdk.exceptions.ProviderNotReadyError; -import dev.openfeature.sdk.internal.AutoCloseableLock; -import dev.openfeature.sdk.internal.AutoCloseableReentrantReadWriteLock; import dev.openfeature.sdk.internal.ObjectUtils; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -15,6 +14,8 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; import lombok.Getter; import lombok.extern.slf4j.Slf4j; @@ -46,11 +47,9 @@ public class OpenFeatureClient implements Client { @Getter private final String version; - private final List clientHooks; + private final ConcurrentLinkedQueue clientHooks; private final HookSupport hookSupport; - AutoCloseableReentrantReadWriteLock hooksLock = new AutoCloseableReentrantReadWriteLock(); - AutoCloseableReentrantReadWriteLock contextLock = new AutoCloseableReentrantReadWriteLock(); - private EvaluationContext evaluationContext; + private final AtomicReference evaluationContext = new AtomicReference<>(); /** * Deprecated public constructor. Use OpenFeature.API.getClient() instead. @@ -68,7 +67,7 @@ public OpenFeatureClient(OpenFeatureAPI openFeatureAPI, String domain, String ve this.openfeatureApi = openFeatureAPI; this.domain = domain; this.version = version; - this.clientHooks = new ArrayList<>(); + this.clientHooks = new ConcurrentLinkedQueue<>(); this.hookSupport = new HookSupport(); } @@ -125,9 +124,7 @@ public void track(String trackingEventName, EvaluationContext context, TrackingE */ @Override public OpenFeatureClient addHooks(Hook... hooks) { - try (AutoCloseableLock __ = this.hooksLock.writeLockAutoCloseable()) { - this.clientHooks.addAll(Arrays.asList(hooks)); - } + this.clientHooks.addAll(Arrays.asList(hooks)); return this; } @@ -136,9 +133,7 @@ public OpenFeatureClient addHooks(Hook... hooks) { */ @Override public List getHooks() { - try (AutoCloseableLock __ = this.hooksLock.readLockAutoCloseable()) { - return this.clientHooks; - } + return new ArrayList<>(this.clientHooks); } /** @@ -146,9 +141,7 @@ public List getHooks() { */ @Override public OpenFeatureClient setEvaluationContext(EvaluationContext evaluationContext) { - try (AutoCloseableLock __ = contextLock.writeLockAutoCloseable()) { - this.evaluationContext = evaluationContext; - } + this.evaluationContext.set(evaluationContext); return this; } @@ -157,32 +150,33 @@ public OpenFeatureClient setEvaluationContext(EvaluationContext evaluationContex */ @Override public EvaluationContext getEvaluationContext() { - try (AutoCloseableLock __ = contextLock.readLockAutoCloseable()) { - return this.evaluationContext; - } + return this.evaluationContext.get(); } + @SuppressFBWarnings( + value = {"REC_CATCH_EXCEPTION"}, + justification = "We don't want to allow any exception to reach the user. " + + "Instead, we return an evaluation result with the appropriate error code.") private FlagEvaluationDetails evaluateFlag( FlagValueType type, String key, T defaultValue, EvaluationContext ctx, FlagEvaluationOptions options) { - FlagEvaluationOptions flagOptions = ObjectUtils.defaultIfNull( + var flagOptions = ObjectUtils.defaultIfNull( options, () -> FlagEvaluationOptions.builder().build()); - Map hints = Collections.unmodifiableMap(flagOptions.getHookHints()); + var hints = Collections.unmodifiableMap(flagOptions.getHookHints()); FlagEvaluationDetails details = null; List mergedHooks = null; HookContext afterHookContext = null; - FeatureProvider provider; try { - FeatureProviderStateManager stateManager = openfeatureApi.getFeatureProviderStateManager(this.domain); + var stateManager = openfeatureApi.getFeatureProviderStateManager(this.domain); // provider must be accessed once to maintain a consistent reference - provider = stateManager.getProvider(); - ProviderState state = stateManager.getState(); + var provider = stateManager.getProvider(); + var state = stateManager.getState(); mergedHooks = ObjectUtils.merge( - provider.getProviderHooks(), flagOptions.getHooks(), clientHooks, openfeatureApi.getHooks()); + provider.getProviderHooks(), flagOptions.getHooks(), clientHooks, openfeatureApi.getMutableHooks()); - EvaluationContext mergedCtx = hookSupport.beforeHooks( + var mergedCtx = hookSupport.beforeHooks( type, HookContext.from( key, @@ -205,12 +199,12 @@ private FlagEvaluationDetails evaluateFlag( throw new FatalError("Provider is in an irrecoverable error state"); } - ProviderEvaluation providerEval = + var providerEval = (ProviderEvaluation) createProviderEvaluation(type, key, defaultValue, provider, mergedCtx); details = FlagEvaluationDetails.from(providerEval, key); if (details.getErrorCode() != null) { - OpenFeatureError error = + var error = ExceptionUtils.instantiateErrorByErrorCode(details.getErrorCode(), details.getErrorMessage()); enrichDetailsWithErrorDefaults(defaultValue, details); hookSupport.errorHooks(type, afterHookContext, error, mergedHooks, hints); @@ -264,7 +258,7 @@ private void invokeTrack(String trackingEventName, EvaluationContext context, Tr */ private EvaluationContext mergeEvaluationContext(EvaluationContext invocationContext) { final EvaluationContext apiContext = openfeatureApi.getEvaluationContext(); - final EvaluationContext clientContext = this.getEvaluationContext(); + final EvaluationContext clientContext = evaluationContext.get(); final EvaluationContext transactionContext = openfeatureApi.getTransactionContext(); return mergeContextMaps(apiContext, transactionContext, clientContext, invocationContext); } diff --git a/src/main/java/dev/openfeature/sdk/internal/ObjectUtils.java b/src/main/java/dev/openfeature/sdk/internal/ObjectUtils.java index b367820c2..86a9ddd70 100644 --- a/src/main/java/dev/openfeature/sdk/internal/ObjectUtils.java +++ b/src/main/java/dev/openfeature/sdk/internal/ObjectUtils.java @@ -1,6 +1,7 @@ package dev.openfeature.sdk.internal; import java.util.ArrayList; +import java.util.Collection; import java.util.List; import java.util.Map; import java.util.function.Supplier; @@ -64,9 +65,9 @@ public static T defaultIfNull(T source, Supplier defaultValue) { * @return resulting object */ @SafeVarargs - public static List merge(List... sources) { + public static List merge(Collection... sources) { List merged = new ArrayList<>(); - for (List source : sources) { + for (Collection source : sources) { merged.addAll(source); } return merged; diff --git a/src/test/java/dev/openfeature/sdk/LockingSingeltonTest.java b/src/test/java/dev/openfeature/sdk/LockingSingeltonTest.java index ad86f4bc3..ae3246cae 100644 --- a/src/test/java/dev/openfeature/sdk/LockingSingeltonTest.java +++ b/src/test/java/dev/openfeature/sdk/LockingSingeltonTest.java @@ -20,7 +20,6 @@ class LockingSingeltonTest { private static OpenFeatureAPI api; private OpenFeatureClient client; private AutoCloseableReentrantReadWriteLock apiLock; - private AutoCloseableReentrantReadWriteLock clientContextLock; private AutoCloseableReentrantReadWriteLock clientHooksLock; @BeforeAll @@ -36,10 +35,7 @@ void beforeEach() { apiLock = setupLock(apiLock, mockInnerReadLock(), mockInnerWriteLock()); OpenFeatureAPI.lock = apiLock; - clientContextLock = setupLock(clientContextLock, mockInnerReadLock(), mockInnerWriteLock()); clientHooksLock = setupLock(clientHooksLock, mockInnerReadLock(), mockInnerWriteLock()); - client.contextLock = clientContextLock; - client.hooksLock = clientHooksLock; } @Nested @@ -137,50 +133,6 @@ void onProviderErrorProviderReadyShouldApiWriteLockAndUnlock() { } } - @Test - void addHooksShouldWriteLockAndUnlock() { - client.addHooks(new Hook() {}); - verify(clientHooksLock.writeLock()).lock(); - verify(clientHooksLock.writeLock()).unlock(); - - api.addHooks(new Hook() {}); - verify(apiLock.writeLock()).lock(); - verify(apiLock.writeLock()).unlock(); - } - - @Test - void getHooksShouldReadLockAndUnlock() { - client.getHooks(); - verify(clientHooksLock.readLock()).lock(); - verify(clientHooksLock.readLock()).unlock(); - - api.getHooks(); - verify(apiLock.readLock()).lock(); - verify(apiLock.readLock()).unlock(); - } - - @Test - void setContextShouldWriteLockAndUnlock() { - client.setEvaluationContext(new ImmutableContext()); - verify(clientContextLock.writeLock()).lock(); - verify(clientContextLock.writeLock()).unlock(); - - api.setEvaluationContext(new ImmutableContext()); - verify(apiLock.writeLock()).lock(); - verify(apiLock.writeLock()).unlock(); - } - - @Test - void getContextShouldReadLockAndUnlock() { - client.getEvaluationContext(); - verify(clientContextLock.readLock()).lock(); - verify(clientContextLock.readLock()).unlock(); - - api.getEvaluationContext(); - verify(apiLock.readLock()).lock(); - verify(apiLock.readLock()).unlock(); - } - @Test void setTransactionalContextPropagatorShouldWriteLockAndUnlock() { api.setTransactionContextPropagator(new NoOpTransactionContextPropagator()); @@ -195,13 +147,6 @@ void getTransactionalContextPropagatorShouldReadLockAndUnlock() { verify(apiLock.readLock()).unlock(); } - @Test - void clearHooksShouldWriteLockAndUnlock() { - api.clearHooks(); - verify(apiLock.writeLock()).lock(); - verify(apiLock.writeLock()).unlock(); - } - private static ReentrantReadWriteLock.ReadLock mockInnerReadLock() { ReentrantReadWriteLock.ReadLock readLockMock = mock(ReentrantReadWriteLock.ReadLock.class); doNothing().when(readLockMock).lock(); From 957c0d1ba38ecc758c1ec164e40070ac93a01d68 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 4 Jul 2025 19:37:31 +0000 Subject: [PATCH 175/391] fix(deps): update dependency org.junit:junit-bom to v5.13.3 (#1505) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 78f30389c..409c08fdd 100644 --- a/pom.xml +++ b/pom.xml @@ -202,7 +202,7 @@ org.junit junit-bom - 5.13.2 + 5.13.3 pom import From 5425a34a12baa04f9583b83fd1bfdd7e2a6ab5e8 Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Mon, 7 Jul 2025 14:30:18 -0400 Subject: [PATCH 176/391] chore: migrate to new publish Signed-off-by: Todd Baert --- pom.xml | 15 +++++++-------- release/m2-settings.xml | 5 +++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 409c08fdd..85107f93d 100644 --- a/pom.xml +++ b/pom.xml @@ -520,14 +520,13 @@ - org.sonatype.plugins - nexus-staging-maven-plugin - 1.7.0 + org.sonatype.central + central-publishing-maven-plugin + 0.8.0 true - ossrh - https://s01.oss.sonatype.org/ - true + central + true @@ -711,8 +710,8 @@ - ossrh - https://s01.oss.sonatype.org/content/repositories/snapshots + central + https://central.sonatype.com/repository/maven-snapshots/ diff --git a/release/m2-settings.xml b/release/m2-settings.xml index 9b7a585a3..517375160 100644 --- a/release/m2-settings.xml +++ b/release/m2-settings.xml @@ -5,5 +5,10 @@ ${env.OSSRH_USERNAME} ${env.OSSRH_PASSWORD} + + central + ${env.CENTRAL_USERNAME} + ${env.CENTRAL_PASSWORD} + From 6194186b3e791f3cb28da24f5acb3ff96788d65e Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Mon, 7 Jul 2025 14:39:17 -0400 Subject: [PATCH 177/391] chore: skip tests on publish Signed-off-by: Todd Baert --- .github/workflows/merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index d4684852d..07aec6ada 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -65,7 +65,7 @@ jobs: - name: Deploy run: | mvn --batch-mode \ - --settings release/m2-settings.xml clean deploy + --settings release/m2-settings.xml -DskipTests clean deploy env: OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} From 85d89ee79a52d960322731fb786c0f60245f0d75 Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Mon, 7 Jul 2025 14:42:51 -0400 Subject: [PATCH 178/391] chore: update publish env vars Signed-off-by: Todd Baert --- .github/workflows/merge.yml | 10 +++++----- .github/workflows/release.yml | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 07aec6ada..ccf09bac5 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -28,9 +28,9 @@ jobs: java-version: '17' distribution: 'temurin' cache: maven - server-id: ossrh - server-username: ${{ secrets.OSSRH_USERNAME }} - server-password: ${{ secrets.OSSRH_PASSWORD }} + server-id: central + server-username: ${{ secrets.CENTRAL_USERNAME }} + server-password: ${{ secrets.CENTRAL_PASSWORD }} - name: Cache local Maven repository uses: actions/cache@640a1c2554105b57832a23eea0b4672fc7a790d5 @@ -67,5 +67,5 @@ jobs: mvn --batch-mode \ --settings release/m2-settings.xml -DskipTests clean deploy env: - OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} - OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} + CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index baf5b5bbb..fcdee10f2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,9 +45,9 @@ jobs: java-version: '17' distribution: 'temurin' cache: maven - server-id: ossrh - server-username: ${{ secrets.OSSRH_USERNAME }} - server-password: ${{ secrets.OSSRH_PASSWORD }} + server-id: central + server-username: ${{ secrets.CENTRAL_USERNAME }} + server-password: ${{ secrets.CENTRAL_PASSWORD }} - name: Configure GPG Key run: | @@ -60,5 +60,5 @@ jobs: mvn --batch-mode \ --settings release/m2-settings.xml -DskipTests clean deploy env: - OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} - OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} + CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }} From d2b1dc3a41fbec371c443a123d2b83b6a17a477b Mon Sep 17 00:00:00 2001 From: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Date: Mon, 7 Jul 2025 14:54:59 -0400 Subject: [PATCH 179/391] chore(main): release 1.16.0 (#1452) Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 69 +++++++++++++++++++++++++++++++++++ README.md | 8 ++-- pom.xml | 2 +- version.txt | 2 +- 5 files changed, 76 insertions(+), 7 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8c4a75878..8997e1812 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{".":"1.15.1"} +{".":"1.16.0"} diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d2871346..2529b1871 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,74 @@ # Changelog +## [1.16.0](https://github.com/open-feature/java-sdk/compare/v1.15.1...v1.16.0) (2025-07-07) + + +### ๐Ÿ› Bug Fixes + +* **deps:** update dependency io.cucumber:cucumber-bom to v7.23.0 ([#1466](https://github.com/open-feature/java-sdk/issues/1466)) ([50a6b16](https://github.com/open-feature/java-sdk/commit/50a6b168a7de40337aa51ef3d79d122030956cb9)) +* **deps:** update dependency org.junit:junit-bom to v5.13.1 ([#1475](https://github.com/open-feature/java-sdk/issues/1475)) ([545d6aa](https://github.com/open-feature/java-sdk/commit/545d6aac09dbc74c00a0a4e5c26f4ef80be22379)) +* **deps:** update dependency org.junit:junit-bom to v5.13.2 ([#1492](https://github.com/open-feature/java-sdk/issues/1492)) ([34b22e8](https://github.com/open-feature/java-sdk/commit/34b22e8d93a986fdb81500ab539b4d2fe038b618)) +* **deps:** update dependency org.junit:junit-bom to v5.13.3 ([#1505](https://github.com/open-feature/java-sdk/issues/1505)) ([957c0d1](https://github.com/open-feature/java-sdk/commit/957c0d1ba38ecc758c1ec164e40070ac93a01d68)) +* **deps:** update junit5 monorepo ([#1467](https://github.com/open-feature/java-sdk/issues/1467)) ([f8260a1](https://github.com/open-feature/java-sdk/commit/f8260a1c3a345c877eba95bfe41184ad11f6555e)) +* Reduce locking and concurrency issues ([#1478](https://github.com/open-feature/java-sdk/issues/1478)) ([ebea0fd](https://github.com/open-feature/java-sdk/commit/ebea0fdf1cf3e6f4d2e8aebf2dcb7c7e1f31acc2)) + + +### โœจ New Features + +* add means of awaiting event emission, fix flaky build ([#1463](https://github.com/open-feature/java-sdk/issues/1463)) ([3dd7d5d](https://github.com/open-feature/java-sdk/commit/3dd7d5d4262f1f4461e13c13a7d64d2fa8bfd764)), closes [#1449](https://github.com/open-feature/java-sdk/issues/1449) + + +### ๐Ÿงน Chore + +* **deps:** update actions/cache digest to 640a1c2 ([#1485](https://github.com/open-feature/java-sdk/issues/1485)) ([7c2af57](https://github.com/open-feature/java-sdk/commit/7c2af57a362ee11f757a431ee17eff3ee448bf6c)) +* **deps:** update actions/checkout digest to 09d2aca ([#1473](https://github.com/open-feature/java-sdk/issues/1473)) ([b5d873e](https://github.com/open-feature/java-sdk/commit/b5d873e44d3c41b42f11569b0fafccc0a002ebdd)) +* **deps:** update actions/setup-java digest to 67aec00 ([#1504](https://github.com/open-feature/java-sdk/issues/1504)) ([08f549a](https://github.com/open-feature/java-sdk/commit/08f549afd1fd26581b2a8e063832ec986c5e3267)) +* **deps:** update actions/setup-java digest to ebb356c ([#1490](https://github.com/open-feature/java-sdk/issues/1490)) ([e67f598](https://github.com/open-feature/java-sdk/commit/e67f5983573afff805a56ef18584d1a7291ccafc)) +* **deps:** update codecov/codecov-action action to v5.4.3 ([#1454](https://github.com/open-feature/java-sdk/issues/1454)) ([e337939](https://github.com/open-feature/java-sdk/commit/e3379395e6bfb0ce811d8372761a3cb015ad2cde)) +* **deps:** update dependency com.diffplug.spotless:spotless-maven-plugin to v2.44.5 ([#1462](https://github.com/open-feature/java-sdk/issues/1462)) ([40b319c](https://github.com/open-feature/java-sdk/commit/40b319c5de0461bec13f76978ae09edc958310cd)) +* **deps:** update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.9.3.1 ([#1493](https://github.com/open-feature/java-sdk/issues/1493)) ([b64efe8](https://github.com/open-feature/java-sdk/commit/b64efe82d993defe070dfeb9aa60e740ccf757cd)) +* **deps:** update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.9.3.2 ([#1496](https://github.com/open-feature/java-sdk/issues/1496)) ([fc430c3](https://github.com/open-feature/java-sdk/commit/fc430c3e1d57a532d8c0c879c3e7e25c46d4ad84)) +* **deps:** update dependency com.puppycrawl.tools:checkstyle to v10.24.0 ([#1458](https://github.com/open-feature/java-sdk/issues/1458)) ([dcbfd26](https://github.com/open-feature/java-sdk/commit/dcbfd265a3875271695af760fce9870e53c69f13)) +* **deps:** update dependency com.puppycrawl.tools:checkstyle to v10.25.0 ([#1468](https://github.com/open-feature/java-sdk/issues/1468)) ([1558a86](https://github.com/open-feature/java-sdk/commit/1558a862497c0e133d11d53ff6d7f28437653d43)) +* **deps:** update dependency com.puppycrawl.tools:checkstyle to v10.25.1 ([#1489](https://github.com/open-feature/java-sdk/issues/1489)) ([312b6df](https://github.com/open-feature/java-sdk/commit/312b6df5d2c891ac758bf398f8399ecd25b7597e)) +* **deps:** update dependency com.puppycrawl.tools:checkstyle to v10.26.0 ([#1494](https://github.com/open-feature/java-sdk/issues/1494)) ([300a705](https://github.com/open-feature/java-sdk/commit/300a705e0af959da7ed0e88e9975379ff6fc4138)) +* **deps:** update dependency com.puppycrawl.tools:checkstyle to v10.26.1 ([#1498](https://github.com/open-feature/java-sdk/issues/1498)) ([2e3b479](https://github.com/open-feature/java-sdk/commit/2e3b479cb1e8b0b65652ee813eaa2e1940d53c8e)) +* **deps:** update dependency maven to v3.9.10 ([#1474](https://github.com/open-feature/java-sdk/issues/1474)) ([4481537](https://github.com/open-feature/java-sdk/commit/4481537cebc213dcfe19bb8cd9b70a4c91a682b2)) +* **deps:** update dependency net.bytebuddy:byte-buddy to v1.17.6 ([#1482](https://github.com/open-feature/java-sdk/issues/1482)) ([8e51e6f](https://github.com/open-feature/java-sdk/commit/8e51e6fe101882184a5d09be31fa65563d82c673)) +* **deps:** update dependency net.bytebuddy:byte-buddy-agent to v1.17.6 ([#1483](https://github.com/open-feature/java-sdk/issues/1483)) ([936ff60](https://github.com/open-feature/java-sdk/commit/936ff60fac471a83a7c14412d2e825b2a7f9704c)) +* **deps:** update dependency org.apache.maven.plugins:maven-gpg-plugin to v3.2.8 ([#1501](https://github.com/open-feature/java-sdk/issues/1501)) ([0515ad5](https://github.com/open-feature/java-sdk/commit/0515ad54c4f71863373eb1b7f429393923b27d90)) +* **deps:** update dependency org.codehaus.mojo:exec-maven-plugin to v3.5.1 ([#1461](https://github.com/open-feature/java-sdk/issues/1461)) ([b6ceff2](https://github.com/open-feature/java-sdk/commit/b6ceff2ecb0e34be2ccdb83f7f37c1177de6f27e)) +* **deps:** update dependency org.mockito:mockito-core to v5.18.0 ([#1457](https://github.com/open-feature/java-sdk/issues/1457)) ([e17b0b2](https://github.com/open-feature/java-sdk/commit/e17b0b29758ae7cdbdac9ddb2178382c55eb1277)) +* **deps:** update github/codeql-action digest to 075e08a ([#1470](https://github.com/open-feature/java-sdk/issues/1470)) ([6597de7](https://github.com/open-feature/java-sdk/commit/6597de7a98e0fae10a541a8a9b60837623c133a8)) +* **deps:** update github/codeql-action digest to 33f8489 ([#1502](https://github.com/open-feature/java-sdk/issues/1502)) ([0fd9d3d](https://github.com/open-feature/java-sdk/commit/0fd9d3dcfb1fd65197a42885b12d40a1cc152d3b)) +* **deps:** update github/codeql-action digest to 396fd27 ([#1456](https://github.com/open-feature/java-sdk/issues/1456)) ([b45a937](https://github.com/open-feature/java-sdk/commit/b45a9370173e3d3b97c78449dfc99225fb572228)) +* **deps:** update github/codeql-action digest to 3de706a ([#1481](https://github.com/open-feature/java-sdk/issues/1481)) ([99a3006](https://github.com/open-feature/java-sdk/commit/99a3006de878ab0ba1f0e61a4cb5432914425795)) +* **deps:** update github/codeql-action digest to 466d6ce ([#1477](https://github.com/open-feature/java-sdk/issues/1477)) ([0b57bca](https://github.com/open-feature/java-sdk/commit/0b57bcafc14b946000feb4a3421d73b9616e83cb)) +* **deps:** update github/codeql-action digest to 4a00331 ([#1469](https://github.com/open-feature/java-sdk/issues/1469)) ([376f81f](https://github.com/open-feature/java-sdk/commit/376f81f5c3b66d7e3e298aac30ac7544b84e7362)) +* **deps:** update github/codeql-action digest to 4c57370 ([#1497](https://github.com/open-feature/java-sdk/issues/1497)) ([49214b7](https://github.com/open-feature/java-sdk/commit/49214b7282ddde1ee16cf80f92c11cc90ef7612a)) +* **deps:** update github/codeql-action digest to 510dfa3 ([#1450](https://github.com/open-feature/java-sdk/issues/1450)) ([d9a72d2](https://github.com/open-feature/java-sdk/commit/d9a72d2aafd787a1814132f000897ad1c94181e4)) +* **deps:** update github/codeql-action digest to 57eebf6 ([#1455](https://github.com/open-feature/java-sdk/issues/1455)) ([36eed06](https://github.com/open-feature/java-sdk/commit/36eed065e763bbfa0f8f97d704202bbd219332ca)) +* **deps:** update github/codeql-action digest to 66d7255 ([#1487](https://github.com/open-feature/java-sdk/issues/1487)) ([c3eaecd](https://github.com/open-feature/java-sdk/commit/c3eaecdb8b34d3b33946bd205ee92d49584602bd)) +* **deps:** update github/codeql-action digest to 7b0fb5a ([#1459](https://github.com/open-feature/java-sdk/issues/1459)) ([6a95c00](https://github.com/open-feature/java-sdk/commit/6a95c008e975dd3c7328c32f1d7cf626bbaecfa6)) +* **deps:** update github/codeql-action digest to 7cb9b16 ([#1476](https://github.com/open-feature/java-sdk/issues/1476)) ([6cca721](https://github.com/open-feature/java-sdk/commit/6cca721be5bc6f5926fe64668a7c03728cab3cb0)) +* **deps:** update github/codeql-action digest to 7fd6215 ([#1464](https://github.com/open-feature/java-sdk/issues/1464)) ([f10aaaa](https://github.com/open-feature/java-sdk/commit/f10aaaa357581b573895f4d6e2329abb705582aa)) +* **deps:** update github/codeql-action digest to 8ef1782 ([#1495](https://github.com/open-feature/java-sdk/issues/1495)) ([86a5916](https://github.com/open-feature/java-sdk/commit/86a5916f0dc6116b5b9e5dc897ff4b8705ac01e3)) +* **deps:** update github/codeql-action digest to 9b02dc2 ([#1491](https://github.com/open-feature/java-sdk/issues/1491)) ([6f67b06](https://github.com/open-feature/java-sdk/commit/6f67b06f712c461f331681a76f5cb2c3ddb0d36b)) +* **deps:** update github/codeql-action digest to ac30a39 ([#1488](https://github.com/open-feature/java-sdk/issues/1488)) ([8fad544](https://github.com/open-feature/java-sdk/commit/8fad544b17ee08b4280d7975073d00a874c374db)) +* **deps:** update github/codeql-action digest to b1e4dc3 ([#1471](https://github.com/open-feature/java-sdk/issues/1471)) ([2dcd6a1](https://github.com/open-feature/java-sdk/commit/2dcd6a1dd0c80ee676b9860afd6a6002d0ea4aea)) +* **deps:** update github/codeql-action digest to b694213 ([#1503](https://github.com/open-feature/java-sdk/issues/1503)) ([a5d1cbc](https://github.com/open-feature/java-sdk/commit/a5d1cbced4658fadb63f362b4512bdbd68ae7d6a)) +* **deps:** update github/codeql-action digest to b86edfc ([#1453](https://github.com/open-feature/java-sdk/issues/1453)) ([b667aa3](https://github.com/open-feature/java-sdk/commit/b667aa325136b78c01867d40342f81eeb7e16f46)) +* **deps:** update github/codeql-action digest to bc02a25 ([#1460](https://github.com/open-feature/java-sdk/issues/1460)) ([5e922cf](https://github.com/open-feature/java-sdk/commit/5e922cf3efc156135563707de92e508b0a4d19f3)) +* **deps:** update github/codeql-action digest to be30325 ([#1479](https://github.com/open-feature/java-sdk/issues/1479)) ([844d5e2](https://github.com/open-feature/java-sdk/commit/844d5e244b02703b624cf75e5bf8448c07e62d3d)) +* **deps:** update github/codeql-action digest to dcc1a66 ([#1499](https://github.com/open-feature/java-sdk/issues/1499)) ([69519b1](https://github.com/open-feature/java-sdk/commit/69519b1ef7274ceae39d6746c5a5a98dc69f562f)) +* **deps:** update github/codeql-action digest to ef36b69 ([#1484](https://github.com/open-feature/java-sdk/issues/1484)) ([8bf777a](https://github.com/open-feature/java-sdk/commit/8bf777a7e99be4dfac8917b8e61cb6c23385b8ce)) +* **deps:** update io.cucumber.version to v7.23.0 ([#1465](https://github.com/open-feature/java-sdk/issues/1465)) ([2de7616](https://github.com/open-feature/java-sdk/commit/2de76166764bacd34883b13220dd0bad824c8b1a)) +* improvements to release workflow ([#1451](https://github.com/open-feature/java-sdk/issues/1451)) ([1714efe](https://github.com/open-feature/java-sdk/commit/1714efe81aa6ae025f4f8b12c9c042561498d25e)) +* migrate to new publish ([5425a34](https://github.com/open-feature/java-sdk/commit/5425a34a12baa04f9583b83fd1bfdd7e2a6ab5e8)) +* remove unneeded version information ([#1428](https://github.com/open-feature/java-sdk/issues/1428)) ([3ed65cf](https://github.com/open-feature/java-sdk/commit/3ed65cfb0cb5ee5b70793cd68a27909c81cd4fab)) +* skip tests on publish ([6194186](https://github.com/open-feature/java-sdk/commit/6194186b3e791f3cb28da24f5acb3ff96788d65e)) +* update publish env vars ([85d89ee](https://github.com/open-feature/java-sdk/commit/85d89ee79a52d960322731fb786c0f60245f0d75)) + ## [1.15.1](https://github.com/open-feature/java-sdk/compare/v1.14.2...v1.15.1) (2025-05-14) diff --git a/README.md b/README.md index 6593c9b1e..279efba7c 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ - - Release + + Release @@ -59,7 +59,7 @@ Note that this library is intended to be used in server-side contexts and has no dev.openfeature sdk - 1.15.1 + 1.16.0 ``` @@ -84,7 +84,7 @@ If you would like snapshot builds, this is the relevant repository information: ```groovy dependencies { - implementation 'dev.openfeature:sdk:1.15.1' + implementation 'dev.openfeature:sdk:1.16.0' } ``` diff --git a/pom.xml b/pom.xml index 85107f93d..569ca9cd6 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ dev.openfeature sdk - 1.15.1 + 1.16.0 [17,) diff --git a/version.txt b/version.txt index ace44233b..15b989e39 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.15.1 +1.16.0 From 908755c2c2e3abcef84f29728fd19092a9d66646 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 23:04:40 +0000 Subject: [PATCH 180/391] chore(deps): update actions/setup-java digest to c190c18 (#1508) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index ccf09bac5..fd7338758 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f - name: Set up JDK 17 - uses: actions/setup-java@67aec007b3fcabe15ca665bfccc1e255dd52e30d + uses: actions/setup-java@c190c18febcf6c040d80b10ea201a05a2c320263 with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 00cf0a525..12a99d1a7 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f - name: Set up JDK 11 - uses: actions/setup-java@67aec007b3fcabe15ca665bfccc1e255dd52e30d + uses: actions/setup-java@c190c18febcf6c040d80b10ea201a05a2c320263 with: java-version: ${{ matrix.build.java }} distribution: 'temurin' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fcdee10f2..3ca029777 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f - name: Set up JDK 17 - uses: actions/setup-java@67aec007b3fcabe15ca665bfccc1e255dd52e30d + uses: actions/setup-java@c190c18febcf6c040d80b10ea201a05a2c320263 with: java-version: '17' distribution: 'temurin' From 26716a51cfc720bdb294b50ff3759f8ae41fe410 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 03:14:51 +0000 Subject: [PATCH 181/391] chore(deps): update github/codeql-action digest to 624d0bc (#1507) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 12a99d1a7..0c4137ed0 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@b69421388d5449cc5a5e1ca344d71926bda69e07 + uses: github/codeql-action/init@624d0bca90f761ffa7ce50c41875a1a226969a02 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@b69421388d5449cc5a5e1ca344d71926bda69e07 + uses: github/codeql-action/analyze@624d0bca90f761ffa7ce50c41875a1a226969a02 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index c210033e4..06fdeb037 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@b69421388d5449cc5a5e1ca344d71926bda69e07 + uses: github/codeql-action/init@624d0bca90f761ffa7ce50c41875a1a226969a02 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@b69421388d5449cc5a5e1ca344d71926bda69e07 + uses: github/codeql-action/autobuild@624d0bca90f761ffa7ce50c41875a1a226969a02 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@b69421388d5449cc5a5e1ca344d71926bda69e07 + uses: github/codeql-action/analyze@624d0bca90f761ffa7ce50c41875a1a226969a02 From 488196656ad0fbca5211e270bfc55e3d83fa9a2f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 08:28:26 +0200 Subject: [PATCH 182/391] fix(deps): update dependency io.cucumber:cucumber-bom to v7.24.0 (#1510) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 569ca9cd6..3d2993d2f 100644 --- a/pom.xml +++ b/pom.xml @@ -194,7 +194,7 @@ io.cucumber cucumber-bom - 7.23.0 + 7.24.0 pom import From 1e8f5c880c1a0e8f0ccaa7c4b7452a051973f2b6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 06:34:38 +0000 Subject: [PATCH 183/391] chore(deps): update dependency com.google.guava:guava to v33.4.8-jre (#1382) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3d2993d2f..c3b1fdf6a 100644 --- a/pom.xml +++ b/pom.xml @@ -150,7 +150,7 @@ com.google.guava guava - 33.4.0-jre + 33.4.8-jre test From 62738f7f16b783eabb7325bed3ac26be086b35e4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 10:17:05 +0200 Subject: [PATCH 184/391] chore(deps): update dependency com.diffplug.spotless:spotless-maven-plugin to v2.45.0 (#1509) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c3b1fdf6a..c4461155f 100644 --- a/pom.xml +++ b/pom.xml @@ -463,7 +463,7 @@ com.diffplug.spotless spotless-maven-plugin - 2.44.5 + 2.45.0 From bf68cbdedf6ce7218fadfe3a39df38019da8bcbb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 10 Jul 2025 20:57:58 +0000 Subject: [PATCH 185/391] fix(deps): update dependency io.cucumber:cucumber-bom to v7.25.0 (#1514) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c4461155f..23abda623 100644 --- a/pom.xml +++ b/pom.xml @@ -194,7 +194,7 @@ io.cucumber cucumber-bom - 7.24.0 + 7.25.0 pom import From aa0569379bd85d11a5f91bd1078cd9f2b3b311b4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 11 Jul 2025 01:45:44 +0000 Subject: [PATCH 186/391] chore(deps): update github/codeql-action digest to f53ec7c (#1512) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 0c4137ed0..f6061e994 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@624d0bca90f761ffa7ce50c41875a1a226969a02 + uses: github/codeql-action/init@f53ec7c550f4c3cafe07061ed7fba6f002286003 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@624d0bca90f761ffa7ce50c41875a1a226969a02 + uses: github/codeql-action/analyze@f53ec7c550f4c3cafe07061ed7fba6f002286003 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 06fdeb037..98ed87d1f 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@624d0bca90f761ffa7ce50c41875a1a226969a02 + uses: github/codeql-action/init@f53ec7c550f4c3cafe07061ed7fba6f002286003 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@624d0bca90f761ffa7ce50c41875a1a226969a02 + uses: github/codeql-action/autobuild@f53ec7c550f4c3cafe07061ed7fba6f002286003 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@624d0bca90f761ffa7ce50c41875a1a226969a02 + uses: github/codeql-action/analyze@f53ec7c550f4c3cafe07061ed7fba6f002286003 From 006ae75e2b1c745476dfda35113a06fc7fbceafb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 15:49:08 +0200 Subject: [PATCH 187/391] chore(deps): update github/codeql-action digest to 6f936b5 (#1515) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index f6061e994..4d0968076 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@f53ec7c550f4c3cafe07061ed7fba6f002286003 + uses: github/codeql-action/init@6f936b5c2d7c8b03088ea6ce53d42c43d402b7b0 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@f53ec7c550f4c3cafe07061ed7fba6f002286003 + uses: github/codeql-action/analyze@6f936b5c2d7c8b03088ea6ce53d42c43d402b7b0 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 98ed87d1f..046637f3f 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@f53ec7c550f4c3cafe07061ed7fba6f002286003 + uses: github/codeql-action/init@6f936b5c2d7c8b03088ea6ce53d42c43d402b7b0 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@f53ec7c550f4c3cafe07061ed7fba6f002286003 + uses: github/codeql-action/autobuild@6f936b5c2d7c8b03088ea6ce53d42c43d402b7b0 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@f53ec7c550f4c3cafe07061ed7fba6f002286003 + uses: github/codeql-action/analyze@6f936b5c2d7c8b03088ea6ce53d42c43d402b7b0 From 1d3fab6184b4ba45b3e4cee420e24be722c76946 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 16:00:25 +0200 Subject: [PATCH 188/391] fix(deps): update dependency io.cucumber:cucumber-bom to v7.26.0 (#1516) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 23abda623..ee619c2ef 100644 --- a/pom.xml +++ b/pom.xml @@ -194,7 +194,7 @@ io.cucumber cucumber-bom - 7.25.0 + 7.26.0 pom import From 5b3e3656f6efad1f9020937bc3ea18078c4defc8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 23:46:35 +0000 Subject: [PATCH 189/391] chore(deps): update github/codeql-action digest to 0d17ea4 (#1517) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 4d0968076..221209592 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@6f936b5c2d7c8b03088ea6ce53d42c43d402b7b0 + uses: github/codeql-action/init@0d17ea484359c43eb02ea30721ea1c9162d09b37 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@6f936b5c2d7c8b03088ea6ce53d42c43d402b7b0 + uses: github/codeql-action/analyze@0d17ea484359c43eb02ea30721ea1c9162d09b37 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 046637f3f..f535e60fd 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@6f936b5c2d7c8b03088ea6ce53d42c43d402b7b0 + uses: github/codeql-action/init@0d17ea484359c43eb02ea30721ea1c9162d09b37 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@6f936b5c2d7c8b03088ea6ce53d42c43d402b7b0 + uses: github/codeql-action/autobuild@0d17ea484359c43eb02ea30721ea1c9162d09b37 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@6f936b5c2d7c8b03088ea6ce53d42c43d402b7b0 + uses: github/codeql-action/analyze@0d17ea484359c43eb02ea30721ea1c9162d09b37 From 1382b367d934feaa5effe851f8b03b02bb2482c1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 16 Jul 2025 03:54:58 +0000 Subject: [PATCH 190/391] chore(deps): update actions/setup-java digest to ae2b61d (#1518) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index fd7338758..c24b46fd2 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f - name: Set up JDK 17 - uses: actions/setup-java@c190c18febcf6c040d80b10ea201a05a2c320263 + uses: actions/setup-java@ae2b61dbc685e60e4427b2e8ed4f0135c6ea8597 with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 221209592..43c614013 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f - name: Set up JDK 11 - uses: actions/setup-java@c190c18febcf6c040d80b10ea201a05a2c320263 + uses: actions/setup-java@ae2b61dbc685e60e4427b2e8ed4f0135c6ea8597 with: java-version: ${{ matrix.build.java }} distribution: 'temurin' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3ca029777..6b7d10e6e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f - name: Set up JDK 17 - uses: actions/setup-java@c190c18febcf6c040d80b10ea201a05a2c320263 + uses: actions/setup-java@ae2b61dbc685e60e4427b2e8ed4f0135c6ea8597 with: java-version: '17' distribution: 'temurin' From cbf7a5862286dc36023095208c3e865b058dacb0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 16 Jul 2025 06:57:06 +0000 Subject: [PATCH 191/391] chore(deps): update dependency maven to v3.9.11 (#1519) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .mvn/wrapper/maven-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 2f94e6169..12fbe1e90 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -16,4 +16,4 @@ # under the License. wrapperVersion=3.3.2 distributionType=only-script -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.10/apache-maven-3.9.10-bin.zip +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip From ecc8f7e3ade314c050c67710ae96a182534b9692 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 16:35:35 +0200 Subject: [PATCH 192/391] chore(deps): update github/codeql-action digest to 03a2a17 (#1520) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 43c614013..5316ea13a 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@0d17ea484359c43eb02ea30721ea1c9162d09b37 + uses: github/codeql-action/init@03a2a17e75d20e4ff461b43f161fb2b52165f632 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@0d17ea484359c43eb02ea30721ea1c9162d09b37 + uses: github/codeql-action/analyze@03a2a17e75d20e4ff461b43f161fb2b52165f632 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index f535e60fd..3c14fcc3e 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@0d17ea484359c43eb02ea30721ea1c9162d09b37 + uses: github/codeql-action/init@03a2a17e75d20e4ff461b43f161fb2b52165f632 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@0d17ea484359c43eb02ea30721ea1c9162d09b37 + uses: github/codeql-action/autobuild@03a2a17e75d20e4ff461b43f161fb2b52165f632 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@0d17ea484359c43eb02ea30721ea1c9162d09b37 + uses: github/codeql-action/analyze@03a2a17e75d20e4ff461b43f161fb2b52165f632 From ac3344c7f6293ac72523a5d0c5e61d4304c0a8b1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 21:51:17 +0000 Subject: [PATCH 193/391] chore(deps): update github/codeql-action digest to 7710ed1 (#1521) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 5316ea13a..f41b552ed 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@03a2a17e75d20e4ff461b43f161fb2b52165f632 + uses: github/codeql-action/init@7710ed11e398ea99c7f7004c2b2e0f580458db42 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@03a2a17e75d20e4ff461b43f161fb2b52165f632 + uses: github/codeql-action/analyze@7710ed11e398ea99c7f7004c2b2e0f580458db42 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 3c14fcc3e..dee0bfa4f 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@03a2a17e75d20e4ff461b43f161fb2b52165f632 + uses: github/codeql-action/init@7710ed11e398ea99c7f7004c2b2e0f580458db42 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@03a2a17e75d20e4ff461b43f161fb2b52165f632 + uses: github/codeql-action/autobuild@7710ed11e398ea99c7f7004c2b2e0f580458db42 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@03a2a17e75d20e4ff461b43f161fb2b52165f632 + uses: github/codeql-action/analyze@7710ed11e398ea99c7f7004c2b2e0f580458db42 From 844f6df33542b927d38627f9a8ee5f9371e47aca Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 01:00:06 +0000 Subject: [PATCH 194/391] chore(deps): update dependency com.diffplug.spotless:spotless-maven-plugin to v2.46.0 (#1522) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ee619c2ef..df35edb23 100644 --- a/pom.xml +++ b/pom.xml @@ -463,7 +463,7 @@ com.diffplug.spotless spotless-maven-plugin - 2.45.0 + 2.46.0 From db47b7e8233970b0bf37dbb5679227d1917e15b7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 15:24:17 +0200 Subject: [PATCH 195/391] fix(deps): update dependency org.junit:junit-bom to v5.13.4 (#1524) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index df35edb23..8da4b440a 100644 --- a/pom.xml +++ b/pom.xml @@ -202,7 +202,7 @@ org.junit junit-bom - 5.13.3 + 5.13.4 pom import From 66215efaf3a18eeeb4c244775d6a72725a274097 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 23:52:07 +0000 Subject: [PATCH 196/391] chore(deps): update github/codeql-action digest to eefe1b5 (#1523) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index f41b552ed..c1bc5952b 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@7710ed11e398ea99c7f7004c2b2e0f580458db42 + uses: github/codeql-action/init@eefe1b5db9f28481d2bf2bd096da3873c1cd2a7b with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@7710ed11e398ea99c7f7004c2b2e0f580458db42 + uses: github/codeql-action/analyze@eefe1b5db9f28481d2bf2bd096da3873c1cd2a7b diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index dee0bfa4f..2eb6ff0e9 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@7710ed11e398ea99c7f7004c2b2e0f580458db42 + uses: github/codeql-action/init@eefe1b5db9f28481d2bf2bd096da3873c1cd2a7b with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@7710ed11e398ea99c7f7004c2b2e0f580458db42 + uses: github/codeql-action/autobuild@eefe1b5db9f28481d2bf2bd096da3873c1cd2a7b - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@7710ed11e398ea99c7f7004c2b2e0f580458db42 + uses: github/codeql-action/analyze@eefe1b5db9f28481d2bf2bd096da3873c1cd2a7b From 91e451b29b10031a9697156194af1d209ee5fec6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 04:48:22 +0000 Subject: [PATCH 197/391] chore(deps): update dependency com.diffplug.spotless:spotless-maven-plugin to v2.46.1 (#1526) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8da4b440a..5b44a6231 100644 --- a/pom.xml +++ b/pom.xml @@ -463,7 +463,7 @@ com.diffplug.spotless spotless-maven-plugin - 2.46.0 + 2.46.1 From c05757e4895253053e49982dbe8f16ef501fd038 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 04:13:42 +0000 Subject: [PATCH 198/391] chore(deps): update github/codeql-action digest to 76bf77d (#1527) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index c1bc5952b..c7b319bae 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@eefe1b5db9f28481d2bf2bd096da3873c1cd2a7b + uses: github/codeql-action/init@76bf77db0b4f84ce3351e7dccabb79e3e2aa8ad3 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@eefe1b5db9f28481d2bf2bd096da3873c1cd2a7b + uses: github/codeql-action/analyze@76bf77db0b4f84ce3351e7dccabb79e3e2aa8ad3 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 2eb6ff0e9..b5d1cffab 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@eefe1b5db9f28481d2bf2bd096da3873c1cd2a7b + uses: github/codeql-action/init@76bf77db0b4f84ce3351e7dccabb79e3e2aa8ad3 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@eefe1b5db9f28481d2bf2bd096da3873c1cd2a7b + uses: github/codeql-action/autobuild@76bf77db0b4f84ce3351e7dccabb79e3e2aa8ad3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@eefe1b5db9f28481d2bf2bd096da3873c1cd2a7b + uses: github/codeql-action/analyze@76bf77db0b4f84ce3351e7dccabb79e3e2aa8ad3 From 074a5ec52d7591e5b06801782415d1f2c930086e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 23:34:45 +0000 Subject: [PATCH 199/391] chore(deps): update actions/checkout digest to 8edcb1b (#1529) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/static-code-scanning.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index c24b46fd2..b1a40f191 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f + - uses: actions/checkout@8edcb1bdb4e267140fa742c62e395cd74f332709 - name: Set up JDK 17 uses: actions/setup-java@ae2b61dbc685e60e4427b2e8ed4f0135c6ea8597 with: diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index c7b319bae..c1f5fe12c 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -19,7 +19,7 @@ jobs: runs-on: ${{ matrix.os}} steps: - name: Check out the code - uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f + uses: actions/checkout@8edcb1bdb4e267140fa742c62e395cd74f332709 - name: Set up JDK 11 uses: actions/setup-java@ae2b61dbc685e60e4427b2e8ed4f0135c6ea8597 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6b7d10e6e..8d11a94aa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,7 +37,7 @@ jobs: steps: - name: Checkout Repository - uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f + uses: actions/checkout@8edcb1bdb4e267140fa742c62e395cd74f332709 - name: Set up JDK 17 uses: actions/setup-java@ae2b61dbc685e60e4427b2e8ed4f0135c6ea8597 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index b5d1cffab..0d2351c5e 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -29,7 +29,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@09d2acae674a48949e3602304ab46fd20ae0c42f + uses: actions/checkout@8edcb1bdb4e267140fa742c62e395cd74f332709 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL From b5e335c3ee7865f26bcd688953204280affe2834 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 24 Jul 2025 04:27:17 +0000 Subject: [PATCH 200/391] chore(deps): update github/codeql-action digest to 701df0e (#1528) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index c1f5fe12c..5c29eebf8 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@76bf77db0b4f84ce3351e7dccabb79e3e2aa8ad3 + uses: github/codeql-action/init@701df0e49d84a24bd8f0d01f80c0dbf69ab07674 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@76bf77db0b4f84ce3351e7dccabb79e3e2aa8ad3 + uses: github/codeql-action/analyze@701df0e49d84a24bd8f0d01f80c0dbf69ab07674 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 0d2351c5e..f36045df5 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@76bf77db0b4f84ce3351e7dccabb79e3e2aa8ad3 + uses: github/codeql-action/init@701df0e49d84a24bd8f0d01f80c0dbf69ab07674 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@76bf77db0b4f84ce3351e7dccabb79e3e2aa8ad3 + uses: github/codeql-action/autobuild@701df0e49d84a24bd8f0d01f80c0dbf69ab07674 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@76bf77db0b4f84ce3351e7dccabb79e3e2aa8ad3 + uses: github/codeql-action/analyze@701df0e49d84a24bd8f0d01f80c0dbf69ab07674 From c06d6d588d529ae52d763a8dcf414b7aa1025d81 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 28 Jul 2025 03:42:49 +0000 Subject: [PATCH 201/391] fix(deps): update dependency io.cucumber:cucumber-bom to v7.27.0 (#1530) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5b44a6231..3a12111cf 100644 --- a/pom.xml +++ b/pom.xml @@ -194,7 +194,7 @@ io.cucumber cucumber-bom - 7.26.0 + 7.27.0 pom import From 15aaf5800f0fb2b8d22415fa5d9b61dacc651932 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 30 Jul 2025 04:50:26 +0000 Subject: [PATCH 202/391] chore(deps): update github/codeql-action digest to acdac9e (#1531) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 5c29eebf8..810516eb0 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@701df0e49d84a24bd8f0d01f80c0dbf69ab07674 + uses: github/codeql-action/init@acdac9e37d9d390cc88350d33ef1206ce28c3f71 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@701df0e49d84a24bd8f0d01f80c0dbf69ab07674 + uses: github/codeql-action/analyze@acdac9e37d9d390cc88350d33ef1206ce28c3f71 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index f36045df5..771ab168e 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@701df0e49d84a24bd8f0d01f80c0dbf69ab07674 + uses: github/codeql-action/init@acdac9e37d9d390cc88350d33ef1206ce28c3f71 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@701df0e49d84a24bd8f0d01f80c0dbf69ab07674 + uses: github/codeql-action/autobuild@acdac9e37d9d390cc88350d33ef1206ce28c3f71 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@701df0e49d84a24bd8f0d01f80c0dbf69ab07674 + uses: github/codeql-action/analyze@acdac9e37d9d390cc88350d33ef1206ce28c3f71 From 7cca589a7e2de6f3a9ec2d803dd9564205af722a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 30 Jul 2025 22:58:24 +0000 Subject: [PATCH 203/391] chore(deps): update actions/setup-java digest to e9343db (#1535) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index b1a40f191..847f26671 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@8edcb1bdb4e267140fa742c62e395cd74f332709 - name: Set up JDK 17 - uses: actions/setup-java@ae2b61dbc685e60e4427b2e8ed4f0135c6ea8597 + uses: actions/setup-java@e9343db97e09d87a3c50e544105d99fe912c204b with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 810516eb0..b93d73670 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@8edcb1bdb4e267140fa742c62e395cd74f332709 - name: Set up JDK 11 - uses: actions/setup-java@ae2b61dbc685e60e4427b2e8ed4f0135c6ea8597 + uses: actions/setup-java@e9343db97e09d87a3c50e544105d99fe912c204b with: java-version: ${{ matrix.build.java }} distribution: 'temurin' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8d11a94aa..347cad75d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: uses: actions/checkout@8edcb1bdb4e267140fa742c62e395cd74f332709 - name: Set up JDK 17 - uses: actions/setup-java@ae2b61dbc685e60e4427b2e8ed4f0135c6ea8597 + uses: actions/setup-java@e9343db97e09d87a3c50e544105d99fe912c204b with: java-version: '17' distribution: 'temurin' From 477d7ce752ecbc5b3ad13753888d5ee6b650c390 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 31 Jul 2025 00:27:38 +0000 Subject: [PATCH 204/391] chore(deps): update github/codeql-action digest to b9b3b12 (#1533) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index b93d73670..0b65e7f81 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@acdac9e37d9d390cc88350d33ef1206ce28c3f71 + uses: github/codeql-action/init@b9b3b12fa29bb4f95fb2e36128124ff9364aaf0e with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@acdac9e37d9d390cc88350d33ef1206ce28c3f71 + uses: github/codeql-action/analyze@b9b3b12fa29bb4f95fb2e36128124ff9364aaf0e diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 771ab168e..3cc2949b1 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@acdac9e37d9d390cc88350d33ef1206ce28c3f71 + uses: github/codeql-action/init@b9b3b12fa29bb4f95fb2e36128124ff9364aaf0e with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@acdac9e37d9d390cc88350d33ef1206ce28c3f71 + uses: github/codeql-action/autobuild@b9b3b12fa29bb4f95fb2e36128124ff9364aaf0e - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@acdac9e37d9d390cc88350d33ef1206ce28c3f71 + uses: github/codeql-action/analyze@b9b3b12fa29bb4f95fb2e36128124ff9364aaf0e From 09e3c3faf8fe6c3e8c4d46c6fa3e3a7a2dd8f146 Mon Sep 17 00:00:00 2001 From: carla-was-not-available <92949899+carla-was-not-available@users.noreply.github.com> Date: Thu, 31 Jul 2025 09:57:44 +0200 Subject: [PATCH 205/391] feat: Allow Access to ImmutableMetadata Map as unmodifiable Map (#1534) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Allow Access to ImmutableMetadata Map as unmodifiable Map Oriented on the AbstractStructure closes: #1532 Signed-off-by: Carla Kรถberl * fixup: adding back java doc Signed-off-by: Carla Kรถberl --------- Signed-off-by: Carla Kรถberl Co-authored-by: chrfwow --- .../java/dev/openfeature/sdk/ImmutableMetadata.java | 5 +++++ .../dev/openfeature/sdk/ImmutableMetadataTest.java | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/main/java/dev/openfeature/sdk/ImmutableMetadata.java b/src/main/java/dev/openfeature/sdk/ImmutableMetadata.java index 7f57a174d..f6c1d742e 100644 --- a/src/main/java/dev/openfeature/sdk/ImmutableMetadata.java +++ b/src/main/java/dev/openfeature/sdk/ImmutableMetadata.java @@ -1,5 +1,6 @@ package dev.openfeature.sdk; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import lombok.EqualsAndHashCode; @@ -97,6 +98,10 @@ public T getValue(final String key, final Class type) { } } + public Map asUnmodifiableMap() { + return Collections.unmodifiableMap(metadata); + } + public boolean isEmpty() { return metadata.isEmpty(); } diff --git a/src/test/java/dev/openfeature/sdk/ImmutableMetadataTest.java b/src/test/java/dev/openfeature/sdk/ImmutableMetadataTest.java index e3bd03165..108fac0fe 100644 --- a/src/test/java/dev/openfeature/sdk/ImmutableMetadataTest.java +++ b/src/test/java/dev/openfeature/sdk/ImmutableMetadataTest.java @@ -3,6 +3,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; +import java.util.Map; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; class ImmutableMetadataTest { @@ -25,4 +27,15 @@ void equalImmutableMetadataAreEqual() { assertEquals(i1, i2); } + + @Test + void retrieveAsUnmodifiableMap() { + ImmutableMetadata metadata = + ImmutableMetadata.builder().addString("key1", "value1").build(); + + Map unmodifiableMap = metadata.asUnmodifiableMap(); + assertEquals(unmodifiableMap.size(), 1); + assertEquals(unmodifiableMap.get("key1"), "value1"); + Assertions.assertThrows(UnsupportedOperationException.class, () -> unmodifiableMap.put("key3", "value3")); + } } From 4addf6458dacbc00bb599a758d87478e6d97d369 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 1 Aug 2025 21:03:59 +0000 Subject: [PATCH 206/391] chore(deps): update github/codeql-action digest to 7273f08 (#1537) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 0b65e7f81..d50d446ca 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@b9b3b12fa29bb4f95fb2e36128124ff9364aaf0e + uses: github/codeql-action/init@7273f08caa1dcf2c2837f362f1982de0ab4dc344 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@b9b3b12fa29bb4f95fb2e36128124ff9364aaf0e + uses: github/codeql-action/analyze@7273f08caa1dcf2c2837f362f1982de0ab4dc344 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 3cc2949b1..882a47478 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@b9b3b12fa29bb4f95fb2e36128124ff9364aaf0e + uses: github/codeql-action/init@7273f08caa1dcf2c2837f362f1982de0ab4dc344 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@b9b3b12fa29bb4f95fb2e36128124ff9364aaf0e + uses: github/codeql-action/autobuild@7273f08caa1dcf2c2837f362f1982de0ab4dc344 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@b9b3b12fa29bb4f95fb2e36128124ff9364aaf0e + uses: github/codeql-action/analyze@7273f08caa1dcf2c2837f362f1982de0ab4dc344 From f2dfc63beef1beef6aad7d00cc1aaeb78c0fc57c Mon Sep 17 00:00:00 2001 From: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Date: Tue, 5 Aug 2025 09:48:07 -0400 Subject: [PATCH 207/391] chore(main): release 1.17.0 (#1511) Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 41 +++++++++++++++++++++++++++++++++++ README.md | 8 +++---- pom.xml | 2 +- version.txt | 2 +- 5 files changed, 48 insertions(+), 7 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8997e1812..f5c3b938e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{".":"1.16.0"} +{".":"1.17.0"} diff --git a/CHANGELOG.md b/CHANGELOG.md index 2529b1871..5513f0e55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,46 @@ # Changelog +## [1.17.0](https://github.com/open-feature/java-sdk/compare/v1.16.0...v1.17.0) (2025-08-01) + + +### ๐Ÿ› Bug Fixes + +* **deps:** update dependency io.cucumber:cucumber-bom to v7.24.0 ([#1510](https://github.com/open-feature/java-sdk/issues/1510)) ([4881966](https://github.com/open-feature/java-sdk/commit/488196656ad0fbca5211e270bfc55e3d83fa9a2f)) +* **deps:** update dependency io.cucumber:cucumber-bom to v7.25.0 ([#1514](https://github.com/open-feature/java-sdk/issues/1514)) ([bf68cbd](https://github.com/open-feature/java-sdk/commit/bf68cbdedf6ce7218fadfe3a39df38019da8bcbb)) +* **deps:** update dependency io.cucumber:cucumber-bom to v7.26.0 ([#1516](https://github.com/open-feature/java-sdk/issues/1516)) ([1d3fab6](https://github.com/open-feature/java-sdk/commit/1d3fab6184b4ba45b3e4cee420e24be722c76946)) +* **deps:** update dependency io.cucumber:cucumber-bom to v7.27.0 ([#1530](https://github.com/open-feature/java-sdk/issues/1530)) ([c06d6d5](https://github.com/open-feature/java-sdk/commit/c06d6d588d529ae52d763a8dcf414b7aa1025d81)) +* **deps:** update dependency org.junit:junit-bom to v5.13.4 ([#1524](https://github.com/open-feature/java-sdk/issues/1524)) ([db47b7e](https://github.com/open-feature/java-sdk/commit/db47b7e8233970b0bf37dbb5679227d1917e15b7)) + + +### โœจ New Features + +* Allow Access to ImmutableMetadata Map as unmodifiable Map ([#1534](https://github.com/open-feature/java-sdk/issues/1534)) ([09e3c3f](https://github.com/open-feature/java-sdk/commit/09e3c3faf8fe6c3e8c4d46c6fa3e3a7a2dd8f146)) + + +### ๐Ÿงน Chore + +* **deps:** update actions/checkout digest to 8edcb1b ([#1529](https://github.com/open-feature/java-sdk/issues/1529)) ([074a5ec](https://github.com/open-feature/java-sdk/commit/074a5ec52d7591e5b06801782415d1f2c930086e)) +* **deps:** update actions/setup-java digest to ae2b61d ([#1518](https://github.com/open-feature/java-sdk/issues/1518)) ([1382b36](https://github.com/open-feature/java-sdk/commit/1382b367d934feaa5effe851f8b03b02bb2482c1)) +* **deps:** update actions/setup-java digest to c190c18 ([#1508](https://github.com/open-feature/java-sdk/issues/1508)) ([908755c](https://github.com/open-feature/java-sdk/commit/908755c2c2e3abcef84f29728fd19092a9d66646)) +* **deps:** update actions/setup-java digest to e9343db ([#1535](https://github.com/open-feature/java-sdk/issues/1535)) ([7cca589](https://github.com/open-feature/java-sdk/commit/7cca589a7e2de6f3a9ec2d803dd9564205af722a)) +* **deps:** update dependency com.diffplug.spotless:spotless-maven-plugin to v2.45.0 ([#1509](https://github.com/open-feature/java-sdk/issues/1509)) ([62738f7](https://github.com/open-feature/java-sdk/commit/62738f7f16b783eabb7325bed3ac26be086b35e4)) +* **deps:** update dependency com.diffplug.spotless:spotless-maven-plugin to v2.46.0 ([#1522](https://github.com/open-feature/java-sdk/issues/1522)) ([844f6df](https://github.com/open-feature/java-sdk/commit/844f6df33542b927d38627f9a8ee5f9371e47aca)) +* **deps:** update dependency com.diffplug.spotless:spotless-maven-plugin to v2.46.1 ([#1526](https://github.com/open-feature/java-sdk/issues/1526)) ([91e451b](https://github.com/open-feature/java-sdk/commit/91e451b29b10031a9697156194af1d209ee5fec6)) +* **deps:** update dependency com.google.guava:guava to v33.4.8-jre ([#1382](https://github.com/open-feature/java-sdk/issues/1382)) ([1e8f5c8](https://github.com/open-feature/java-sdk/commit/1e8f5c880c1a0e8f0ccaa7c4b7452a051973f2b6)) +* **deps:** update dependency maven to v3.9.11 ([#1519](https://github.com/open-feature/java-sdk/issues/1519)) ([cbf7a58](https://github.com/open-feature/java-sdk/commit/cbf7a5862286dc36023095208c3e865b058dacb0)) +* **deps:** update github/codeql-action digest to 03a2a17 ([#1520](https://github.com/open-feature/java-sdk/issues/1520)) ([ecc8f7e](https://github.com/open-feature/java-sdk/commit/ecc8f7e3ade314c050c67710ae96a182534b9692)) +* **deps:** update github/codeql-action digest to 0d17ea4 ([#1517](https://github.com/open-feature/java-sdk/issues/1517)) ([5b3e365](https://github.com/open-feature/java-sdk/commit/5b3e3656f6efad1f9020937bc3ea18078c4defc8)) +* **deps:** update github/codeql-action digest to 624d0bc ([#1507](https://github.com/open-feature/java-sdk/issues/1507)) ([26716a5](https://github.com/open-feature/java-sdk/commit/26716a51cfc720bdb294b50ff3759f8ae41fe410)) +* **deps:** update github/codeql-action digest to 6f936b5 ([#1515](https://github.com/open-feature/java-sdk/issues/1515)) ([006ae75](https://github.com/open-feature/java-sdk/commit/006ae75e2b1c745476dfda35113a06fc7fbceafb)) +* **deps:** update github/codeql-action digest to 701df0e ([#1528](https://github.com/open-feature/java-sdk/issues/1528)) ([b5e335c](https://github.com/open-feature/java-sdk/commit/b5e335c3ee7865f26bcd688953204280affe2834)) +* **deps:** update github/codeql-action digest to 7273f08 ([#1537](https://github.com/open-feature/java-sdk/issues/1537)) ([4addf64](https://github.com/open-feature/java-sdk/commit/4addf6458dacbc00bb599a758d87478e6d97d369)) +* **deps:** update github/codeql-action digest to 76bf77d ([#1527](https://github.com/open-feature/java-sdk/issues/1527)) ([c05757e](https://github.com/open-feature/java-sdk/commit/c05757e4895253053e49982dbe8f16ef501fd038)) +* **deps:** update github/codeql-action digest to 7710ed1 ([#1521](https://github.com/open-feature/java-sdk/issues/1521)) ([ac3344c](https://github.com/open-feature/java-sdk/commit/ac3344c7f6293ac72523a5d0c5e61d4304c0a8b1)) +* **deps:** update github/codeql-action digest to acdac9e ([#1531](https://github.com/open-feature/java-sdk/issues/1531)) ([15aaf58](https://github.com/open-feature/java-sdk/commit/15aaf5800f0fb2b8d22415fa5d9b61dacc651932)) +* **deps:** update github/codeql-action digest to b9b3b12 ([#1533](https://github.com/open-feature/java-sdk/issues/1533)) ([477d7ce](https://github.com/open-feature/java-sdk/commit/477d7ce752ecbc5b3ad13753888d5ee6b650c390)) +* **deps:** update github/codeql-action digest to eefe1b5 ([#1523](https://github.com/open-feature/java-sdk/issues/1523)) ([66215ef](https://github.com/open-feature/java-sdk/commit/66215efaf3a18eeeb4c244775d6a72725a274097)) +* **deps:** update github/codeql-action digest to f53ec7c ([#1512](https://github.com/open-feature/java-sdk/issues/1512)) ([aa05693](https://github.com/open-feature/java-sdk/commit/aa0569379bd85d11a5f91bd1078cd9f2b3b311b4)) + ## [1.16.0](https://github.com/open-feature/java-sdk/compare/v1.15.1...v1.16.0) (2025-07-07) diff --git a/README.md b/README.md index 279efba7c..24bae2a3c 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ - - Release + + Release @@ -59,7 +59,7 @@ Note that this library is intended to be used in server-side contexts and has no dev.openfeature sdk - 1.16.0 + 1.17.0 ``` @@ -84,7 +84,7 @@ If you would like snapshot builds, this is the relevant repository information: ```groovy dependencies { - implementation 'dev.openfeature:sdk:1.16.0' + implementation 'dev.openfeature:sdk:1.17.0' } ``` diff --git a/pom.xml b/pom.xml index 3a12111cf..1c9c8fa05 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ dev.openfeature sdk - 1.16.0 + 1.17.0 [17,) diff --git a/version.txt b/version.txt index 15b989e39..092afa15d 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.16.0 +1.17.0 From 60568776c471e7c01f8cee6b198fe6df70fc2ca5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 16:24:38 +0000 Subject: [PATCH 208/391] chore(deps): update github/codeql-action digest to bbfff2f (#1538) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index d50d446ca..42bb6058b 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@7273f08caa1dcf2c2837f362f1982de0ab4dc344 + uses: github/codeql-action/init@bbfff2f20a2d2b1bb30040286e0de8e59432af64 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@7273f08caa1dcf2c2837f362f1982de0ab4dc344 + uses: github/codeql-action/analyze@bbfff2f20a2d2b1bb30040286e0de8e59432af64 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 882a47478..b09caa446 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@7273f08caa1dcf2c2837f362f1982de0ab4dc344 + uses: github/codeql-action/init@bbfff2f20a2d2b1bb30040286e0de8e59432af64 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@7273f08caa1dcf2c2837f362f1982de0ab4dc344 + uses: github/codeql-action/autobuild@bbfff2f20a2d2b1bb30040286e0de8e59432af64 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@7273f08caa1dcf2c2837f362f1982de0ab4dc344 + uses: github/codeql-action/analyze@bbfff2f20a2d2b1bb30040286e0de8e59432af64 From bc587809341d60eeb575b0d58d75b35972b92053 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 6 Aug 2025 14:53:44 +0200 Subject: [PATCH 209/391] chore(deps): update github/codeql-action digest to b1228d0 (#1540) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 42bb6058b..37bc7c976 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@bbfff2f20a2d2b1bb30040286e0de8e59432af64 + uses: github/codeql-action/init@b1228d060cad1666537a3dd6154790c05090bd3b with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@bbfff2f20a2d2b1bb30040286e0de8e59432af64 + uses: github/codeql-action/analyze@b1228d060cad1666537a3dd6154790c05090bd3b diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index b09caa446..217191206 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@bbfff2f20a2d2b1bb30040286e0de8e59432af64 + uses: github/codeql-action/init@b1228d060cad1666537a3dd6154790c05090bd3b with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@bbfff2f20a2d2b1bb30040286e0de8e59432af64 + uses: github/codeql-action/autobuild@b1228d060cad1666537a3dd6154790c05090bd3b - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@bbfff2f20a2d2b1bb30040286e0de8e59432af64 + uses: github/codeql-action/analyze@b1228d060cad1666537a3dd6154790c05090bd3b From 6efc2ee1e701daf38e3efc2f115dc93025a0e2e2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 00:56:38 +0000 Subject: [PATCH 210/391] chore(deps): update actions/cache digest to 358a730 (#1541) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 847f26671..015306b03 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -33,7 +33,7 @@ jobs: server-password: ${{ secrets.CENTRAL_PASSWORD }} - name: Cache local Maven repository - uses: actions/cache@640a1c2554105b57832a23eea0b4672fc7a790d5 + uses: actions/cache@358a7306cd9d78ceffc19271e69cd8528462fccf with: path: ~/.m2/repository key: ${{ runner.os }}-17-maven-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 37bc7c976..7e7639f20 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -34,7 +34,7 @@ jobs: languages: java - name: Cache local Maven repository - uses: actions/cache@640a1c2554105b57832a23eea0b4672fc7a790d5 + uses: actions/cache@358a7306cd9d78ceffc19271e69cd8528462fccf with: path: ~/.m2/repository key: ${{ runner.os }}${{ matrix.build.java }}-maven-${{ hashFiles('**/pom.xml') }} From 7ccbb714b305deb9fa0e31ace1bd7f044c8c57ed Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 05:07:14 +0000 Subject: [PATCH 211/391] chore(deps): update github/codeql-action digest to e2b6f0f (#1542) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 7e7639f20..b7410ab49 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@b1228d060cad1666537a3dd6154790c05090bd3b + uses: github/codeql-action/init@e2b6f0f4a336fec2e2b57b908df292ca6d2a0fa3 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@b1228d060cad1666537a3dd6154790c05090bd3b + uses: github/codeql-action/analyze@e2b6f0f4a336fec2e2b57b908df292ca6d2a0fa3 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 217191206..23bc98911 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@b1228d060cad1666537a3dd6154790c05090bd3b + uses: github/codeql-action/init@e2b6f0f4a336fec2e2b57b908df292ca6d2a0fa3 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@b1228d060cad1666537a3dd6154790c05090bd3b + uses: github/codeql-action/autobuild@e2b6f0f4a336fec2e2b57b908df292ca6d2a0fa3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@b1228d060cad1666537a3dd6154790c05090bd3b + uses: github/codeql-action/analyze@e2b6f0f4a336fec2e2b57b908df292ca6d2a0fa3 From 050379be110b7a980cf5cc02ddf23e00a7ee7202 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 17:33:28 +0000 Subject: [PATCH 212/391] chore(deps): update actions/cache digest to 0400d5f (#1544) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 015306b03..03ba304e4 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -33,7 +33,7 @@ jobs: server-password: ${{ secrets.CENTRAL_PASSWORD }} - name: Cache local Maven repository - uses: actions/cache@358a7306cd9d78ceffc19271e69cd8528462fccf + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: ~/.m2/repository key: ${{ runner.os }}-17-maven-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index b7410ab49..2ef9996d0 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -34,7 +34,7 @@ jobs: languages: java - name: Cache local Maven repository - uses: actions/cache@358a7306cd9d78ceffc19271e69cd8528462fccf + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 with: path: ~/.m2/repository key: ${{ runner.os }}${{ matrix.build.java }}-maven-${{ hashFiles('**/pom.xml') }} From c4fe7d2e81510db4eaa13a4d0046827efecd8a79 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 20:54:38 +0000 Subject: [PATCH 213/391] chore(deps): update dependency org.assertj:assertj-core to v3.27.4 (#1546) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1c9c8fa05..a64987c34 100644 --- a/pom.xml +++ b/pom.xml @@ -88,7 +88,7 @@ org.assertj assertj-core - 3.27.3 + 3.27.4 test From 866235e494c229b3d47df80146199db4204b2ece Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 8 Aug 2025 01:32:06 +0000 Subject: [PATCH 214/391] chore(deps): update github/codeql-action digest to 6fe50b2 (#1545) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 2ef9996d0..a3085f90c 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@e2b6f0f4a336fec2e2b57b908df292ca6d2a0fa3 + uses: github/codeql-action/init@6fe50b283a3d2e5533299f72d99216cd8815500f with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@e2b6f0f4a336fec2e2b57b908df292ca6d2a0fa3 + uses: github/codeql-action/analyze@6fe50b283a3d2e5533299f72d99216cd8815500f diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 23bc98911..e8d7d5635 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@e2b6f0f4a336fec2e2b57b908df292ca6d2a0fa3 + uses: github/codeql-action/init@6fe50b283a3d2e5533299f72d99216cd8815500f with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@e2b6f0f4a336fec2e2b57b908df292ca6d2a0fa3 + uses: github/codeql-action/autobuild@6fe50b283a3d2e5533299f72d99216cd8815500f - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@e2b6f0f4a336fec2e2b57b908df292ca6d2a0fa3 + uses: github/codeql-action/analyze@6fe50b283a3d2e5533299f72d99216cd8815500f From 09b31383e3b7e693ec43d6016486e3ededf8c2de Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 8 Aug 2025 17:23:25 +0000 Subject: [PATCH 215/391] chore(deps): update github/codeql-action digest to 4474150 (#1547) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index a3085f90c..8ba31b911 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@6fe50b283a3d2e5533299f72d99216cd8815500f + uses: github/codeql-action/init@4474150eef8c855ab74a7f19f3ae525e469d2de6 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@6fe50b283a3d2e5533299f72d99216cd8815500f + uses: github/codeql-action/analyze@4474150eef8c855ab74a7f19f3ae525e469d2de6 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index e8d7d5635..1062db2c3 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@6fe50b283a3d2e5533299f72d99216cd8815500f + uses: github/codeql-action/init@4474150eef8c855ab74a7f19f3ae525e469d2de6 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@6fe50b283a3d2e5533299f72d99216cd8815500f + uses: github/codeql-action/autobuild@4474150eef8c855ab74a7f19f3ae525e469d2de6 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@6fe50b283a3d2e5533299f72d99216cd8815500f + uses: github/codeql-action/analyze@4474150eef8c855ab74a7f19f3ae525e469d2de6 From f2fef65eb580b1960ad15b2c46ebe40855551be3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 10 Aug 2025 04:35:37 +0000 Subject: [PATCH 216/391] fix(deps): update dependency com.github.spotbugs:spotbugs to v4.9.4 (#1548) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index a64987c34..92bb0c1ca 100644 --- a/pom.xml +++ b/pom.xml @@ -60,7 +60,7 @@ com.github.spotbugs spotbugs - 4.8.6 + 4.9.4 provided @@ -419,7 +419,7 @@ com.github.spotbugs spotbugs - 4.8.6 + 4.9.4 From 7f487ee7ecd1c69a63d22eca140bc422a0afc963 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 16:26:43 +0200 Subject: [PATCH 217/391] chore(deps): update actions/cache digest to 638ed79 (#1549) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 03ba304e4..16712ed2a 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -33,7 +33,7 @@ jobs: server-password: ${{ secrets.CENTRAL_PASSWORD }} - name: Cache local Maven repository - uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 + uses: actions/cache@638ed79f9dc94c1de1baef91bcab5edaa19451f4 with: path: ~/.m2/repository key: ${{ runner.os }}-17-maven-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 8ba31b911..a654a9114 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -34,7 +34,7 @@ jobs: languages: java - name: Cache local Maven repository - uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 + uses: actions/cache@638ed79f9dc94c1de1baef91bcab5edaa19451f4 with: path: ~/.m2/repository key: ${{ runner.os }}${{ matrix.build.java }}-maven-${{ hashFiles('**/pom.xml') }} From 527e3f836f664ecace1018de84502592ee75007c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 18:36:18 +0000 Subject: [PATCH 218/391] chore(deps): update actions/checkout digest to 08c6903 (#1550) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/static-code-scanning.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 16712ed2a..b5b40ae6c 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8edcb1bdb4e267140fa742c62e395cd74f332709 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - name: Set up JDK 17 uses: actions/setup-java@e9343db97e09d87a3c50e544105d99fe912c204b with: diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index a654a9114..08a88a7ee 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -19,7 +19,7 @@ jobs: runs-on: ${{ matrix.os}} steps: - name: Check out the code - uses: actions/checkout@8edcb1bdb4e267140fa742c62e395cd74f332709 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - name: Set up JDK 11 uses: actions/setup-java@e9343db97e09d87a3c50e544105d99fe912c204b diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 347cad75d..2a31ffe49 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,7 +37,7 @@ jobs: steps: - name: Checkout Repository - uses: actions/checkout@8edcb1bdb4e267140fa742c62e395cd74f332709 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - name: Set up JDK 17 uses: actions/setup-java@e9343db97e09d87a3c50e544105d99fe912c204b diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 1062db2c3..e6c720ce0 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -29,7 +29,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@8edcb1bdb4e267140fa742c62e395cd74f332709 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL From ce2b6e88313ea500c2b71f0b4c06ad4a12522f3e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 21:22:45 +0000 Subject: [PATCH 219/391] chore(deps): update github/codeql-action digest to c6dcdfa (#1551) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 08a88a7ee..a95814a9b 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@4474150eef8c855ab74a7f19f3ae525e469d2de6 + uses: github/codeql-action/init@c6dcdfa33a7454bb54083cae422eb0d285ad74bc with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@4474150eef8c855ab74a7f19f3ae525e469d2de6 + uses: github/codeql-action/analyze@c6dcdfa33a7454bb54083cae422eb0d285ad74bc diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index e6c720ce0..9733bb3ce 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@4474150eef8c855ab74a7f19f3ae525e469d2de6 + uses: github/codeql-action/init@c6dcdfa33a7454bb54083cae422eb0d285ad74bc with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@4474150eef8c855ab74a7f19f3ae525e469d2de6 + uses: github/codeql-action/autobuild@c6dcdfa33a7454bb54083cae422eb0d285ad74bc - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@4474150eef8c855ab74a7f19f3ae525e469d2de6 + uses: github/codeql-action/analyze@c6dcdfa33a7454bb54083cae422eb0d285ad74bc From d2f85d5a9e42c0e336546684b27a1e77edc4c620 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 08:15:02 +0200 Subject: [PATCH 220/391] chore(deps): update dependency com.puppycrawl.tools:checkstyle to v11 (#1543) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 92bb0c1ca..7215c25c6 100644 --- a/pom.xml +++ b/pom.xml @@ -447,7 +447,7 @@ com.puppycrawl.tools checkstyle - 10.26.1 + 11.0.0 From 4bae3294b20f19550a878f331cba2377df14f7c1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 17:10:29 +0000 Subject: [PATCH 221/391] chore(deps): update github/codeql-action digest to eef4c44 (#1552) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index a95814a9b..b22d3c2a5 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@c6dcdfa33a7454bb54083cae422eb0d285ad74bc + uses: github/codeql-action/init@eef4c44f6bb262e0bbf01432030812aaaabdebf3 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@c6dcdfa33a7454bb54083cae422eb0d285ad74bc + uses: github/codeql-action/analyze@eef4c44f6bb262e0bbf01432030812aaaabdebf3 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 9733bb3ce..07868de79 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@c6dcdfa33a7454bb54083cae422eb0d285ad74bc + uses: github/codeql-action/init@eef4c44f6bb262e0bbf01432030812aaaabdebf3 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@c6dcdfa33a7454bb54083cae422eb0d285ad74bc + uses: github/codeql-action/autobuild@eef4c44f6bb262e0bbf01432030812aaaabdebf3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@c6dcdfa33a7454bb54083cae422eb0d285ad74bc + uses: github/codeql-action/analyze@eef4c44f6bb262e0bbf01432030812aaaabdebf3 From 35fe5b41bc971f8bc41b82b8c0ef50d719071301 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 13 Aug 2025 22:14:25 +0000 Subject: [PATCH 222/391] chore(deps): update actions/checkout digest to ff7abcd (#1554) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/static-code-scanning.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index b5b40ae6c..fab41ccf6 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 + - uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 - name: Set up JDK 17 uses: actions/setup-java@e9343db97e09d87a3c50e544105d99fe912c204b with: diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index b22d3c2a5..df7a9fcab 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -19,7 +19,7 @@ jobs: runs-on: ${{ matrix.os}} steps: - name: Check out the code - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 + uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 - name: Set up JDK 11 uses: actions/setup-java@e9343db97e09d87a3c50e544105d99fe912c204b diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2a31ffe49..25217734e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,7 +37,7 @@ jobs: steps: - name: Checkout Repository - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 + uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 - name: Set up JDK 17 uses: actions/setup-java@e9343db97e09d87a3c50e544105d99fe912c204b diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 07868de79..fd039c95b 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -29,7 +29,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 + uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL From 88ded5d9290b3c008a597cf55bb1e1f4c05e40ec Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 14 Aug 2025 07:30:04 +0200 Subject: [PATCH 223/391] chore(deps): update github/codeql-action digest to 7eb43b0 (#1555) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index df7a9fcab..88cb3ba00 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@eef4c44f6bb262e0bbf01432030812aaaabdebf3 + uses: github/codeql-action/init@7eb43b07886e77d5f743a800ad7a8a380f9f3ea3 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@eef4c44f6bb262e0bbf01432030812aaaabdebf3 + uses: github/codeql-action/analyze@7eb43b07886e77d5f743a800ad7a8a380f9f3ea3 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index fd039c95b..9278b0f96 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@eef4c44f6bb262e0bbf01432030812aaaabdebf3 + uses: github/codeql-action/init@7eb43b07886e77d5f743a800ad7a8a380f9f3ea3 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@eef4c44f6bb262e0bbf01432030812aaaabdebf3 + uses: github/codeql-action/autobuild@7eb43b07886e77d5f743a800ad7a8a380f9f3ea3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@eef4c44f6bb262e0bbf01432030812aaaabdebf3 + uses: github/codeql-action/analyze@7eb43b07886e77d5f743a800ad7a8a380f9f3ea3 From 8a6c79627a492eb61ed35ffa91035b0737598b64 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 14 Aug 2025 05:37:13 +0000 Subject: [PATCH 224/391] chore(deps): update amannn/action-semantic-pull-request digest to fdd4d3d (#1553) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/lint-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml index 50c295b5d..4537a5d5f 100644 --- a/.github/workflows/lint-pr.yml +++ b/.github/workflows/lint-pr.yml @@ -18,6 +18,6 @@ jobs: name: Validate PR title runs-on: ubuntu-latest steps: - - uses: amannn/action-semantic-pull-request@335288255954904a41ddda8947c8f2c844b8bfeb + - uses: amannn/action-semantic-pull-request@fdd4d3ddf614fbcd8c29e4b106d3bbe0cb2c605d env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 03a8018098bbced558e157b60e7ba3ff18527db6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 14 Aug 2025 16:32:17 +0000 Subject: [PATCH 225/391] chore(deps): update github/codeql-action digest to 777f917 (#1556) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 88cb3ba00..3522c4ee8 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@7eb43b07886e77d5f743a800ad7a8a380f9f3ea3 + uses: github/codeql-action/init@777f9173e88451d6cac565660317ea94437a9587 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@7eb43b07886e77d5f743a800ad7a8a380f9f3ea3 + uses: github/codeql-action/analyze@777f9173e88451d6cac565660317ea94437a9587 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 9278b0f96..098e70191 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@7eb43b07886e77d5f743a800ad7a8a380f9f3ea3 + uses: github/codeql-action/init@777f9173e88451d6cac565660317ea94437a9587 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@7eb43b07886e77d5f743a800ad7a8a380f9f3ea3 + uses: github/codeql-action/autobuild@777f9173e88451d6cac565660317ea94437a9587 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@7eb43b07886e77d5f743a800ad7a8a380f9f3ea3 + uses: github/codeql-action/analyze@777f9173e88451d6cac565660317ea94437a9587 From dff54123ab38fd3ad59809e5f863b6ace17e4da4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 12:59:02 +0000 Subject: [PATCH 226/391] chore(deps): update dependency org.mockito:mockito-core to v5.19.0 (#1557) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7215c25c6..d3dbdbeb1 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ UTF-8 11 ${maven.compiler.source} - 5.18.0 + 5.19.0 **/e2e/*.java ${project.groupId}.${project.artifactId} From f1165da1b910efda6dbe486a21eb7985cccf11ae Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 20:30:10 +0000 Subject: [PATCH 227/391] chore(deps): update github/codeql-action digest to 2330521 (#1558) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 3522c4ee8..1d7022ed9 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@777f9173e88451d6cac565660317ea94437a9587 + uses: github/codeql-action/init@233052189b8c862bfaf875fb02c115f54d2b9286 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@777f9173e88451d6cac565660317ea94437a9587 + uses: github/codeql-action/analyze@233052189b8c862bfaf875fb02c115f54d2b9286 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 098e70191..c1827bd36 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@777f9173e88451d6cac565660317ea94437a9587 + uses: github/codeql-action/init@233052189b8c862bfaf875fb02c115f54d2b9286 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@777f9173e88451d6cac565660317ea94437a9587 + uses: github/codeql-action/autobuild@233052189b8c862bfaf875fb02c115f54d2b9286 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@777f9173e88451d6cac565660317ea94437a9587 + uses: github/codeql-action/analyze@233052189b8c862bfaf875fb02c115f54d2b9286 From 6fbc9d6cca5716b7477f84ff4093ccc6af06d4e6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 16 Aug 2025 14:30:52 +0000 Subject: [PATCH 228/391] chore(deps): update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.11.3 (#1559) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d3dbdbeb1..d715cb4ee 100644 --- a/pom.xml +++ b/pom.xml @@ -549,7 +549,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.11.2 + 3.11.3 true all,-missing From 124c26f6ea2d20cebb7520afcd94ab6b6c8c8e7b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 17 Aug 2025 05:04:16 +0000 Subject: [PATCH 229/391] chore(deps): update dependency net.bytebuddy:byte-buddy to v1.17.7 (#1560) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d715cb4ee..c51613575 100644 --- a/pom.xml +++ b/pom.xml @@ -179,7 +179,7 @@ net.bytebuddy byte-buddy - 1.17.6 + 1.17.7 test From 84887bfc86eb4905f52bce4641c35a8909f2c463 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 17 Aug 2025 08:23:26 +0000 Subject: [PATCH 230/391] chore(deps): update dependency net.bytebuddy:byte-buddy-agent to v1.17.7 (#1561) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c51613575..4bf71257a 100644 --- a/pom.xml +++ b/pom.xml @@ -186,7 +186,7 @@ net.bytebuddy byte-buddy-agent - 1.17.6 + 1.17.7 test From 508bdac4f075e2cd374dd1728919cfc1619d0097 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 17 Aug 2025 12:20:01 +0200 Subject: [PATCH 231/391] fix(deps): update dependency io.cucumber:cucumber-bom to v7.27.1 (#1562) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4bf71257a..aadaa0236 100644 --- a/pom.xml +++ b/pom.xml @@ -194,7 +194,7 @@ io.cucumber cucumber-bom - 7.27.0 + 7.27.1 pom import From 19c2a1272a34040f3ac2b603c2bcb645f3707a82 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 13:53:53 +0200 Subject: [PATCH 232/391] chore(deps): update github/codeql-action digest to 6ec994e (#1564) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 1d7022ed9..eb6167915 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@233052189b8c862bfaf875fb02c115f54d2b9286 + uses: github/codeql-action/init@6ec994ecba29cf3cf0724e281b919d68714895ce with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@233052189b8c862bfaf875fb02c115f54d2b9286 + uses: github/codeql-action/analyze@6ec994ecba29cf3cf0724e281b919d68714895ce diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index c1827bd36..ca6f5cafa 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@233052189b8c862bfaf875fb02c115f54d2b9286 + uses: github/codeql-action/init@6ec994ecba29cf3cf0724e281b919d68714895ce with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@233052189b8c862bfaf875fb02c115f54d2b9286 + uses: github/codeql-action/autobuild@6ec994ecba29cf3cf0724e281b919d68714895ce - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@233052189b8c862bfaf875fb02c115f54d2b9286 + uses: github/codeql-action/analyze@6ec994ecba29cf3cf0724e281b919d68714895ce From 47af5279d6abd0080eae16d630bd202976f9a4b1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 12:00:26 +0000 Subject: [PATCH 233/391] chore(deps): update amannn/action-semantic-pull-request digest to a46a7c8 (#1563) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/lint-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml index 4537a5d5f..2b81d26fc 100644 --- a/.github/workflows/lint-pr.yml +++ b/.github/workflows/lint-pr.yml @@ -18,6 +18,6 @@ jobs: name: Validate PR title runs-on: ubuntu-latest steps: - - uses: amannn/action-semantic-pull-request@fdd4d3ddf614fbcd8c29e4b106d3bbe0cb2c605d + - uses: amannn/action-semantic-pull-request@a46a7c8dc4bb34503174eba2f2f7ef80dffc8ed7 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ea23114d424ce042681d6b42cdc6b2e2086ccbf8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 17:52:00 +0000 Subject: [PATCH 234/391] chore(deps): update github/codeql-action digest to e96e340 (#1565) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index eb6167915..47d60a904 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@6ec994ecba29cf3cf0724e281b919d68714895ce + uses: github/codeql-action/init@e96e340c1e95e91449de06aabfa9525b7b98113f with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@6ec994ecba29cf3cf0724e281b919d68714895ce + uses: github/codeql-action/analyze@e96e340c1e95e91449de06aabfa9525b7b98113f diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index ca6f5cafa..8e971c0cf 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@6ec994ecba29cf3cf0724e281b919d68714895ce + uses: github/codeql-action/init@e96e340c1e95e91449de06aabfa9525b7b98113f with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@6ec994ecba29cf3cf0724e281b919d68714895ce + uses: github/codeql-action/autobuild@e96e340c1e95e91449de06aabfa9525b7b98113f - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@6ec994ecba29cf3cf0724e281b919d68714895ce + uses: github/codeql-action/analyze@e96e340c1e95e91449de06aabfa9525b7b98113f From 8a9f25177f2d4bab1b5215f172bbb8ed1a5ad788 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 22:52:24 +0000 Subject: [PATCH 235/391] fix(deps): update dependency io.cucumber:cucumber-bom to v7.27.2 (#1566) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index aadaa0236..360148608 100644 --- a/pom.xml +++ b/pom.xml @@ -194,7 +194,7 @@ io.cucumber cucumber-bom - 7.27.1 + 7.27.2 pom import From c8d48e1a739f02b25e7980dcd5652851756729f2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 18:46:55 +0000 Subject: [PATCH 236/391] chore(deps): update amannn/action-semantic-pull-request digest to 24e6f01 (#1568) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/lint-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml index 2b81d26fc..d35937a43 100644 --- a/.github/workflows/lint-pr.yml +++ b/.github/workflows/lint-pr.yml @@ -18,6 +18,6 @@ jobs: name: Validate PR title runs-on: ubuntu-latest steps: - - uses: amannn/action-semantic-pull-request@a46a7c8dc4bb34503174eba2f2f7ef80dffc8ed7 + - uses: amannn/action-semantic-pull-request@24e6f016c1e110f5353026c0b6129a4118b9146c env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 907b75d3481e71621249b0246e0ca67c42c9a890 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 00:08:00 +0000 Subject: [PATCH 237/391] chore(deps): update github/codeql-action digest to 6dee5bc (#1569) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 47d60a904..6b34bc33c 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@e96e340c1e95e91449de06aabfa9525b7b98113f + uses: github/codeql-action/init@6dee5bc9c165ca206a70f4e3d18271971cf6ff26 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@e96e340c1e95e91449de06aabfa9525b7b98113f + uses: github/codeql-action/analyze@6dee5bc9c165ca206a70f4e3d18271971cf6ff26 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 8e971c0cf..b03adc251 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@e96e340c1e95e91449de06aabfa9525b7b98113f + uses: github/codeql-action/init@6dee5bc9c165ca206a70f4e3d18271971cf6ff26 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@e96e340c1e95e91449de06aabfa9525b7b98113f + uses: github/codeql-action/autobuild@6dee5bc9c165ca206a70f4e3d18271971cf6ff26 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@e96e340c1e95e91449de06aabfa9525b7b98113f + uses: github/codeql-action/analyze@6dee5bc9c165ca206a70f4e3d18271971cf6ff26 From fb6ab353b403542a1f7e6ccafb07e25ae1d5e2be Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 23:59:33 +0000 Subject: [PATCH 238/391] chore(deps): update amannn/action-semantic-pull-request digest to 677b895 (#1570) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/lint-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml index d35937a43..75bf2eee0 100644 --- a/.github/workflows/lint-pr.yml +++ b/.github/workflows/lint-pr.yml @@ -18,6 +18,6 @@ jobs: name: Validate PR title runs-on: ubuntu-latest steps: - - uses: amannn/action-semantic-pull-request@24e6f016c1e110f5353026c0b6129a4118b9146c + - uses: amannn/action-semantic-pull-request@677b89571e961351de6fcbd96c8b2503787962e2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 58c82de9656562f137feafb9e6eff20521695803 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 21 Aug 2025 02:24:56 +0000 Subject: [PATCH 239/391] chore(deps): update actions/setup-java digest to 0913e9a (#1572) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index fab41ccf6..6b9f87b2f 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 - name: Set up JDK 17 - uses: actions/setup-java@e9343db97e09d87a3c50e544105d99fe912c204b + uses: actions/setup-java@0913e9a06eb8b69c62db76aa61f580c2b3a5b4e0 with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 6b34bc33c..717efaf91 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 - name: Set up JDK 11 - uses: actions/setup-java@e9343db97e09d87a3c50e544105d99fe912c204b + uses: actions/setup-java@0913e9a06eb8b69c62db76aa61f580c2b3a5b4e0 with: java-version: ${{ matrix.build.java }} distribution: 'temurin' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 25217734e..4cddbd9f0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 - name: Set up JDK 17 - uses: actions/setup-java@e9343db97e09d87a3c50e544105d99fe912c204b + uses: actions/setup-java@0913e9a06eb8b69c62db76aa61f580c2b3a5b4e0 with: java-version: '17' distribution: 'temurin' From fc7ec6511fd92c872e55e2b4f96f1dc6215ed029 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 21 Aug 2025 05:31:57 +0000 Subject: [PATCH 240/391] chore(deps): update github/codeql-action digest to db69a51 (#1571) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 717efaf91..866f504c7 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@6dee5bc9c165ca206a70f4e3d18271971cf6ff26 + uses: github/codeql-action/init@db69a5182d331d562e511302ae3c9aafd5fada6c with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@6dee5bc9c165ca206a70f4e3d18271971cf6ff26 + uses: github/codeql-action/analyze@db69a5182d331d562e511302ae3c9aafd5fada6c diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index b03adc251..a840e24b9 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@6dee5bc9c165ca206a70f4e3d18271971cf6ff26 + uses: github/codeql-action/init@db69a5182d331d562e511302ae3c9aafd5fada6c with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@6dee5bc9c165ca206a70f4e3d18271971cf6ff26 + uses: github/codeql-action/autobuild@db69a5182d331d562e511302ae3c9aafd5fada6c - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@6dee5bc9c165ca206a70f4e3d18271971cf6ff26 + uses: github/codeql-action/analyze@db69a5182d331d562e511302ae3c9aafd5fada6c From d33222439e84435baeb0a49d33651208e659ad27 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 21 Aug 2025 08:29:30 +0200 Subject: [PATCH 241/391] chore(deps): update actions/setup-java digest to dded088 (#1574) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 6b9f87b2f..7f20015c3 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 - name: Set up JDK 17 - uses: actions/setup-java@0913e9a06eb8b69c62db76aa61f580c2b3a5b4e0 + uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 866f504c7..8f7c9dd0b 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 - name: Set up JDK 11 - uses: actions/setup-java@0913e9a06eb8b69c62db76aa61f580c2b3a5b4e0 + uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 with: java-version: ${{ matrix.build.java }} distribution: 'temurin' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4cddbd9f0..5669160e9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 - name: Set up JDK 17 - uses: actions/setup-java@0913e9a06eb8b69c62db76aa61f580c2b3a5b4e0 + uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 with: java-version: '17' distribution: 'temurin' From 2c2b380e13d2be5a988b70212ea243efdb60999b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 21 Aug 2025 06:36:00 +0000 Subject: [PATCH 242/391] chore(deps): update codecov/codecov-action action to v5.5.0 (#1573) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 7f20015c3..2aa47264f 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -50,7 +50,7 @@ jobs: run: mvn --batch-mode --update-snapshots verify - name: Upload coverage to Codecov - uses: codecov/codecov-action@v5.4.3 + uses: codecov/codecov-action@v5.5.0 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos flags: unittests # optional diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 8f7c9dd0b..4c91ab906 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -46,7 +46,7 @@ jobs: - if: matrix.build.java == '17' name: Upload coverage to Codecov - uses: codecov/codecov-action@v5.4.3 + uses: codecov/codecov-action@v5.5.0 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos flags: unittests # optional From d9c1df0c5ec247f64c37648128d56b7e83444ca9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 02:46:37 +0000 Subject: [PATCH 243/391] chore(deps): update github/codeql-action digest to 5b49155 (#1575) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 4c91ab906..2c88440d0 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@db69a5182d331d562e511302ae3c9aafd5fada6c + uses: github/codeql-action/init@5b49155c7f37b5ec074ffd26b428e6b64b1bf412 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@db69a5182d331d562e511302ae3c9aafd5fada6c + uses: github/codeql-action/analyze@5b49155c7f37b5ec074ffd26b428e6b64b1bf412 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index a840e24b9..36b4ef34c 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@db69a5182d331d562e511302ae3c9aafd5fada6c + uses: github/codeql-action/init@5b49155c7f37b5ec074ffd26b428e6b64b1bf412 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@db69a5182d331d562e511302ae3c9aafd5fada6c + uses: github/codeql-action/autobuild@5b49155c7f37b5ec074ffd26b428e6b64b1bf412 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@db69a5182d331d562e511302ae3c9aafd5fada6c + uses: github/codeql-action/analyze@5b49155c7f37b5ec074ffd26b428e6b64b1bf412 From 894165ddd7216dc30c1ca4c9f43c0a4c21970f17 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 02:57:20 +0000 Subject: [PATCH 244/391] chore(deps): update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.9.4.0 (#1576) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 360148608..ddbbc3563 100644 --- a/pom.xml +++ b/pom.xml @@ -403,7 +403,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.9.3.2 + 4.9.4.0 spotbugs-exclusions.xml From 532ad2f3d404753189a529cdc262ba6ef8d3d586 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 18:59:57 +0000 Subject: [PATCH 245/391] chore(deps): update amannn/action-semantic-pull-request digest to e7d011b (#1577) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/lint-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml index 75bf2eee0..7629cb0c7 100644 --- a/.github/workflows/lint-pr.yml +++ b/.github/workflows/lint-pr.yml @@ -18,6 +18,6 @@ jobs: name: Validate PR title runs-on: ubuntu-latest steps: - - uses: amannn/action-semantic-pull-request@677b89571e961351de6fcbd96c8b2503787962e2 + - uses: amannn/action-semantic-pull-request@e7d011b07ef37e089bea6539210f6a0d360d8af9 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 5efac69dae28ff26227e5a9e83c6edbea9b9b6b5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 28 Aug 2025 17:13:21 +0000 Subject: [PATCH 246/391] chore(deps): update github/codeql-action digest to a880e53 (#1581) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 2c88440d0..42a991537 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@5b49155c7f37b5ec074ffd26b428e6b64b1bf412 + uses: github/codeql-action/init@a880e53ace196b47e0797a3df224607ff5a52f96 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@5b49155c7f37b5ec074ffd26b428e6b64b1bf412 + uses: github/codeql-action/analyze@a880e53ace196b47e0797a3df224607ff5a52f96 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 36b4ef34c..d32f0473c 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@5b49155c7f37b5ec074ffd26b428e6b64b1bf412 + uses: github/codeql-action/init@a880e53ace196b47e0797a3df224607ff5a52f96 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@5b49155c7f37b5ec074ffd26b428e6b64b1bf412 + uses: github/codeql-action/autobuild@a880e53ace196b47e0797a3df224607ff5a52f96 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@5b49155c7f37b5ec074ffd26b428e6b64b1bf412 + uses: github/codeql-action/analyze@a880e53ace196b47e0797a3df224607ff5a52f96 From 080fc6e9a60c15eb748891245258c9c5378e4248 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 31 Aug 2025 12:34:45 +0000 Subject: [PATCH 247/391] chore(deps): update github/codeql-action digest to 02ab253 (#1583) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 42a991537..857b134f6 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@a880e53ace196b47e0797a3df224607ff5a52f96 + uses: github/codeql-action/init@02ab253bd299d261d00cdf8a9bca38fea2697d50 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@a880e53ace196b47e0797a3df224607ff5a52f96 + uses: github/codeql-action/analyze@02ab253bd299d261d00cdf8a9bca38fea2697d50 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index d32f0473c..0c469ad82 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@a880e53ace196b47e0797a3df224607ff5a52f96 + uses: github/codeql-action/init@02ab253bd299d261d00cdf8a9bca38fea2697d50 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@a880e53ace196b47e0797a3df224607ff5a52f96 + uses: github/codeql-action/autobuild@02ab253bd299d261d00cdf8a9bca38fea2697d50 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@a880e53ace196b47e0797a3df224607ff5a52f96 + uses: github/codeql-action/analyze@02ab253bd299d261d00cdf8a9bca38fea2697d50 From cba90dd227514464fd90bd605f73c358748c09e1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 31 Aug 2025 16:22:03 +0000 Subject: [PATCH 248/391] chore(deps): update dependency maven-wrapper to v3.3.3 (#1584) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .mvn/wrapper/maven-wrapper.properties | 17 -- mvnw | 50 +++- mvnw.cmd | 338 ++++++++++++++------------ 3 files changed, 232 insertions(+), 173 deletions(-) diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 12fbe1e90..44f3cf2c1 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -1,19 +1,2 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -wrapperVersion=3.3.2 distributionType=only-script distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip diff --git a/mvnw b/mvnw index 19529ddf8..e9cf8d330 100644 --- a/mvnw +++ b/mvnw @@ -19,7 +19,7 @@ # ---------------------------------------------------------------------------- # ---------------------------------------------------------------------------- -# Apache Maven Wrapper startup batch script, version 3.3.2 +# Apache Maven Wrapper startup batch script, version 3.3.3 # # Optional ENV vars # ----------------- @@ -105,14 +105,17 @@ trim() { printf "%s" "${1}" | tr -d '[:space:]' } +scriptDir="$(dirname "$0")" +scriptName="$(basename "$0")" + # parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties while IFS="=" read -r key value; do case "${key-}" in distributionUrl) distributionUrl=$(trim "${value-}") ;; distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; esac -done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties" -[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties" +done <"$scriptDir/.mvn/wrapper/maven-wrapper.properties" +[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" case "${distributionUrl##*/}" in maven-mvnd-*bin.*) @@ -130,7 +133,7 @@ maven-mvnd-*bin.*) distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" ;; maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; -*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; +*) MVN_CMD="mvn${scriptName#mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; esac # apply MVNW_REPOURL and calculate MAVEN_HOME @@ -227,7 +230,7 @@ if [ -n "${distributionSha256Sum-}" ]; then echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 exit 1 elif command -v sha256sum >/dev/null; then - if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c - >/dev/null 2>&1; then distributionSha256Result=true fi elif command -v shasum >/dev/null; then @@ -252,8 +255,41 @@ if command -v unzip >/dev/null; then else tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" fi -printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url" -mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" + +# Find the actual extracted directory name (handles snapshots where filename != directory name) +actualDistributionDir="" + +# First try the expected directory name (for regular distributions) +if [ -d "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" ]; then + if [ -f "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/bin/$MVN_CMD" ]; then + actualDistributionDir="$distributionUrlNameMain" + fi +fi + +# If not found, search for any directory with the Maven executable (for snapshots) +if [ -z "$actualDistributionDir" ]; then + # enable globbing to iterate over items + set +f + for dir in "$TMP_DOWNLOAD_DIR"/*; do + if [ -d "$dir" ]; then + if [ -f "$dir/bin/$MVN_CMD" ]; then + actualDistributionDir="$(basename "$dir")" + break + fi + fi + done + set -f +fi + +if [ -z "$actualDistributionDir" ]; then + verbose "Contents of $TMP_DOWNLOAD_DIR:" + verbose "$(ls -la "$TMP_DOWNLOAD_DIR")" + die "Could not find Maven distribution directory in extracted archive" +fi + +verbose "Found extracted Maven distribution directory: $actualDistributionDir" +printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$actualDistributionDir/mvnw.url" +mv -- "$TMP_DOWNLOAD_DIR/$actualDistributionDir" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" clean || : exec_maven "$@" diff --git a/mvnw.cmd b/mvnw.cmd index 249bdf382..3fd2be860 100644 --- a/mvnw.cmd +++ b/mvnw.cmd @@ -1,149 +1,189 @@ -<# : batch portion -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- - -@REM ---------------------------------------------------------------------------- -@REM Apache Maven Wrapper startup batch script, version 3.3.2 -@REM -@REM Optional ENV vars -@REM MVNW_REPOURL - repo url base for downloading maven distribution -@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven -@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output -@REM ---------------------------------------------------------------------------- - -@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) -@SET __MVNW_CMD__= -@SET __MVNW_ERROR__= -@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% -@SET PSModulePath= -@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( - IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) -) -@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% -@SET __MVNW_PSMODULEP_SAVE= -@SET __MVNW_ARG0_NAME__= -@SET MVNW_USERNAME= -@SET MVNW_PASSWORD= -@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*) -@echo Cannot start maven from wrapper >&2 && exit /b 1 -@GOTO :EOF -: end batch / begin powershell #> - -$ErrorActionPreference = "Stop" -if ($env:MVNW_VERBOSE -eq "true") { - $VerbosePreference = "Continue" -} - -# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties -$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl -if (!$distributionUrl) { - Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" -} - -switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { - "maven-mvnd-*" { - $USE_MVND = $true - $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" - $MVN_CMD = "mvnd.cmd" - break - } - default { - $USE_MVND = $false - $MVN_CMD = $script -replace '^mvnw','mvn' - break - } -} - -# apply MVNW_REPOURL and calculate MAVEN_HOME -# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ -if ($env:MVNW_REPOURL) { - $MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" } - $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')" -} -$distributionUrlName = $distributionUrl -replace '^.*/','' -$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' -$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain" -if ($env:MAVEN_USER_HOME) { - $MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain" -} -$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' -$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" - -if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { - Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" - Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" - exit $? -} - -if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { - Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" -} - -# prepare tmp dir -$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile -$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" -$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null -trap { - if ($TMP_DOWNLOAD_DIR.Exists) { - try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } - catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } - } -} - -New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null - -# Download and Install Apache Maven -Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." -Write-Verbose "Downloading from: $distributionUrl" -Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" - -$webclient = New-Object System.Net.WebClient -if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { - $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) -} -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null - -# If specified, validate the SHA-256 sum of the Maven distribution zip file -$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum -if ($distributionSha256Sum) { - if ($USE_MVND) { - Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." - } - Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash - if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { - Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." - } -} - -# unzip and move -Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null -Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null -try { - Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null -} catch { - if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { - Write-Error "fail to move MAVEN_HOME" - } -} finally { - try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } - catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } -} - -Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" +<# : batch portion +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Apache Maven Wrapper startup batch script, version 3.3.3 +@REM +@REM Optional ENV vars +@REM MVNW_REPOURL - repo url base for downloading maven distribution +@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output +@REM ---------------------------------------------------------------------------- + +@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) +@SET __MVNW_CMD__= +@SET __MVNW_ERROR__= +@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% +@SET PSModulePath= +@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( + IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) +) +@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% +@SET __MVNW_PSMODULEP_SAVE= +@SET __MVNW_ARG0_NAME__= +@SET MVNW_USERNAME= +@SET MVNW_PASSWORD= +@IF NOT "%__MVNW_CMD__%"=="" ("%__MVNW_CMD__%" %*) +@echo Cannot start maven from wrapper >&2 && exit /b 1 +@GOTO :EOF +: end batch / begin powershell #> + +$ErrorActionPreference = "Stop" +if ($env:MVNW_VERBOSE -eq "true") { + $VerbosePreference = "Continue" +} + +# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties +$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl +if (!$distributionUrl) { + Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" +} + +switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { + "maven-mvnd-*" { + $USE_MVND = $true + $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" + $MVN_CMD = "mvnd.cmd" + break + } + default { + $USE_MVND = $false + $MVN_CMD = $script -replace '^mvnw','mvn' + break + } +} + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ +if ($env:MVNW_REPOURL) { + $MVNW_REPO_PATTERN = if ($USE_MVND -eq $False) { "/org/apache/maven/" } else { "/maven/mvnd/" } + $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace "^.*$MVNW_REPO_PATTERN",'')" +} +$distributionUrlName = $distributionUrl -replace '^.*/','' +$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' + +$MAVEN_M2_PATH = "$HOME/.m2" +if ($env:MAVEN_USER_HOME) { + $MAVEN_M2_PATH = "$env:MAVEN_USER_HOME" +} + +if (-not (Test-Path -Path $MAVEN_M2_PATH)) { + New-Item -Path $MAVEN_M2_PATH -ItemType Directory | Out-Null +} + +$MAVEN_WRAPPER_DISTS = $null +if ((Get-Item $MAVEN_M2_PATH).Target[0] -eq $null) { + $MAVEN_WRAPPER_DISTS = "$MAVEN_M2_PATH/wrapper/dists" +} else { + $MAVEN_WRAPPER_DISTS = (Get-Item $MAVEN_M2_PATH).Target[0] + "/wrapper/dists" +} + +$MAVEN_HOME_PARENT = "$MAVEN_WRAPPER_DISTS/$distributionUrlNameMain" +$MAVEN_HOME_NAME = ([System.Security.Cryptography.SHA256]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' +$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" + +if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { + Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" + Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" + exit $? +} + +if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { + Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" +} + +# prepare tmp dir +$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile +$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" +$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null +trap { + if ($TMP_DOWNLOAD_DIR.Exists) { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } + } +} + +New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null + +# Download and Install Apache Maven +Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +Write-Verbose "Downloading from: $distributionUrl" +Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +$webclient = New-Object System.Net.WebClient +if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { + $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) +} +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 +$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum +if ($distributionSha256Sum) { + if ($USE_MVND) { + Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." + } + Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash + if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { + Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." + } +} + +# unzip and move +Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null + +# Find the actual extracted directory name (handles snapshots where filename != directory name) +$actualDistributionDir = "" + +# First try the expected directory name (for regular distributions) +$expectedPath = Join-Path "$TMP_DOWNLOAD_DIR" "$distributionUrlNameMain" +$expectedMvnPath = Join-Path "$expectedPath" "bin/$MVN_CMD" +if ((Test-Path -Path $expectedPath -PathType Container) -and (Test-Path -Path $expectedMvnPath -PathType Leaf)) { + $actualDistributionDir = $distributionUrlNameMain +} + +# If not found, search for any directory with the Maven executable (for snapshots) +if (!$actualDistributionDir) { + Get-ChildItem -Path "$TMP_DOWNLOAD_DIR" -Directory | ForEach-Object { + $testPath = Join-Path $_.FullName "bin/$MVN_CMD" + if (Test-Path -Path $testPath -PathType Leaf) { + $actualDistributionDir = $_.Name + } + } +} + +if (!$actualDistributionDir) { + Write-Error "Could not find Maven distribution directory in extracted archive" +} + +Write-Verbose "Found extracted Maven distribution directory: $actualDistributionDir" +Rename-Item -Path "$TMP_DOWNLOAD_DIR/$actualDistributionDir" -NewName $MAVEN_HOME_NAME | Out-Null +try { + Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null +} catch { + if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { + Write-Error "fail to move MAVEN_HOME" + } +} finally { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } +} + +Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" From 8dd40fabcae6a90ee7abe1b0a0d8f55f345e3331 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 31 Aug 2025 20:45:50 +0000 Subject: [PATCH 249/391] chore(deps): update dependency com.puppycrawl.tools:checkstyle to v11.0.1 (#1585) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ddbbc3563..0cc91fb1f 100644 --- a/pom.xml +++ b/pom.xml @@ -447,7 +447,7 @@ com.puppycrawl.tools checkstyle - 11.0.0 + 11.0.1 From a08ff4d96ccf9236ad882892280b600a05409394 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 12 Sep 2025 01:57:03 +0000 Subject: [PATCH 250/391] chore(deps): update actions/setup-java digest to a7ab372 (#1589) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 2aa47264f..fcdc668d1 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 - name: Set up JDK 17 - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 + uses: actions/setup-java@a7ab372554b6eb1a8eb25e7d9aec1cc9f3ea1a76 with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 857b134f6..ed687234c 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 - name: Set up JDK 11 - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 + uses: actions/setup-java@a7ab372554b6eb1a8eb25e7d9aec1cc9f3ea1a76 with: java-version: ${{ matrix.build.java }} distribution: 'temurin' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5669160e9..f130b89d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 - name: Set up JDK 17 - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 + uses: actions/setup-java@a7ab372554b6eb1a8eb25e7d9aec1cc9f3ea1a76 with: java-version: '17' distribution: 'temurin' From 9e4881fdcb577a693cfe587b58dce5a74fb3caf4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 12 Sep 2025 09:05:10 +0000 Subject: [PATCH 251/391] chore(deps): update github/codeql-action digest to 0d33fd9 (#1590) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index ed687234c..f7af6d776 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@02ab253bd299d261d00cdf8a9bca38fea2697d50 + uses: github/codeql-action/init@0d33fd9f263def169b43518224e68932ef8cc79a with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@02ab253bd299d261d00cdf8a9bca38fea2697d50 + uses: github/codeql-action/analyze@0d33fd9f263def169b43518224e68932ef8cc79a diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 0c469ad82..8e27e55d2 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@02ab253bd299d261d00cdf8a9bca38fea2697d50 + uses: github/codeql-action/init@0d33fd9f263def169b43518224e68932ef8cc79a with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@02ab253bd299d261d00cdf8a9bca38fea2697d50 + uses: github/codeql-action/autobuild@0d33fd9f263def169b43518224e68932ef8cc79a - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@02ab253bd299d261d00cdf8a9bca38fea2697d50 + uses: github/codeql-action/analyze@0d33fd9f263def169b43518224e68932ef8cc79a From ca72b19d33985dfaae1cda009afd6795c5752259 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 12 Sep 2025 14:25:06 +0200 Subject: [PATCH 252/391] fix(deps): update dependency io.cucumber:cucumber-bom to v7.28.2 (#1593) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0cc91fb1f..c829914fa 100644 --- a/pom.xml +++ b/pom.xml @@ -194,7 +194,7 @@ io.cucumber cucumber-bom - 7.27.2 + 7.28.2 pom import From 8b3f7f07f4aa555301d484544939fa5a0b4de746 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 13 Sep 2025 01:54:11 +0000 Subject: [PATCH 253/391] chore(deps): update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.9.4.2 (#1592) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c829914fa..d833caba2 100644 --- a/pom.xml +++ b/pom.xml @@ -403,7 +403,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.9.4.0 + 4.9.4.2 spotbugs-exclusions.xml From e47913a07ee064fe340db978250710a7cb17795d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 13 Sep 2025 04:08:39 +0000 Subject: [PATCH 254/391] chore(deps): update codecov/codecov-action action to v5.5.1 (#1591) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index fcdc668d1..2a3633045 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -50,7 +50,7 @@ jobs: run: mvn --batch-mode --update-snapshots verify - name: Upload coverage to Codecov - uses: codecov/codecov-action@v5.5.0 + uses: codecov/codecov-action@v5.5.1 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos flags: unittests # optional diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index f7af6d776..76c90f40b 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -46,7 +46,7 @@ jobs: - if: matrix.build.java == '17' name: Upload coverage to Codecov - uses: codecov/codecov-action@v5.5.0 + uses: codecov/codecov-action@v5.5.1 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos flags: unittests # optional From 5df4317caa97bdd055ec1f809d2b5e49642b5312 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 13 Sep 2025 08:54:51 +0000 Subject: [PATCH 255/391] chore(deps): update github/codeql-action digest to aa90e97 (#1594) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 76c90f40b..67da3cb06 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@0d33fd9f263def169b43518224e68932ef8cc79a + uses: github/codeql-action/init@aa90e97ad2ed17cde6a43e89f70138299e64f837 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@0d33fd9f263def169b43518224e68932ef8cc79a + uses: github/codeql-action/analyze@aa90e97ad2ed17cde6a43e89f70138299e64f837 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 8e27e55d2..7c16abc16 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@0d33fd9f263def169b43518224e68932ef8cc79a + uses: github/codeql-action/init@aa90e97ad2ed17cde6a43e89f70138299e64f837 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@0d33fd9f263def169b43518224e68932ef8cc79a + uses: github/codeql-action/autobuild@aa90e97ad2ed17cde6a43e89f70138299e64f837 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@0d33fd9f263def169b43518224e68932ef8cc79a + uses: github/codeql-action/analyze@aa90e97ad2ed17cde6a43e89f70138299e64f837 From 3606154aa7ded57f41c324559268335531606b6c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 13 Sep 2025 11:41:50 +0000 Subject: [PATCH 256/391] chore(deps): update dependency org.apache.maven.plugins:maven-failsafe-plugin to v3.5.4 (#1596) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index d833caba2..c334e95fd 100644 --- a/pom.xml +++ b/pom.xml @@ -277,7 +277,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.5.3 + 3.5.4 ${surefireArgLine} @@ -679,7 +679,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.5.3 + 3.5.4 ${surefireArgLine} From a17bd3a388927781b86e91064748a71670bb2a2a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 13 Sep 2025 16:23:54 +0000 Subject: [PATCH 257/391] chore(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.5.4 (#1595) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index c334e95fd..437bce69a 100644 --- a/pom.xml +++ b/pom.xml @@ -258,7 +258,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.3 + 3.5.4 1 false @@ -663,7 +663,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.3 + 3.5.4 ${surefireArgLine} From e1812767b684b21d417e31dadc8d031cd64cdab1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 13 Sep 2025 17:02:04 +0000 Subject: [PATCH 258/391] fix(deps): update dependency org.projectlombok:lombok to v1.18.40 (#1597) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 437bce69a..0ffe763e7 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,7 @@ org.projectlombok lombok - 1.18.38 + 1.18.40 provided From 5474c736f711ed06cbca2bd0d4d0cfd458a54d10 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 15 Sep 2025 04:55:34 +0000 Subject: [PATCH 259/391] fix(deps): update dependency com.github.spotbugs:spotbugs to v4.9.5 (#1598) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0ffe763e7..ada93b719 100644 --- a/pom.xml +++ b/pom.xml @@ -60,7 +60,7 @@ com.github.spotbugs spotbugs - 4.9.4 + 4.9.5 provided @@ -419,7 +419,7 @@ com.github.spotbugs spotbugs - 4.9.4 + 4.9.5 From 1b08e3db42635bbe79c61437db2359bd74a98348 Mon Sep 17 00:00:00 2001 From: alexandraoberaigner <82218944+alexandraoberaigner@users.noreply.github.com> Date: Mon, 15 Sep 2025 14:50:16 +0200 Subject: [PATCH 260/391] feat: add hook data (#1587) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added hook data Signed-off-by: mdxabu * to support null values while maintaining thread safety, you must avoid ConcurrentHashMap and use a synchronized HashMap instead Signed-off-by: mdxabu * Build successfully runned:spotless plugin Signed-off-by: mdxabu * fixup: fix comment Co-authored-by: alexandraoberaigner <82218944+alexandraoberaigner@users.noreply.github.com> Signed-off-by: Simon Schrottner * fixup: remove synchronized map Co-authored-by: alexandraoberaigner <82218944+alexandraoberaigner@users.noreply.github.com> Signed-off-by: Simon Schrottner * fixup: removed unneeded import Signed-off-by: Simon Schrottner * fixup: spotless Signed-off-by: Simon Schrottner * Update src/main/java/dev/openfeature/sdk/HookData.java Co-authored-by: chrfwow Signed-off-by: Abu * Update src/main/java/dev/openfeature/sdk/HookData.java Co-authored-by: chrfwow Signed-off-by: Abu * feat: add support for hook data sharing between stages Signed-off-by: Alexandraย Oberaigner * fixup: tests Signed-off-by: Simon Schrottner * fixup: pr comments and extraction of own pair class Signed-off-by: Simon Schrottner * feat: add HookContext decorator Signed-off-by: Simon Schrottner * fixup: add default method for interface Signed-off-by: Simon Schrottner * feat: performance boost Signed-off-by: Simon Schrottner * feat: performance improvements Signed-off-by: Simon Schrottner * fixup: lazy init Signed-off-by: Simon Schrottner * fixup: pr comments Signed-off-by: Simon Schrottner --------- Signed-off-by: mdxabu Signed-off-by: Simon Schrottner Signed-off-by: Abu Signed-off-by: Alexandraย Oberaigner Co-authored-by: mdxabu Co-authored-by: Simon Schrottner Co-authored-by: Michael Beemer Co-authored-by: chrfwow --- .../java/dev/openfeature/sdk/HookContext.java | 63 +++--- .../openfeature/sdk/HookContextWithData.java | 50 +++++ .../sdk/HookContextWithoutData.java | 48 +++++ .../java/dev/openfeature/sdk/HookData.java | 81 ++++++++ .../java/dev/openfeature/sdk/HookSupport.java | 105 +++++++--- .../dev/openfeature/sdk/ImmutableContext.java | 2 + .../openfeature/sdk/OpenFeatureClient.java | 43 ++-- src/main/java/dev/openfeature/sdk/Pair.java | 28 +++ .../dev/openfeature/sdk/HookContextTest.java | 44 ++++- .../dev/openfeature/sdk/HookDataTest.java | 79 ++++++++ .../dev/openfeature/sdk/HookSupportTest.java | 184 ++++++++++++++++-- .../sdk/benchmark/AllocationBenchmark.java | 24 +++ 12 files changed, 642 insertions(+), 109 deletions(-) create mode 100644 src/main/java/dev/openfeature/sdk/HookContextWithData.java create mode 100644 src/main/java/dev/openfeature/sdk/HookContextWithoutData.java create mode 100644 src/main/java/dev/openfeature/sdk/HookData.java create mode 100644 src/main/java/dev/openfeature/sdk/Pair.java create mode 100644 src/test/java/dev/openfeature/sdk/HookDataTest.java diff --git a/src/main/java/dev/openfeature/sdk/HookContext.java b/src/main/java/dev/openfeature/sdk/HookContext.java index e14eeb643..e88e812a6 100644 --- a/src/main/java/dev/openfeature/sdk/HookContext.java +++ b/src/main/java/dev/openfeature/sdk/HookContext.java @@ -1,32 +1,13 @@ package dev.openfeature.sdk; -import lombok.Builder; -import lombok.NonNull; -import lombok.Value; -import lombok.With; +import dev.openfeature.sdk.HookContextWithoutData.HookContextWithoutDataBuilder; /** - * A data class to hold immutable context that {@link Hook} instances use. - * - * @param the type for the flag being evaluated + * A interface to hold immutable context that {@link Hook} instances use. */ -@Value -@Builder -@With -public class HookContext { - @NonNull String flagKey; - - @NonNull FlagValueType type; - - @NonNull T defaultValue; - - @NonNull EvaluationContext ctx; - - ClientMetadata clientMetadata; - Metadata providerMetadata; - +public interface HookContext { /** - * Builds a {@link HookContext} instances from request data. + * Builds a {@link HookContextWithoutData} instances from request data. * * @param key feature flag key * @param type flag value type @@ -36,21 +17,39 @@ public class HookContext { * @param defaultValue Fallback value * @param type that the flag is evaluating against * @return resulting context for hook + * @deprecated this should not be instantiated outside the SDK anymore */ - public static HookContext from( + @Deprecated + static HookContext from( String key, FlagValueType type, ClientMetadata clientMetadata, Metadata providerMetadata, EvaluationContext ctx, T defaultValue) { - return HookContext.builder() - .flagKey(key) - .type(type) - .clientMetadata(clientMetadata) - .providerMetadata(providerMetadata) - .ctx(ctx) - .defaultValue(defaultValue) - .build(); + return new HookContextWithoutData<>(key, type, defaultValue, ctx, clientMetadata, providerMetadata); + } + + /** + * Returns a builder for our default HookContext object. + */ + static HookContextWithoutDataBuilder builder() { + return HookContextWithoutData.builder(); + } + + String getFlagKey(); + + FlagValueType getType(); + + T getDefaultValue(); + + EvaluationContext getCtx(); + + ClientMetadata getClientMetadata(); + + Metadata getProviderMetadata(); + + default HookData getHookData() { + return null; } } diff --git a/src/main/java/dev/openfeature/sdk/HookContextWithData.java b/src/main/java/dev/openfeature/sdk/HookContextWithData.java new file mode 100644 index 000000000..137477c11 --- /dev/null +++ b/src/main/java/dev/openfeature/sdk/HookContextWithData.java @@ -0,0 +1,50 @@ +package dev.openfeature.sdk; + +class HookContextWithData implements HookContext { + private final HookContext context; + private final HookData data; + + private HookContextWithData(HookContext context, HookData data) { + this.context = context; + this.data = data; + } + + public static HookContextWithData of(HookContext context, HookData data) { + return new HookContextWithData<>(context, data); + } + + @Override + public String getFlagKey() { + return context.getFlagKey(); + } + + @Override + public FlagValueType getType() { + return context.getType(); + } + + @Override + public T getDefaultValue() { + return context.getDefaultValue(); + } + + @Override + public EvaluationContext getCtx() { + return context.getCtx(); + } + + @Override + public ClientMetadata getClientMetadata() { + return context.getClientMetadata(); + } + + @Override + public Metadata getProviderMetadata() { + return context.getProviderMetadata(); + } + + @Override + public HookData getHookData() { + return data; + } +} diff --git a/src/main/java/dev/openfeature/sdk/HookContextWithoutData.java b/src/main/java/dev/openfeature/sdk/HookContextWithoutData.java new file mode 100644 index 000000000..6e5394ee1 --- /dev/null +++ b/src/main/java/dev/openfeature/sdk/HookContextWithoutData.java @@ -0,0 +1,48 @@ +package dev.openfeature.sdk; + +import lombok.AccessLevel; +import lombok.Builder; +import lombok.Data; +import lombok.NonNull; +import lombok.Setter; +import lombok.With; + +/** + * A data class to hold immutable context that {@link Hook} instances use. + * + * @param the type for the flag being evaluated + */ +@Data +@Builder +@With +@Setter(AccessLevel.PRIVATE) +class HookContextWithoutData implements HookContext { + @NonNull String flagKey; + + @NonNull FlagValueType type; + + @NonNull T defaultValue; + + @Setter(AccessLevel.PACKAGE) + @NonNull EvaluationContext ctx; + + ClientMetadata clientMetadata; + Metadata providerMetadata; + + /** + * Builds a {@link HookContextWithoutData} instances from request data. + * + * @param key feature flag key + * @param type flag value type + * @param clientMetadata info on which client is calling + * @param providerMetadata info on the provider + * @param defaultValue Fallback value + * @param type that the flag is evaluating against + * @return resulting context for hook + */ + static HookContextWithoutData from( + String key, FlagValueType type, ClientMetadata clientMetadata, Metadata providerMetadata, T defaultValue) { + return new HookContextWithoutData<>( + key, type, defaultValue, ImmutableContext.EMPTY, clientMetadata, providerMetadata); + } +} diff --git a/src/main/java/dev/openfeature/sdk/HookData.java b/src/main/java/dev/openfeature/sdk/HookData.java new file mode 100644 index 000000000..c7c644a93 --- /dev/null +++ b/src/main/java/dev/openfeature/sdk/HookData.java @@ -0,0 +1,81 @@ +package dev.openfeature.sdk; + +import java.util.HashMap; +import java.util.Map; + +/** + * Hook data provides a way for hooks to maintain state across their execution stages. + * Each hook instance gets its own isolated data store that persists only for the duration + * of a single flag evaluation. + */ +public interface HookData { + + /** + * Sets a value for the given key. + * + * @param key the key to store the value under + * @param value the value to store + */ + void set(String key, Object value); + + /** + * Gets the value for the given key. + * + * @param key the key to retrieve the value for + * @return the value, or null if not found + */ + Object get(String key); + + /** + * Gets the value for the given key, cast to the specified type. + * + * @param the type to cast to + * @param key the key to retrieve the value for + * @param type the class to cast to + * @return the value cast to the specified type, or null if not found + * @throws ClassCastException if the value cannot be cast to the specified type + */ + T get(String key, Class type); + + /** + * Default implementation uses a HashMap. + */ + static HookData create() { + return new DefaultHookData(); + } + + /** + * Default implementation of HookData. + */ + class DefaultHookData implements HookData { + private Map data; + + @Override + public void set(String key, Object value) { + if (data == null) { + data = new HashMap<>(); + } + data.put(key, value); + } + + @Override + public Object get(String key) { + if (data == null) { + return null; + } + return data.get(key); + } + + @Override + public T get(String key, Class type) { + Object value = get(key); + if (value == null) { + return null; + } + if (!type.isInstance(value)) { + throw new ClassCastException("Value for key '" + key + "' is not of type " + type.getName()); + } + return type.cast(value); + } + } +} diff --git a/src/main/java/dev/openfeature/sdk/HookSupport.java b/src/main/java/dev/openfeature/sdk/HookSupport.java index 73518ee8e..e9ebbbe58 100644 --- a/src/main/java/dev/openfeature/sdk/HookSupport.java +++ b/src/main/java/dev/openfeature/sdk/HookSupport.java @@ -5,7 +5,7 @@ import java.util.List; import java.util.Map; import java.util.Optional; -import java.util.function.Consumer; +import java.util.function.BiConsumer; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -15,52 +15,81 @@ class HookSupport { public EvaluationContext beforeHooks( - FlagValueType flagValueType, HookContext hookCtx, List hooks, Map hints) { - return callBeforeHooks(flagValueType, hookCtx, hooks, hints); + FlagValueType flagValueType, + HookContext hookCtx, + List> hookDataPairs, + Map hints) { + return callBeforeHooks(flagValueType, hookCtx, hookDataPairs, hints); } public void afterHooks( FlagValueType flagValueType, HookContext hookContext, FlagEvaluationDetails details, - List hooks, + List> hookDataPairs, Map hints) { - executeHooksUnchecked(flagValueType, hooks, hook -> hook.after(hookContext, details, hints)); + executeHooksUnchecked( + flagValueType, hookDataPairs, hookContext, (hook, ctx) -> hook.after(ctx, details, hints)); } public void afterAllHooks( FlagValueType flagValueType, HookContext hookCtx, FlagEvaluationDetails details, - List hooks, + List> hookDataPairs, Map hints) { - executeHooks(flagValueType, hooks, "finally", hook -> hook.finallyAfter(hookCtx, details, hints)); + executeHooks( + flagValueType, + hookDataPairs, + hookCtx, + "finally", + (hook, ctx) -> hook.finallyAfter(ctx, details, hints)); } public void errorHooks( FlagValueType flagValueType, HookContext hookCtx, Exception e, - List hooks, + List> hookDataPairs, Map hints) { - executeHooks(flagValueType, hooks, "error", hook -> hook.error(hookCtx, e, hints)); + executeHooks(flagValueType, hookDataPairs, hookCtx, "error", (hook, ctx) -> hook.error(ctx, e, hints)); + } + + public List> getHookDataPairs(List hooks, FlagValueType flagValueType) { + var pairs = new ArrayList>(); + for (Hook hook : hooks) { + if (hook.supportsFlagValueType(flagValueType)) { + pairs.add(Pair.of(hook, HookData.create())); + } + } + return pairs; } private void executeHooks( - FlagValueType flagValueType, List hooks, String hookMethod, Consumer> hookCode) { - if (hooks != null) { - for (Hook hook : hooks) { - if (hook.supportsFlagValueType(flagValueType)) { - executeChecked(hook, hookCode, hookMethod); - } + FlagValueType flagValueType, + List> hookDataPairs, + HookContext hookContext, + String hookMethod, + BiConsumer, HookContext> hookCode) { + if (hookDataPairs != null) { + for (Pair hookDataPair : hookDataPairs) { + Hook hook = hookDataPair.getLeft(); + HookData hookData = hookDataPair.getRight(); + executeChecked(hook, hookData, hookContext, hookCode, hookMethod); } } } // before, error, and finally hooks shouldn't throw - private void executeChecked(Hook hook, Consumer> hookCode, String hookMethod) { + private void executeChecked( + Hook hook, + HookData hookData, + HookContext hookContext, + BiConsumer, HookContext> hookCode, + String hookMethod) { try { - hookCode.accept(hook); + var hookCtxWithData = HookContextWithData.of(hookContext, hookData); + hookCode.accept(hook, hookCtxWithData); } catch (Exception exception) { log.error( "Unhandled exception when running {} hook {} (only 'after' hooks should throw)", @@ -71,29 +100,41 @@ private void executeChecked(Hook hook, Consumer> hookCode, String } // after hooks can throw in order to do validation - private void executeHooksUnchecked(FlagValueType flagValueType, List hooks, Consumer> hookCode) { - if (hooks != null) { - for (Hook hook : hooks) { - if (hook.supportsFlagValueType(flagValueType)) { - hookCode.accept(hook); - } + private void executeHooksUnchecked( + FlagValueType flagValueType, + List> hookDataPairs, + HookContext hookContext, + BiConsumer, HookContext> hookCode) { + if (hookDataPairs != null) { + for (Pair hookDataPair : hookDataPairs) { + Hook hook = hookDataPair.getLeft(); + HookData hookData = hookDataPair.getRight(); + var hookCtxWithData = HookContextWithData.of(hookContext, hookData); + hookCode.accept(hook, hookCtxWithData); } } } private EvaluationContext callBeforeHooks( - FlagValueType flagValueType, HookContext hookCtx, List hooks, Map hints) { + FlagValueType flagValueType, + HookContext hookCtx, + List> hookDataPairs, + Map hints) { // These traverse backwards from normal. - List reversedHooks = new ArrayList<>(hooks); + List> reversedHooks = new ArrayList<>(hookDataPairs); Collections.reverse(reversedHooks); EvaluationContext context = hookCtx.getCtx(); - for (Hook hook : reversedHooks) { - if (hook.supportsFlagValueType(flagValueType)) { - Optional optional = - Optional.ofNullable(hook.before(hookCtx, hints)).orElse(Optional.empty()); - if (optional.isPresent()) { - context = context.merge(optional.get()); - } + + for (Pair hookDataPair : reversedHooks) { + Hook hook = hookDataPair.getLeft(); + HookData hookData = hookDataPair.getRight(); + + // Create a new context with this hook's data + HookContext contextWithHookData = HookContextWithData.of(hookCtx, hookData); + Optional optional = + Optional.ofNullable(hook.before(contextWithHookData, hints)).orElse(Optional.empty()); + if (optional.isPresent()) { + context = context.merge(optional.get()); } } return context; diff --git a/src/main/java/dev/openfeature/sdk/ImmutableContext.java b/src/main/java/dev/openfeature/sdk/ImmutableContext.java index 8560c369e..e4916dfca 100644 --- a/src/main/java/dev/openfeature/sdk/ImmutableContext.java +++ b/src/main/java/dev/openfeature/sdk/ImmutableContext.java @@ -20,6 +20,8 @@ @SuppressWarnings("PMD.BeanMembersShouldSerialize") public final class ImmutableContext implements EvaluationContext { + public static final ImmutableContext EMPTY = new ImmutableContext(); + @Delegate(excludes = DelegateExclusions.class) private final ImmutableStructure structure; diff --git a/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java b/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java index b5522b66a..10c359e3e 100644 --- a/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java +++ b/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java @@ -164,32 +164,27 @@ private FlagEvaluationDetails evaluateFlag( var hints = Collections.unmodifiableMap(flagOptions.getHookHints()); FlagEvaluationDetails details = null; - List mergedHooks = null; - HookContext afterHookContext = null; + List mergedHooks; + List> hookDataPairs = null; + HookContextWithoutData hookContext = null; try { - var stateManager = openfeatureApi.getFeatureProviderStateManager(this.domain); + final var stateManager = openfeatureApi.getFeatureProviderStateManager(this.domain); // provider must be accessed once to maintain a consistent reference - var provider = stateManager.getProvider(); - var state = stateManager.getState(); + final var provider = stateManager.getProvider(); + final var state = stateManager.getState(); + hookContext = + HookContextWithoutData.from(key, type, this.getMetadata(), provider.getMetadata(), defaultValue); + + // we are setting the evaluation context one after the other, so that we have a hook context in each + // possible exception case. + hookContext.setCtx(mergeEvaluationContext(ctx)); mergedHooks = ObjectUtils.merge( provider.getProviderHooks(), flagOptions.getHooks(), clientHooks, openfeatureApi.getMutableHooks()); - - var mergedCtx = hookSupport.beforeHooks( - type, - HookContext.from( - key, - type, - this.getMetadata(), - provider.getMetadata(), - mergeEvaluationContext(ctx), - defaultValue), - mergedHooks, - hints); - - afterHookContext = - HookContext.from(key, type, this.getMetadata(), provider.getMetadata(), mergedCtx, defaultValue); + hookDataPairs = hookSupport.getHookDataPairs(mergedHooks, type); + var mergedCtx = hookSupport.beforeHooks(type, hookContext, hookDataPairs, hints); + hookContext.setCtx(mergedCtx); // "short circuit" if the provider is in NOT_READY or FATAL state if (ProviderState.NOT_READY.equals(state)) { @@ -207,9 +202,9 @@ private FlagEvaluationDetails evaluateFlag( var error = ExceptionUtils.instantiateErrorByErrorCode(details.getErrorCode(), details.getErrorMessage()); enrichDetailsWithErrorDefaults(defaultValue, details); - hookSupport.errorHooks(type, afterHookContext, error, mergedHooks, hints); + hookSupport.errorHooks(type, hookContext, error, hookDataPairs, hints); } else { - hookSupport.afterHooks(type, afterHookContext, details, mergedHooks, hints); + hookSupport.afterHooks(type, hookContext, details, hookDataPairs, hints); } } catch (Exception e) { if (details == null) { @@ -222,9 +217,9 @@ private FlagEvaluationDetails evaluateFlag( } details.setErrorMessage(e.getMessage()); enrichDetailsWithErrorDefaults(defaultValue, details); - hookSupport.errorHooks(type, afterHookContext, e, mergedHooks, hints); + hookSupport.errorHooks(type, hookContext, e, hookDataPairs, hints); } finally { - hookSupport.afterAllHooks(type, afterHookContext, details, mergedHooks, hints); + hookSupport.afterAllHooks(type, hookContext, details, hookDataPairs, hints); } return details; diff --git a/src/main/java/dev/openfeature/sdk/Pair.java b/src/main/java/dev/openfeature/sdk/Pair.java new file mode 100644 index 000000000..bc6614093 --- /dev/null +++ b/src/main/java/dev/openfeature/sdk/Pair.java @@ -0,0 +1,28 @@ +package dev.openfeature.sdk; + +class Pair { + private final K key; + private final V value; + + private Pair(K key, V value) { + this.key = key; + this.value = value; + } + + public K getLeft() { + return key; + } + + public V getRight() { + return value; + } + + @Override + public String toString() { + return "Pair{" + "key=" + key + ", value=" + value + '}'; + } + + public static Pair of(K key, V value) { + return new Pair<>(key, value); + } +} diff --git a/src/test/java/dev/openfeature/sdk/HookContextTest.java b/src/test/java/dev/openfeature/sdk/HookContextTest.java index 2196b8b1f..123052b7d 100644 --- a/src/test/java/dev/openfeature/sdk/HookContextTest.java +++ b/src/test/java/dev/openfeature/sdk/HookContextTest.java @@ -1,6 +1,6 @@ package dev.openfeature.sdk; -import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.mock; import org.junit.jupiter.api.Test; @@ -29,4 +29,46 @@ void metadata_field_is_type_metadata() { "The before stage MUST run before flag resolution occurs. It accepts a hook context (required) and hook hints (optional) as parameters. It has no return value.") @Test void not_applicable_for_dynamic_context() {} + + @Test + void shouldCreateHookContextWithHookData() { + HookData hookData = HookData.create(); + hookData.set("test", "value"); + + HookContextWithData context = HookContextWithData.of(mock(HookContext.class), hookData); + + assertNotNull(context.getHookData()); + assertEquals("value", context.getHookData().get("test")); + } + + @Test + void shouldCreateHookContextWithoutHookData() { + HookContext context = HookContext.builder() + .flagKey("test-flag") + .type(FlagValueType.STRING) + .defaultValue("default") + .ctx(new ImmutableContext()) + .build(); + + assertNull(context.getHookData()); + } + + @Test + void shouldCreateHookContextWithHookDataUsingWith() { + HookContext originalContext = HookContext.builder() + .flagKey("test-flag") + .type(FlagValueType.STRING) + .defaultValue("default") + .ctx(new ImmutableContext()) + .build(); + + HookData hookData = HookData.create(); + hookData.set("timing", System.currentTimeMillis()); + + HookContext contextWithHookData = HookContextWithData.of(originalContext, hookData); + + assertNull(originalContext.getHookData()); + assertNotNull(contextWithHookData.getHookData()); + assertNotNull(contextWithHookData.getHookData().get("timing")); + } } diff --git a/src/test/java/dev/openfeature/sdk/HookDataTest.java b/src/test/java/dev/openfeature/sdk/HookDataTest.java new file mode 100644 index 000000000..eacbeeb78 --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/HookDataTest.java @@ -0,0 +1,79 @@ +package dev.openfeature.sdk; + +import static org.junit.jupiter.api.Assertions.*; + +import org.junit.jupiter.api.Test; + +class HookDataTest { + + @Test + void shouldStoreAndRetrieveValues() { + HookData hookData = HookData.create(); + + hookData.set("key1", "value1"); + hookData.set("key2", 42); + hookData.set("key3", true); + + assertEquals("value1", hookData.get("key1")); + assertEquals(42, hookData.get("key2")); + assertEquals(true, hookData.get("key3")); + } + + @Test + void shouldReturnNullForMissingKeys() { + HookData hookData = HookData.create(); + + assertNull(hookData.get("nonexistent")); + } + + @Test + void shouldSupportTypeSafeRetrieval() { + HookData hookData = HookData.create(); + + hookData.set("string", "hello"); + hookData.set("integer", 123); + hookData.set("boolean", false); + + assertEquals("hello", hookData.get("string", String.class)); + assertEquals(Integer.valueOf(123), hookData.get("integer", Integer.class)); + assertEquals(Boolean.FALSE, hookData.get("boolean", Boolean.class)); + } + + @Test + void shouldReturnNullForMissingKeysWithType() { + HookData hookData = HookData.create(); + + assertNull(hookData.get("missing", String.class)); + } + + @Test + void shouldThrowClassCastExceptionForWrongType() { + HookData hookData = HookData.create(); + + hookData.set("string", "not a number"); + + assertThrows(ClassCastException.class, () -> { + hookData.get("string", Integer.class); + }); + } + + @Test + void shouldOverwriteExistingValues() { + HookData hookData = HookData.create(); + + hookData.set("key", "original"); + assertEquals("original", hookData.get("key")); + + hookData.set("key", "updated"); + assertEquals("updated", hookData.get("key")); + } + + @Test + void shouldSupportNullValues() { + HookData hookData = HookData.create(); + + hookData.set("nullKey", null); + assertNull(hookData.get("nullKey")); + assertNull(hookData.get("nullKey", String.class)); + } +} diff --git a/src/test/java/dev/openfeature/sdk/HookSupportTest.java b/src/test/java/dev/openfeature/sdk/HookSupportTest.java index 02a8ff90c..67ec03d94 100644 --- a/src/test/java/dev/openfeature/sdk/HookSupportTest.java +++ b/src/test/java/dev/openfeature/sdk/HookSupportTest.java @@ -9,6 +9,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Optional; import org.junit.jupiter.api.DisplayName; @@ -23,8 +24,15 @@ void shouldMergeEvaluationContextsOnBeforeHooksCorrectly() { Map attributes = new HashMap<>(); attributes.put("baseKey", new Value("baseValue")); EvaluationContext baseContext = new ImmutableContext(attributes); - HookContext hookContext = new HookContext<>( - "flagKey", FlagValueType.STRING, "defaultValue", baseContext, () -> "client", () -> "provider"); + FlagValueType valueType = FlagValueType.STRING; + HookContext hookContext = HookContextWithoutData.builder() + .flagKey("flagKey") + .type(valueType) + .defaultValue("defaultValue") + .ctx(baseContext) + .clientMetadata(() -> "client") + .providerMetadata(() -> "provider") + .build(); Hook hook1 = mockStringHook(); Hook hook2 = mockStringHook(); when(hook1.before(any(), any())).thenReturn(Optional.of(evaluationContextWithValue("bla", "blubber"))); @@ -32,7 +40,10 @@ void shouldMergeEvaluationContextsOnBeforeHooksCorrectly() { HookSupport hookSupport = new HookSupport(); EvaluationContext result = hookSupport.beforeHooks( - FlagValueType.STRING, hookContext, Arrays.asList(hook1, hook2), Collections.emptyMap()); + valueType, + hookContext, + hookSupport.getHookDataPairs(Arrays.asList(hook1, hook2), valueType), + Collections.emptyMap()); assertThat(result.getValue("bla").asString()).isEqualTo("blubber"); assertThat(result.getValue("foo").asString()).isEqualTo("bar"); @@ -45,36 +56,32 @@ void shouldMergeEvaluationContextsOnBeforeHooksCorrectly() { void shouldAlwaysCallGenericHook(FlagValueType flagValueType) { Hook genericHook = mockGenericHook(); HookSupport hookSupport = new HookSupport(); + var hookDataPairs = hookSupport.getHookDataPairs(Collections.singletonList(genericHook), flagValueType); EvaluationContext baseContext = new ImmutableContext(); IllegalStateException expectedException = new IllegalStateException("All fine, just a test"); - HookContext hookContext = new HookContext<>( - "flagKey", - flagValueType, - createDefaultValue(flagValueType), - baseContext, - () -> "client", - () -> "provider"); + HookContext hookContext = HookContext.builder() + .flagKey("flagKey") + .type(flagValueType) + .defaultValue(createDefaultValue(flagValueType)) + .ctx(baseContext) + .clientMetadata(() -> "client") + .providerMetadata(() -> "provider") + .build(); - hookSupport.beforeHooks( - flagValueType, hookContext, Collections.singletonList(genericHook), Collections.emptyMap()); + hookSupport.beforeHooks(flagValueType, hookContext, hookDataPairs, Collections.emptyMap()); hookSupport.afterHooks( flagValueType, hookContext, FlagEvaluationDetails.builder().build(), - Collections.singletonList(genericHook), + hookDataPairs, Collections.emptyMap()); hookSupport.afterAllHooks( flagValueType, hookContext, FlagEvaluationDetails.builder().build(), - Collections.singletonList(genericHook), - Collections.emptyMap()); - hookSupport.errorHooks( - flagValueType, - hookContext, - expectedException, - Collections.singletonList(genericHook), + hookDataPairs, Collections.emptyMap()); + hookSupport.errorHooks(flagValueType, hookContext, expectedException, hookDataPairs, Collections.emptyMap()); verify(genericHook).before(any(), any()); verify(genericHook).after(any(), any(), any()); @@ -82,6 +89,101 @@ void shouldAlwaysCallGenericHook(FlagValueType flagValueType) { verify(genericHook).error(any(), any(), any()); } + @ParameterizedTest + @EnumSource(value = FlagValueType.class) + @DisplayName("should allow hooks to store and retrieve data across stages") + void shouldPassDataAcrossStages(FlagValueType flagValueType) { + HookSupport hookSupport = new HookSupport(); + HookContext hookContext = getObjectHookContext(flagValueType); + + TestHookWithData testHook = new TestHookWithData("test-key", "value"); + var pairs = hookSupport.getHookDataPairs(List.of(testHook), flagValueType); + + callAllHooks(flagValueType, hookSupport, hookContext, testHook); + + assertHookData(testHook, "value"); + } + + @ParameterizedTest + @EnumSource(value = FlagValueType.class) + @DisplayName("should isolate data between different hook instances") + void shouldIsolateDataBetweenHooks(FlagValueType flagValueType) { + HookSupport hookSupport = new HookSupport(); + HookContext hookContext = getObjectHookContext(flagValueType); + + TestHookWithData testHook1 = new TestHookWithData("test-key", "value-1"); + TestHookWithData testHook2 = new TestHookWithData("test-key", "value-2"); + var pairs = hookSupport.getHookDataPairs(List.of(testHook1, testHook2), flagValueType); + + callAllHooks(flagValueType, hookSupport, hookContext, pairs); + + assertHookData(testHook1, "value-1"); + assertHookData(testHook2, "value-2"); + } + + @ParameterizedTest + @EnumSource(value = FlagValueType.class) + @DisplayName("should isolate data between the same hook instances") + void shouldIsolateDataBetweenSameHooks(FlagValueType flagValueType) { + + HookSupport hookSupport = new HookSupport(); + HookContext hookContext = getObjectHookContext(flagValueType); + + TestHookWithData testHook = new TestHookWithData("test-key", "value-1"); + + // run hooks first time + callAllHooks(flagValueType, hookSupport, hookContext, testHook); + assertHookData(testHook, "value-1"); + + // re-run with different value, will throw if HookData contains already data + testHook.value = "value-2"; + callAllHooks(flagValueType, hookSupport, hookContext, testHook); + + assertHookData(testHook, "value-2"); + } + + private HookContext getObjectHookContext(FlagValueType flagValueType) { + EvaluationContext baseContext = new ImmutableContext(); + HookContext hookContext = HookContext.builder() + .flagKey("flagKey") + .type(flagValueType) + .defaultValue(createDefaultValue(flagValueType)) + .ctx(baseContext) + .clientMetadata(() -> "client") + .providerMetadata(() -> "provider") + .build(); + return hookContext; + } + + private static void assertHookData(TestHookWithData testHook1, String expected) { + assertThat(testHook1.onBeforeValue).isEqualTo(expected); + assertThat(testHook1.onFinallyAfterValue).isEqualTo(expected); + assertThat(testHook1.onAfterValue).isEqualTo(expected); + assertThat(testHook1.onErrorValue).isEqualTo(expected); + } + + private static void callAllHooks( + FlagValueType flagValueType, + HookSupport hookSupport, + HookContext hookContext, + TestHookWithData testHook) { + var pairs = hookSupport.getHookDataPairs(List.of(testHook), flagValueType); + callAllHooks(flagValueType, hookSupport, hookContext, pairs); + } + + private static void callAllHooks( + FlagValueType flagValueType, + HookSupport hookSupport, + HookContext hookContext, + List> pairs) { + hookSupport.beforeHooks(flagValueType, hookContext, pairs, Collections.emptyMap()); + hookSupport.afterHooks( + flagValueType, hookContext, new FlagEvaluationDetails<>(), pairs, Collections.emptyMap()); + hookSupport.errorHooks(flagValueType, hookContext, new Exception(), pairs, Collections.emptyMap()); + hookSupport.afterAllHooks( + flagValueType, hookContext, new FlagEvaluationDetails<>(), pairs, Collections.emptyMap()); + } + private Object createDefaultValue(FlagValueType flagValueType) { switch (flagValueType) { case INTEGER: @@ -105,4 +207,46 @@ private EvaluationContext evaluationContextWithValue(String key, String value) { EvaluationContext baseContext = new ImmutableContext(attributes); return baseContext; } + + private class TestHookWithData implements Hook { + + private final String key; + Object value; + + Object onBeforeValue; + Object onAfterValue; + Object onErrorValue; + Object onFinallyAfterValue; + + TestHookWithData(String key, Object value) { + this.key = key; + this.value = value; + } + + @Override + public Optional before(HookContext ctx, Map hints) { + var storedValue = ctx.getHookData().get(key); + if (storedValue != null) { + throw new Error("Hook data isolation violated! Data is already set."); + } + ctx.getHookData().set(key, value); + onBeforeValue = ctx.getHookData().get(key); + return Optional.empty(); + } + + @Override + public void after(HookContext ctx, FlagEvaluationDetails details, Map hints) { + onAfterValue = ctx.getHookData().get(key); + } + + @Override + public void error(HookContext ctx, Exception error, Map hints) { + onErrorValue = ctx.getHookData().get(key); + } + + @Override + public void finallyAfter(HookContext ctx, FlagEvaluationDetails details, Map hints) { + onFinallyAfterValue = ctx.getHookData().get(key); + } + } } diff --git a/src/test/java/dev/openfeature/sdk/benchmark/AllocationBenchmark.java b/src/test/java/dev/openfeature/sdk/benchmark/AllocationBenchmark.java index 5bc89d03d..9fe043722 100644 --- a/src/test/java/dev/openfeature/sdk/benchmark/AllocationBenchmark.java +++ b/src/test/java/dev/openfeature/sdk/benchmark/AllocationBenchmark.java @@ -54,6 +54,30 @@ public Optional before(HookContext ctx, Map() { + @Override + public Optional before(HookContext ctx, Map hints) { + return Optional.ofNullable(new ImmutableContext()); + } + }); + client.addHooks(new Hook() { + @Override + public Optional before(HookContext ctx, Map hints) { + return Optional.ofNullable(new ImmutableContext()); + } + }); + client.addHooks(new Hook() { + @Override + public Optional before(HookContext ctx, Map hints) { + return Optional.ofNullable(new ImmutableContext()); + } + }); + client.addHooks(new Hook() { + @Override + public Optional before(HookContext ctx, Map hints) { + return Optional.ofNullable(new ImmutableContext()); + } + }); Map invocationAttrs = new HashMap<>(); invocationAttrs.put("invoke", new Value(3)); From a7964beda575c46eddc15f44d21c23b5a52802c7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 16 Sep 2025 13:13:26 +0200 Subject: [PATCH 261/391] chore(deps): update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.9.5.0 (#1601) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ada93b719..c20641ac1 100644 --- a/pom.xml +++ b/pom.xml @@ -403,7 +403,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.9.4.2 + 4.9.5.0 spotbugs-exclusions.xml From c126bdb2d772a85417dbb77b92079a8a2107b8b6 Mon Sep 17 00:00:00 2001 From: alexandraoberaigner <82218944+alexandraoberaigner@users.noreply.github.com> Date: Tue, 16 Sep 2025 13:35:57 +0200 Subject: [PATCH 262/391] fix: javadoc error on-merge action (#1599) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: make builder visible for javadocs, move javadoc gen to codequality profile Signed-off-by: Alexandraย Oberaigner --- pom.xml | 46 +++++++++---------- .../sdk/HookContextWithoutData.java | 7 +++ 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/pom.xml b/pom.xml index c20641ac1..86b5a8201 100644 --- a/pom.xml +++ b/pom.xml @@ -507,29 +507,6 @@ - - - - - deploy - - true - - - - - - - org.sonatype.central - central-publishing-maven-plugin - 0.8.0 - true - - central - true - - - @@ -565,6 +542,29 @@ + + + + + deploy + + true + + + + + + + org.sonatype.central + central-publishing-maven-plugin + 0.8.0 + true + + central + true + + + diff --git a/src/main/java/dev/openfeature/sdk/HookContextWithoutData.java b/src/main/java/dev/openfeature/sdk/HookContextWithoutData.java index 6e5394ee1..df1ed6ad1 100644 --- a/src/main/java/dev/openfeature/sdk/HookContextWithoutData.java +++ b/src/main/java/dev/openfeature/sdk/HookContextWithoutData.java @@ -45,4 +45,11 @@ static HookContextWithoutData from( return new HookContextWithoutData<>( key, type, defaultValue, ImmutableContext.EMPTY, clientMetadata, providerMetadata); } + + /** + * Make the builder visible for javadocs. + * + * @param flag value type + */ + public static class HookContextWithoutDataBuilder {} } From 55a9a5ace2e899a8c57149b7638333faaca2836f Mon Sep 17 00:00:00 2001 From: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Date: Tue, 16 Sep 2025 08:11:14 -0400 Subject: [PATCH 263/391] chore(main): release 1.18.0 (#1539) Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 70 +++++++++++++++++++++++++++++++++++ README.md | 8 ++-- pom.xml | 2 +- version.txt | 2 +- 5 files changed, 77 insertions(+), 7 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f5c3b938e..b0c190560 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{".":"1.17.0"} +{".":"1.18.0"} diff --git a/CHANGELOG.md b/CHANGELOG.md index 5513f0e55..dafacd904 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,75 @@ # Changelog +## [1.18.0](https://github.com/open-feature/java-sdk/compare/v1.17.0...v1.18.0) (2025-09-16) + + +### ๐Ÿ› Bug Fixes + +* **deps:** update dependency com.github.spotbugs:spotbugs to v4.9.4 ([#1548](https://github.com/open-feature/java-sdk/issues/1548)) ([f2fef65](https://github.com/open-feature/java-sdk/commit/f2fef65eb580b1960ad15b2c46ebe40855551be3)) +* **deps:** update dependency com.github.spotbugs:spotbugs to v4.9.5 ([#1598](https://github.com/open-feature/java-sdk/issues/1598)) ([5474c73](https://github.com/open-feature/java-sdk/commit/5474c736f711ed06cbca2bd0d4d0cfd458a54d10)) +* **deps:** update dependency io.cucumber:cucumber-bom to v7.27.1 ([#1562](https://github.com/open-feature/java-sdk/issues/1562)) ([508bdac](https://github.com/open-feature/java-sdk/commit/508bdac4f075e2cd374dd1728919cfc1619d0097)) +* **deps:** update dependency io.cucumber:cucumber-bom to v7.27.2 ([#1566](https://github.com/open-feature/java-sdk/issues/1566)) ([8a9f251](https://github.com/open-feature/java-sdk/commit/8a9f25177f2d4bab1b5215f172bbb8ed1a5ad788)) +* **deps:** update dependency io.cucumber:cucumber-bom to v7.28.2 ([#1593](https://github.com/open-feature/java-sdk/issues/1593)) ([ca72b19](https://github.com/open-feature/java-sdk/commit/ca72b19d33985dfaae1cda009afd6795c5752259)) +* **deps:** update dependency org.projectlombok:lombok to v1.18.40 ([#1597](https://github.com/open-feature/java-sdk/issues/1597)) ([e181276](https://github.com/open-feature/java-sdk/commit/e1812767b684b21d417e31dadc8d031cd64cdab1)) +* javadoc error on-merge action ([#1599](https://github.com/open-feature/java-sdk/issues/1599)) ([c126bdb](https://github.com/open-feature/java-sdk/commit/c126bdb2d772a85417dbb77b92079a8a2107b8b6)) +* make builder visible for javadocs, move javadoc gen to codequality profile ([c126bdb](https://github.com/open-feature/java-sdk/commit/c126bdb2d772a85417dbb77b92079a8a2107b8b6)) + + +### โœจ New Features + +* add hook data ([#1587](https://github.com/open-feature/java-sdk/issues/1587)) ([1b08e3d](https://github.com/open-feature/java-sdk/commit/1b08e3db42635bbe79c61437db2359bd74a98348)) + + +### ๐Ÿงน Chore + +* **deps:** update actions/cache digest to 0400d5f ([#1544](https://github.com/open-feature/java-sdk/issues/1544)) ([050379b](https://github.com/open-feature/java-sdk/commit/050379be110b7a980cf5cc02ddf23e00a7ee7202)) +* **deps:** update actions/cache digest to 358a730 ([#1541](https://github.com/open-feature/java-sdk/issues/1541)) ([6efc2ee](https://github.com/open-feature/java-sdk/commit/6efc2ee1e701daf38e3efc2f115dc93025a0e2e2)) +* **deps:** update actions/cache digest to 638ed79 ([#1549](https://github.com/open-feature/java-sdk/issues/1549)) ([7f487ee](https://github.com/open-feature/java-sdk/commit/7f487ee7ecd1c69a63d22eca140bc422a0afc963)) +* **deps:** update actions/checkout digest to 08c6903 ([#1550](https://github.com/open-feature/java-sdk/issues/1550)) ([527e3f8](https://github.com/open-feature/java-sdk/commit/527e3f836f664ecace1018de84502592ee75007c)) +* **deps:** update actions/checkout digest to ff7abcd ([#1554](https://github.com/open-feature/java-sdk/issues/1554)) ([35fe5b4](https://github.com/open-feature/java-sdk/commit/35fe5b41bc971f8bc41b82b8c0ef50d719071301)) +* **deps:** update actions/setup-java digest to 0913e9a ([#1572](https://github.com/open-feature/java-sdk/issues/1572)) ([58c82de](https://github.com/open-feature/java-sdk/commit/58c82de9656562f137feafb9e6eff20521695803)) +* **deps:** update actions/setup-java digest to a7ab372 ([#1589](https://github.com/open-feature/java-sdk/issues/1589)) ([a08ff4d](https://github.com/open-feature/java-sdk/commit/a08ff4d96ccf9236ad882892280b600a05409394)) +* **deps:** update actions/setup-java digest to dded088 ([#1574](https://github.com/open-feature/java-sdk/issues/1574)) ([d332224](https://github.com/open-feature/java-sdk/commit/d33222439e84435baeb0a49d33651208e659ad27)) +* **deps:** update amannn/action-semantic-pull-request digest to 24e6f01 ([#1568](https://github.com/open-feature/java-sdk/issues/1568)) ([c8d48e1](https://github.com/open-feature/java-sdk/commit/c8d48e1a739f02b25e7980dcd5652851756729f2)) +* **deps:** update amannn/action-semantic-pull-request digest to 677b895 ([#1570](https://github.com/open-feature/java-sdk/issues/1570)) ([fb6ab35](https://github.com/open-feature/java-sdk/commit/fb6ab353b403542a1f7e6ccafb07e25ae1d5e2be)) +* **deps:** update amannn/action-semantic-pull-request digest to a46a7c8 ([#1563](https://github.com/open-feature/java-sdk/issues/1563)) ([47af527](https://github.com/open-feature/java-sdk/commit/47af5279d6abd0080eae16d630bd202976f9a4b1)) +* **deps:** update amannn/action-semantic-pull-request digest to e7d011b ([#1577](https://github.com/open-feature/java-sdk/issues/1577)) ([532ad2f](https://github.com/open-feature/java-sdk/commit/532ad2f3d404753189a529cdc262ba6ef8d3d586)) +* **deps:** update amannn/action-semantic-pull-request digest to fdd4d3d ([#1553](https://github.com/open-feature/java-sdk/issues/1553)) ([8a6c796](https://github.com/open-feature/java-sdk/commit/8a6c79627a492eb61ed35ffa91035b0737598b64)) +* **deps:** update codecov/codecov-action action to v5.5.0 ([#1573](https://github.com/open-feature/java-sdk/issues/1573)) ([2c2b380](https://github.com/open-feature/java-sdk/commit/2c2b380e13d2be5a988b70212ea243efdb60999b)) +* **deps:** update codecov/codecov-action action to v5.5.1 ([#1591](https://github.com/open-feature/java-sdk/issues/1591)) ([e47913a](https://github.com/open-feature/java-sdk/commit/e47913a07ee064fe340db978250710a7cb17795d)) +* **deps:** update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.9.4.0 ([#1576](https://github.com/open-feature/java-sdk/issues/1576)) ([894165d](https://github.com/open-feature/java-sdk/commit/894165ddd7216dc30c1ca4c9f43c0a4c21970f17)) +* **deps:** update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.9.4.2 ([#1592](https://github.com/open-feature/java-sdk/issues/1592)) ([8b3f7f0](https://github.com/open-feature/java-sdk/commit/8b3f7f07f4aa555301d484544939fa5a0b4de746)) +* **deps:** update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.9.5.0 ([#1601](https://github.com/open-feature/java-sdk/issues/1601)) ([a7964be](https://github.com/open-feature/java-sdk/commit/a7964beda575c46eddc15f44d21c23b5a52802c7)) +* **deps:** update dependency com.puppycrawl.tools:checkstyle to v11 ([#1543](https://github.com/open-feature/java-sdk/issues/1543)) ([d2f85d5](https://github.com/open-feature/java-sdk/commit/d2f85d5a9e42c0e336546684b27a1e77edc4c620)) +* **deps:** update dependency com.puppycrawl.tools:checkstyle to v11.0.1 ([#1585](https://github.com/open-feature/java-sdk/issues/1585)) ([8dd40fa](https://github.com/open-feature/java-sdk/commit/8dd40fabcae6a90ee7abe1b0a0d8f55f345e3331)) +* **deps:** update dependency maven-wrapper to v3.3.3 ([#1584](https://github.com/open-feature/java-sdk/issues/1584)) ([cba90dd](https://github.com/open-feature/java-sdk/commit/cba90dd227514464fd90bd605f73c358748c09e1)) +* **deps:** update dependency net.bytebuddy:byte-buddy to v1.17.7 ([#1560](https://github.com/open-feature/java-sdk/issues/1560)) ([124c26f](https://github.com/open-feature/java-sdk/commit/124c26f6ea2d20cebb7520afcd94ab6b6c8c8e7b)) +* **deps:** update dependency net.bytebuddy:byte-buddy-agent to v1.17.7 ([#1561](https://github.com/open-feature/java-sdk/issues/1561)) ([84887bf](https://github.com/open-feature/java-sdk/commit/84887bfc86eb4905f52bce4641c35a8909f2c463)) +* **deps:** update dependency org.apache.maven.plugins:maven-failsafe-plugin to v3.5.4 ([#1596](https://github.com/open-feature/java-sdk/issues/1596)) ([3606154](https://github.com/open-feature/java-sdk/commit/3606154aa7ded57f41c324559268335531606b6c)) +* **deps:** update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.11.3 ([#1559](https://github.com/open-feature/java-sdk/issues/1559)) ([6fbc9d6](https://github.com/open-feature/java-sdk/commit/6fbc9d6cca5716b7477f84ff4093ccc6af06d4e6)) +* **deps:** update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.5.4 ([#1595](https://github.com/open-feature/java-sdk/issues/1595)) ([a17bd3a](https://github.com/open-feature/java-sdk/commit/a17bd3a388927781b86e91064748a71670bb2a2a)) +* **deps:** update dependency org.assertj:assertj-core to v3.27.4 ([#1546](https://github.com/open-feature/java-sdk/issues/1546)) ([c4fe7d2](https://github.com/open-feature/java-sdk/commit/c4fe7d2e81510db4eaa13a4d0046827efecd8a79)) +* **deps:** update dependency org.mockito:mockito-core to v5.19.0 ([#1557](https://github.com/open-feature/java-sdk/issues/1557)) ([dff5412](https://github.com/open-feature/java-sdk/commit/dff54123ab38fd3ad59809e5f863b6ace17e4da4)) +* **deps:** update github/codeql-action digest to 02ab253 ([#1583](https://github.com/open-feature/java-sdk/issues/1583)) ([080fc6e](https://github.com/open-feature/java-sdk/commit/080fc6e9a60c15eb748891245258c9c5378e4248)) +* **deps:** update github/codeql-action digest to 0d33fd9 ([#1590](https://github.com/open-feature/java-sdk/issues/1590)) ([9e4881f](https://github.com/open-feature/java-sdk/commit/9e4881fdcb577a693cfe587b58dce5a74fb3caf4)) +* **deps:** update github/codeql-action digest to 2330521 ([#1558](https://github.com/open-feature/java-sdk/issues/1558)) ([f1165da](https://github.com/open-feature/java-sdk/commit/f1165da1b910efda6dbe486a21eb7985cccf11ae)) +* **deps:** update github/codeql-action digest to 4474150 ([#1547](https://github.com/open-feature/java-sdk/issues/1547)) ([09b3138](https://github.com/open-feature/java-sdk/commit/09b31383e3b7e693ec43d6016486e3ededf8c2de)) +* **deps:** update github/codeql-action digest to 5b49155 ([#1575](https://github.com/open-feature/java-sdk/issues/1575)) ([d9c1df0](https://github.com/open-feature/java-sdk/commit/d9c1df0c5ec247f64c37648128d56b7e83444ca9)) +* **deps:** update github/codeql-action digest to 6dee5bc ([#1569](https://github.com/open-feature/java-sdk/issues/1569)) ([907b75d](https://github.com/open-feature/java-sdk/commit/907b75d3481e71621249b0246e0ca67c42c9a890)) +* **deps:** update github/codeql-action digest to 6ec994e ([#1564](https://github.com/open-feature/java-sdk/issues/1564)) ([19c2a12](https://github.com/open-feature/java-sdk/commit/19c2a1272a34040f3ac2b603c2bcb645f3707a82)) +* **deps:** update github/codeql-action digest to 6fe50b2 ([#1545](https://github.com/open-feature/java-sdk/issues/1545)) ([866235e](https://github.com/open-feature/java-sdk/commit/866235e494c229b3d47df80146199db4204b2ece)) +* **deps:** update github/codeql-action digest to 777f917 ([#1556](https://github.com/open-feature/java-sdk/issues/1556)) ([03a8018](https://github.com/open-feature/java-sdk/commit/03a8018098bbced558e157b60e7ba3ff18527db6)) +* **deps:** update github/codeql-action digest to 7eb43b0 ([#1555](https://github.com/open-feature/java-sdk/issues/1555)) ([88ded5d](https://github.com/open-feature/java-sdk/commit/88ded5d9290b3c008a597cf55bb1e1f4c05e40ec)) +* **deps:** update github/codeql-action digest to a880e53 ([#1581](https://github.com/open-feature/java-sdk/issues/1581)) ([5efac69](https://github.com/open-feature/java-sdk/commit/5efac69dae28ff26227e5a9e83c6edbea9b9b6b5)) +* **deps:** update github/codeql-action digest to aa90e97 ([#1594](https://github.com/open-feature/java-sdk/issues/1594)) ([5df4317](https://github.com/open-feature/java-sdk/commit/5df4317caa97bdd055ec1f809d2b5e49642b5312)) +* **deps:** update github/codeql-action digest to b1228d0 ([#1540](https://github.com/open-feature/java-sdk/issues/1540)) ([bc58780](https://github.com/open-feature/java-sdk/commit/bc587809341d60eeb575b0d58d75b35972b92053)) +* **deps:** update github/codeql-action digest to bbfff2f ([#1538](https://github.com/open-feature/java-sdk/issues/1538)) ([6056877](https://github.com/open-feature/java-sdk/commit/60568776c471e7c01f8cee6b198fe6df70fc2ca5)) +* **deps:** update github/codeql-action digest to c6dcdfa ([#1551](https://github.com/open-feature/java-sdk/issues/1551)) ([ce2b6e8](https://github.com/open-feature/java-sdk/commit/ce2b6e88313ea500c2b71f0b4c06ad4a12522f3e)) +* **deps:** update github/codeql-action digest to db69a51 ([#1571](https://github.com/open-feature/java-sdk/issues/1571)) ([fc7ec65](https://github.com/open-feature/java-sdk/commit/fc7ec6511fd92c872e55e2b4f96f1dc6215ed029)) +* **deps:** update github/codeql-action digest to e2b6f0f ([#1542](https://github.com/open-feature/java-sdk/issues/1542)) ([7ccbb71](https://github.com/open-feature/java-sdk/commit/7ccbb714b305deb9fa0e31ace1bd7f044c8c57ed)) +* **deps:** update github/codeql-action digest to e96e340 ([#1565](https://github.com/open-feature/java-sdk/issues/1565)) ([ea23114](https://github.com/open-feature/java-sdk/commit/ea23114d424ce042681d6b42cdc6b2e2086ccbf8)) +* **deps:** update github/codeql-action digest to eef4c44 ([#1552](https://github.com/open-feature/java-sdk/issues/1552)) ([4bae329](https://github.com/open-feature/java-sdk/commit/4bae3294b20f19550a878f331cba2377df14f7c1)) + ## [1.17.0](https://github.com/open-feature/java-sdk/compare/v1.16.0...v1.17.0) (2025-08-01) diff --git a/README.md b/README.md index 24bae2a3c..39f558f8f 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ - - Release + + Release @@ -59,7 +59,7 @@ Note that this library is intended to be used in server-side contexts and has no dev.openfeature sdk - 1.17.0 + 1.18.0 ``` @@ -84,7 +84,7 @@ If you would like snapshot builds, this is the relevant repository information: ```groovy dependencies { - implementation 'dev.openfeature:sdk:1.17.0' + implementation 'dev.openfeature:sdk:1.18.0' } ``` diff --git a/pom.xml b/pom.xml index 86b5a8201..70d5f32fe 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ dev.openfeature sdk - 1.17.0 + 1.18.0 [17,) diff --git a/version.txt b/version.txt index 092afa15d..84cc52946 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.17.0 +1.18.0 From 6fb139f8425fb76368b1e1baa745aa182f8c13f7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 16 Sep 2025 12:55:08 +0000 Subject: [PATCH 264/391] chore(deps): update github/codeql-action digest to 573acd9 (#1600) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 67da3cb06..3149c89dd 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -29,7 +29,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@aa90e97ad2ed17cde6a43e89f70138299e64f837 + uses: github/codeql-action/init@573acd9552f33577783abde4acb66a1058e762e5 with: languages: java @@ -55,4 +55,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@aa90e97ad2ed17cde6a43e89f70138299e64f837 + uses: github/codeql-action/analyze@573acd9552f33577783abde4acb66a1058e762e5 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 7c16abc16..2ab9903d2 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@aa90e97ad2ed17cde6a43e89f70138299e64f837 + uses: github/codeql-action/init@573acd9552f33577783abde4acb66a1058e762e5 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@aa90e97ad2ed17cde6a43e89f70138299e64f837 + uses: github/codeql-action/autobuild@573acd9552f33577783abde4acb66a1058e762e5 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@aa90e97ad2ed17cde6a43e89f70138299e64f837 + uses: github/codeql-action/analyze@573acd9552f33577783abde4acb66a1058e762e5 From e89fab2cc3c134d77b2e5236734bf2fa2871a8e7 Mon Sep 17 00:00:00 2001 From: Simon Schrottner Date: Tue, 16 Sep 2025 15:45:51 +0200 Subject: [PATCH 265/391] test: improve gherkin test suite only relying on the newest version, with data loading (#1578) * test: improve gherkin test suite only relying on the newest version, with data loading Signed-off-by: Simon Schrottner * Update src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Simon Schrottner * Update src/test/java/dev/openfeature/sdk/testutils/jackson/CelContextEvaluator.java Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Simon Schrottner * test: improve gherkin test suite only relying on the newest version, with data loading Signed-off-by: Simon Schrottner diff --git c/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java i/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java index e4cd603..121b567 100644 --- c/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java +++ i/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java @@ -114,9 +114,9 @@ public class ContextSteps { public void a_context_containing_a_key_with_type_and_with_value(String key, String type, String value) throws ClassNotFoundException, InstantiationException { Map map = state.context.asMap(); - Map map = state.context.asMap(); map.put(key, new Value(Utils.convert(value, type))); state.context = new MutableContext(state.context.getTargetingKey(), map); + } @Given("a context containing a targeting key with value {string}") public void a_context_containing_a_targeting_key_with_value(String string) { diff --git c/src/test/java/dev/openfeature/sdk/testutils/jackson/CelContextEvaluator.java i/src/test/java/dev/openfeature/sdk/testutils/jackson/CelContextEvaluator.java index 20f3f5f..138c23f 100644 --- c/src/test/java/dev/openfeature/sdk/testutils/jackson/CelContextEvaluator.java +++ i/src/test/java/dev/openfeature/sdk/testutils/jackson/CelContextEvaluator.java @@ -46,7 +46,6 @@ public class CelContextEvaluator implements ContextEvaluator { // Evaluate with context, overriding defaults. objectMap.putAll(evaluationContext.asObjectMap()); } - } Object result = program.eval(objectMap); diff --git c/src/test/java/dev/openfeature/sdk/testutils/jackson/VariantsMapDeserializer.java i/src/test/java/dev/openfeature/sdk/testutils/jackson/VariantsMapDeserializer.java index 339d8c8..9a63f58 100644 --- c/src/test/java/dev/openfeature/sdk/testutils/jackson/VariantsMapDeserializer.java +++ i/src/test/java/dev/openfeature/sdk/testutils/jackson/VariantsMapDeserializer.java @@ -50,6 +50,7 @@ public class VariantsMapDeserializer extends JsonDeserializer list = new ArrayList<>(); - for (JsonNode item : node) { - list.add(convertJsonNodeToValue(item)); - } - return list; } else if (node.isObject()) { - Map map = new HashMap<>(); - Iterator> fields = node.fields(); - while (fields.hasNext()) { - Map.Entry field = fields.next(); - Object o = convertJsonNodeToValue(field.getValue()); - if (o instanceof Value) { - map.put(field.getKey(), (Value) o); - } else { - map.put(field.getKey(), new Value(o)); - } - } - return new Value(new MutableStructure(map)); + return Value.objectToValue(node); } throw new IllegalArgumentException("Unsupported JSON node type: " + node.getNodeType()); Signed-off-by: Simon Schrottner * Update src/test/java/dev/openfeature/sdk/e2e/steps/FlagStepDefinitions.java Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Simon Schrottner * Update src/test/java/dev/openfeature/sdk/testutils/TestFlagsUtils.java Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Simon Schrottner * test: improve gherkin test suite only relying on the newest version, with data loading Signed-off-by: Simon Schrottner diff --git c/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java i/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java index e4cd603..121b567 100644 --- c/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java +++ i/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java @@ -114,9 +114,9 @@ public class ContextSteps { public void a_context_containing_a_key_with_type_and_with_value(String key, String type, String value) throws ClassNotFoundException, InstantiationException { Map map = state.context.asMap(); - Map map = state.context.asMap(); map.put(key, new Value(Utils.convert(value, type))); state.context = new MutableContext(state.context.getTargetingKey(), map); + } @Given("a context containing a targeting key with value {string}") public void a_context_containing_a_targeting_key_with_value(String string) { diff --git c/src/test/java/dev/openfeature/sdk/testutils/jackson/CelContextEvaluator.java i/src/test/java/dev/openfeature/sdk/testutils/jackson/CelContextEvaluator.java index 20f3f5f..138c23f 100644 --- c/src/test/java/dev/openfeature/sdk/testutils/jackson/CelContextEvaluator.java +++ i/src/test/java/dev/openfeature/sdk/testutils/jackson/CelContextEvaluator.java @@ -46,7 +46,6 @@ public class CelContextEvaluator implements ContextEvaluator { // Evaluate with context, overriding defaults. objectMap.putAll(evaluationContext.asObjectMap()); } - } Object result = program.eval(objectMap); diff --git c/src/test/java/dev/openfeature/sdk/testutils/jackson/VariantsMapDeserializer.java i/src/test/java/dev/openfeature/sdk/testutils/jackson/VariantsMapDeserializer.java index 339d8c8..9a63f58 100644 --- c/src/test/java/dev/openfeature/sdk/testutils/jackson/VariantsMapDeserializer.java +++ i/src/test/java/dev/openfeature/sdk/testutils/jackson/VariantsMapDeserializer.java @@ -50,6 +50,7 @@ public class VariantsMapDeserializer extends JsonDeserializer list = new ArrayList<>(); - for (JsonNode item : node) { - list.add(convertJsonNodeToValue(item)); - } - return list; } else if (node.isObject()) { - Map map = new HashMap<>(); - Iterator> fields = node.fields(); - while (fields.hasNext()) { - Map.Entry field = fields.next(); - Object o = convertJsonNodeToValue(field.getValue()); - if (o instanceof Value) { - map.put(field.getKey(), (Value) o); - } else { - map.put(field.getKey(), new Value(o)); - } - } - return new Value(new MutableStructure(map)); + return Value.objectToValue(node); } throw new IllegalArgumentException("Unsupported JSON node type: " + node.getNodeType()); Signed-off-by: Simon Schrottner diff --git c/src/test/java/dev/openfeature/sdk/e2e/Utils.java i/src/test/java/dev/openfeature/sdk/e2e/Utils.java index 1500d99..565968c 100644 --- c/src/test/java/dev/openfeature/sdk/e2e/Utils.java +++ i/src/test/java/dev/openfeature/sdk/e2e/Utils.java @@ -7,6 +7,8 @@ import java.util.Objects; public final class Utils { + public static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); + private Utils() {} public static Object convert(String value, String type) { @@ -27,7 +29,7 @@ public final class Utils { return Long.parseLong(value); case "object": try { - return Value.objectToValue(new ObjectMapper().readValue(value, Object.class)); + return Value.objectToValue(OBJECT_MAPPER.readValue(value, Object.class)); } catch (JsonProcessingException e) { throw new RuntimeException(e); } diff --git c/src/test/java/dev/openfeature/sdk/testutils/TestFlagsUtils.java i/src/test/java/dev/openfeature/sdk/testutils/TestFlagsUtils.java index 78a2fc5..13fe32f 100644 --- c/src/test/java/dev/openfeature/sdk/testutils/TestFlagsUtils.java +++ i/src/test/java/dev/openfeature/sdk/testutils/TestFlagsUtils.java @@ -17,6 +17,8 @@ import java.util.Map; import lombok.experimental.UtilityClass; import lombok.extern.slf4j.Slf4j; +import static dev.openfeature.sdk.e2e.Utils.OBJECT_MAPPER; + /** * Test flags utils. */ @@ -41,7 +43,8 @@ public class TestFlagsUtils { */ public static synchronized Map> buildFlags() { if (flags == null) { - ObjectMapper objectMapper = new ObjectMapper(); + if (flags == null) { + ObjectMapper objectMapper = OBJECT_MAPPER; objectMapper.configure(StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION.mappedFeature(), true); objectMapper.addMixIn(Flag.class, InMemoryFlagMixin.class); objectMapper.addMixIn(Flag.FlagBuilder.class, InMemoryFlagMixin.FlagBuilderMixin.class); Signed-off-by: Simon Schrottner * fixup: add provider-status tests Signed-off-by: Simon Schrottner * fixup: update spec Signed-off-by: Simon Schrottner * fixup: add missing steps and adapt to new spec steps Signed-off-by: Simon Schrottner * fix: race condition? Signed-off-by: Simon Schrottner --------- Signed-off-by: Simon Schrottner Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- pom.xml | 33 +++++ spec | 2 +- .../sdk/providers/memory/Flag.java | 1 + .../providers/memory/InMemoryProvider.java | 36 +++-- ...aluationTest.java => GherkinSpecTest.java} | 4 +- .../java/dev/openfeature/sdk/e2e/Utils.java | 11 ++ .../sdk/e2e/steps/ContextSteps.java | 28 ++++ .../sdk/e2e/steps/FlagStepDefinitions.java | 32 +++- .../sdk/e2e/steps/ProviderSteps.java | 140 +++++++++++++++++- .../sdk/e2e/steps/StepDefinitions.java | 1 + .../sdk/testutils/TestFlagsUtils.java | 120 +++++---------- .../jackson/CelContextEvaluator.java | 61 ++++++++ .../jackson/ContextEvaluatorDeserializer.java | 25 ++++ .../ImmutableMetadataDeserializer.java | 41 +++++ .../testutils/jackson/InMemoryFlagMixin.java | 20 +++ .../jackson/VariantsMapDeserializer.java | 65 ++++++++ 16 files changed, 525 insertions(+), 95 deletions(-) rename src/test/java/dev/openfeature/sdk/e2e/{EvaluationTest.java => GherkinSpecTest.java} (82%) create mode 100644 src/test/java/dev/openfeature/sdk/testutils/jackson/CelContextEvaluator.java create mode 100644 src/test/java/dev/openfeature/sdk/testutils/jackson/ContextEvaluatorDeserializer.java create mode 100644 src/test/java/dev/openfeature/sdk/testutils/jackson/ImmutableMetadataDeserializer.java create mode 100644 src/test/java/dev/openfeature/sdk/testutils/jackson/InMemoryFlagMixin.java create mode 100644 src/test/java/dev/openfeature/sdk/testutils/jackson/VariantsMapDeserializer.java diff --git a/pom.xml b/pom.xml index 70d5f32fe..932dd584f 100644 --- a/pom.xml +++ b/pom.xml @@ -168,6 +168,31 @@ test + + com.fasterxml.jackson.core + jackson-core + test + + + + com.fasterxml.jackson.core + jackson-annotations + test + + + + com.fasterxml.jackson.core + jackson-databind + test + + + + dev.cel + cel + 0.10.1 + test + + @@ -191,6 +216,14 @@ + + com.fasterxml.jackson + jackson-bom + 2.16.1 + pom + import + + io.cucumber cucumber-bom diff --git a/spec b/spec index d4a9a9109..e33a15e92 160000 --- a/spec +++ b/spec @@ -1 +1 @@ -Subproject commit d4a9a910946eded57cf82d6fd4921785a5e64c2b +Subproject commit e33a15e92bd0e45f0de087e7e55ee7e87f952c29 diff --git a/src/main/java/dev/openfeature/sdk/providers/memory/Flag.java b/src/main/java/dev/openfeature/sdk/providers/memory/Flag.java index f2dc6b495..4422dc51f 100644 --- a/src/main/java/dev/openfeature/sdk/providers/memory/Flag.java +++ b/src/main/java/dev/openfeature/sdk/providers/memory/Flag.java @@ -20,4 +20,5 @@ public class Flag { private String defaultVariant; private ContextEvaluator contextEvaluator; private ImmutableMetadata flagMetadata; + private boolean disabled; } diff --git a/src/main/java/dev/openfeature/sdk/providers/memory/InMemoryProvider.java b/src/main/java/dev/openfeature/sdk/providers/memory/InMemoryProvider.java index 3be1b6316..1773ae8a8 100644 --- a/src/main/java/dev/openfeature/sdk/providers/memory/InMemoryProvider.java +++ b/src/main/java/dev/openfeature/sdk/providers/memory/InMemoryProvider.java @@ -97,36 +97,37 @@ public void updateFlag(String flagKey, Flag newFlag) { @Override public ProviderEvaluation getBooleanEvaluation( String key, Boolean defaultValue, EvaluationContext evaluationContext) { - return getEvaluation(key, evaluationContext, Boolean.class); + return getEvaluation(key, defaultValue, evaluationContext, Boolean.class); } @Override public ProviderEvaluation getStringEvaluation( String key, String defaultValue, EvaluationContext evaluationContext) { - return getEvaluation(key, evaluationContext, String.class); + return getEvaluation(key, defaultValue, evaluationContext, String.class); } @Override public ProviderEvaluation getIntegerEvaluation( String key, Integer defaultValue, EvaluationContext evaluationContext) { - return getEvaluation(key, evaluationContext, Integer.class); + return getEvaluation(key, defaultValue, evaluationContext, Integer.class); } @Override public ProviderEvaluation getDoubleEvaluation( String key, Double defaultValue, EvaluationContext evaluationContext) { - return getEvaluation(key, evaluationContext, Double.class); + return getEvaluation(key, defaultValue, evaluationContext, Double.class); } @SneakyThrows @Override public ProviderEvaluation getObjectEvaluation( String key, Value defaultValue, EvaluationContext evaluationContext) { - return getEvaluation(key, evaluationContext, Value.class); + return getEvaluation(key, defaultValue, evaluationContext, Value.class); } private ProviderEvaluation getEvaluation( - String key, EvaluationContext evaluationContext, Class expectedType) throws OpenFeatureError { + String key, T defaultValue, EvaluationContext evaluationContext, Class expectedType) + throws OpenFeatureError { if (!ProviderState.READY.equals(state)) { if (ProviderState.NOT_READY.equals(state)) { throw new ProviderNotReadyError("provider not yet initialized"); @@ -138,11 +139,28 @@ private ProviderEvaluation getEvaluation( } Flag flag = flags.get(key); if (flag == null) { - throw new FlagNotFoundError("flag " + key + "not found"); + throw new FlagNotFoundError("flag " + key + " not found"); + } + if (flag.isDisabled()) { + return ProviderEvaluation.builder() + .reason(Reason.DISABLED.name()) + .value(defaultValue) + .flagMetadata(flag.getFlagMetadata()) + .build(); } T value; + Reason reason = Reason.STATIC; if (flag.getContextEvaluator() != null) { - value = (T) flag.getContextEvaluator().evaluate(flag, evaluationContext); + try { + value = (T) flag.getContextEvaluator().evaluate(flag, evaluationContext); + reason = Reason.TARGETING_MATCH; + } catch (Exception e) { + value = null; + } + if (value == null) { + value = (T) flag.getVariants().get(flag.getDefaultVariant()); + reason = Reason.DEFAULT; + } } else if (!expectedType.isInstance(flag.getVariants().get(flag.getDefaultVariant()))) { throw new TypeMismatchError("flag " + key + "is not of expected type"); } else { @@ -151,7 +169,7 @@ private ProviderEvaluation getEvaluation( return ProviderEvaluation.builder() .value(value) .variant(flag.getDefaultVariant()) - .reason(Reason.STATIC.toString()) + .reason(reason.toString()) .flagMetadata(flag.getFlagMetadata()) .build(); } diff --git a/src/test/java/dev/openfeature/sdk/e2e/EvaluationTest.java b/src/test/java/dev/openfeature/sdk/e2e/GherkinSpecTest.java similarity index 82% rename from src/test/java/dev/openfeature/sdk/e2e/EvaluationTest.java rename to src/test/java/dev/openfeature/sdk/e2e/GherkinSpecTest.java index b7c834312..89c7161be 100644 --- a/src/test/java/dev/openfeature/sdk/e2e/EvaluationTest.java +++ b/src/test/java/dev/openfeature/sdk/e2e/GherkinSpecTest.java @@ -5,6 +5,7 @@ import static io.cucumber.junit.platform.engine.Constants.PLUGIN_PROPERTY_NAME; import org.junit.platform.suite.api.ConfigurationParameter; +import org.junit.platform.suite.api.ExcludeTags; import org.junit.platform.suite.api.IncludeEngines; import org.junit.platform.suite.api.SelectDirectories; import org.junit.platform.suite.api.Suite; @@ -15,4 +16,5 @@ @ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty") @ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "dev.openfeature.sdk.e2e.steps") @ConfigurationParameter(key = OBJECT_FACTORY_PROPERTY_NAME, value = "io.cucumber.picocontainer.PicoFactory") -public class EvaluationTest {} +@ExcludeTags({"deprecated", "reason-codes-cached", "async", "immutability", "evaluation-options"}) +public class GherkinSpecTest {} diff --git a/src/test/java/dev/openfeature/sdk/e2e/Utils.java b/src/test/java/dev/openfeature/sdk/e2e/Utils.java index 902ee11d0..565968c1c 100644 --- a/src/test/java/dev/openfeature/sdk/e2e/Utils.java +++ b/src/test/java/dev/openfeature/sdk/e2e/Utils.java @@ -1,9 +1,14 @@ package dev.openfeature.sdk.e2e; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import dev.openfeature.sdk.Value; import java.util.Objects; public final class Utils { + public static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); + private Utils() {} public static Object convert(String value, String type) { @@ -22,6 +27,12 @@ public static Object convert(String value, String type) { return Double.parseDouble(value); case "long": return Long.parseLong(value); + case "object": + try { + return Value.objectToValue(OBJECT_MAPPER.readValue(value, Object.class)); + } catch (JsonProcessingException e) { + throw new RuntimeException(e); + } } throw new RuntimeException("Unknown config type: " + type); } diff --git a/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java b/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java index ccb78e72a..ce9bb8b5f 100644 --- a/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java +++ b/src/test/java/dev/openfeature/sdk/e2e/steps/ContextSteps.java @@ -8,11 +8,14 @@ import dev.openfeature.sdk.Hook; import dev.openfeature.sdk.HookContext; import dev.openfeature.sdk.ImmutableContext; +import dev.openfeature.sdk.ImmutableStructure; +import dev.openfeature.sdk.MutableContext; import dev.openfeature.sdk.OpenFeatureAPI; import dev.openfeature.sdk.ThreadLocalTransactionContextPropagator; import dev.openfeature.sdk.Value; import dev.openfeature.sdk.e2e.ContextStoringProvider; import dev.openfeature.sdk.e2e.State; +import dev.openfeature.sdk.e2e.Utils; import io.cucumber.datatable.DataTable; import io.cucumber.java.en.And; import io.cucumber.java.en.Given; @@ -101,4 +104,29 @@ public void contextEntriesForEachLevelFromAPILevelDownToTheLevelWithKeyAndValue( } } } + + @Given("a context containing a key {string} with null value") + public void a_context_containing_a_key_with_null_value(String key) { + a_context_containing_a_key_with_type_and_with_value(key, "String", null); + } + + @Given("a context containing a key {string}, with type {string} and with value {string}") + public void a_context_containing_a_key_with_type_and_with_value(String key, String type, String value) { + Map map = state.context.asMap(); + map.put(key, Value.objectToValue(Utils.convert(value, type))); + state.context = new MutableContext(state.context.getTargetingKey(), map); + } + + @Given("a context containing a targeting key with value {string}") + public void a_context_containing_a_targeting_key_with_value(String string) { + state.context.setTargetingKey(string); + } + + @Given("a context containing a nested property with outer key {string} and inner key {string}, with value {string}") + public void a_context_containing_a_nested_property_with_outer_key_and_inner_key_with_value( + String outer, String inner, String value) { + Map innerMap = new HashMap<>(); + innerMap.put(inner, new Value(value)); + state.context.add(outer, new ImmutableStructure(innerMap)); + } } diff --git a/src/test/java/dev/openfeature/sdk/e2e/steps/FlagStepDefinitions.java b/src/test/java/dev/openfeature/sdk/e2e/steps/FlagStepDefinitions.java index 390e067f3..dccdbf9af 100644 --- a/src/test/java/dev/openfeature/sdk/e2e/steps/FlagStepDefinitions.java +++ b/src/test/java/dev/openfeature/sdk/e2e/steps/FlagStepDefinitions.java @@ -2,6 +2,7 @@ import static org.assertj.core.api.Assertions.assertThat; +import dev.openfeature.sdk.ErrorCode; import dev.openfeature.sdk.FlagEvaluationDetails; import dev.openfeature.sdk.ImmutableMetadata; import dev.openfeature.sdk.Value; @@ -23,7 +24,7 @@ public FlagStepDefinitions(State state) { this.state = state; } - @Given("a {}-flag with key {string} and a default value {string}") + @Given("a {}-flag with key {string} and a fallback value {string}") public void givenAFlag(String type, String name, String defaultValue) { state.flag = new Flag(type, name, Utils.convert(defaultValue, type)); } @@ -60,7 +61,20 @@ public void the_flag_was_evaluated_with_details() { @Then("the resolved details value should be {string}") public void the_resolved_details_value_should_be(String value) { - assertThat(state.evaluation.getValue()).isEqualTo(Utils.convert(value, state.flag.type)); + Object evaluationValue = state.evaluation.getValue(); + if (state.flag.type.equalsIgnoreCase("object")) { + assertThat(((Value) evaluationValue).asStructure().asObjectMap()) + .isEqualTo(((Value) Utils.convert(value, state.flag.type)) + .asStructure() + .asObjectMap()); + } else { + assertThat(evaluationValue).isEqualTo(Utils.convert(value, state.flag.type)); + } + } + + @Then("the flag key should be {string}") + public void the_flag_key_should_be(String key) { + assertThat(state.evaluation.getFlagKey()).isEqualTo(key); } @Then("the reason should be {string}") @@ -73,6 +87,20 @@ public void the_variant_should_be(String variant) { assertThat(state.evaluation.getVariant()).isEqualTo(variant); } + @Then("the error-code should be {string}") + public void the_error_code_should_be(String errorCode) { + if (errorCode.isEmpty()) { + assertThat(state.evaluation.getErrorCode()).isNull(); + } else { + assertThat(state.evaluation.getErrorCode()).isEqualTo(ErrorCode.valueOf(errorCode)); + } + } + + @Then("the error message should contain {string}") + public void the_error_message_should_contain(String messageSubstring) { + assertThat(state.evaluation.getErrorMessage()).contains(messageSubstring); + } + @Then("the resolved metadata value \"{}\" with type \"{}\" should be \"{}\"") public void theResolvedMetadataValueShouldBe(String key, String type, String value) throws NoSuchFieldException, IllegalAccessException { diff --git a/src/test/java/dev/openfeature/sdk/e2e/steps/ProviderSteps.java b/src/test/java/dev/openfeature/sdk/e2e/steps/ProviderSteps.java index 82cdb2e79..d9dde3c2b 100644 --- a/src/test/java/dev/openfeature/sdk/e2e/steps/ProviderSteps.java +++ b/src/test/java/dev/openfeature/sdk/e2e/steps/ProviderSteps.java @@ -1,13 +1,32 @@ package dev.openfeature.sdk.e2e.steps; import static dev.openfeature.sdk.testutils.TestFlagsUtils.buildFlags; +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Mockito.doAnswer; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.when; +import dev.openfeature.sdk.Client; +import dev.openfeature.sdk.ErrorCode; +import dev.openfeature.sdk.EventProvider; +import dev.openfeature.sdk.FeatureProvider; import dev.openfeature.sdk.OpenFeatureAPI; +import dev.openfeature.sdk.ProviderEvaluation; +import dev.openfeature.sdk.ProviderEventDetails; +import dev.openfeature.sdk.ProviderState; +import dev.openfeature.sdk.Reason; +import dev.openfeature.sdk.Value; import dev.openfeature.sdk.e2e.State; +import dev.openfeature.sdk.exceptions.FatalError; import dev.openfeature.sdk.providers.memory.Flag; import dev.openfeature.sdk.providers.memory.InMemoryProvider; import io.cucumber.java.en.Given; +import io.cucumber.java.en.Then; import java.util.Map; +import org.awaitility.Awaitility; public class ProviderSteps { private final State state; @@ -16,11 +35,128 @@ public ProviderSteps(State state) { this.state = state; } - @Given("a stable provider") - public void aStableProvider() { + @Given("a {} provider") + public void a_provider_with_status(String providerType) throws Exception { + // Normalize input to handle both single word and quoted strings + String normalizedType = + providerType.toLowerCase().replaceAll("[\"\\s]+", " ").trim(); + + switch (normalizedType) { + case "not ready": + setupMockProvider(ErrorCode.PROVIDER_NOT_READY, "Provider in not ready state", ProviderState.NOT_READY); + break; + case "stable": + case "ready": + setupStableProvider(); + break; + case "fatal": + setupMockProvider(ErrorCode.PROVIDER_FATAL, "Provider in fatal state", ProviderState.FATAL); + break; + case "error": + setupMockProvider(ErrorCode.GENERAL, "Provider in error state", ProviderState.ERROR); + break; + case "stale": + setupMockProvider(null, null, ProviderState.STALE); + break; + default: + throw new IllegalArgumentException("Unsupported provider type: " + providerType); + } + } + + // =============================== + // Provider Status Assertion Steps + // =============================== + + @Then("the provider status should be {string}") + public void the_provider_status_should_be(String expectedStatus) { + ProviderState actualStatus = state.client.getProviderState(); + ProviderState expected = ProviderState.valueOf(expectedStatus); + assertThat(actualStatus).isEqualTo(expected); + } + + // =============================== + // Helper Methods + // =============================== + + private void setupStableProvider() throws Exception { Map> flags = buildFlags(); InMemoryProvider provider = new InMemoryProvider(flags); OpenFeatureAPI.getInstance().setProviderAndWait(provider); state.client = OpenFeatureAPI.getInstance().getClient(); } + + private void setupMockProvider(ErrorCode errorCode, String errorMessage, ProviderState providerState) + throws Exception { + EventProvider mockProvider = spy(EventProvider.class); + + switch (providerState) { + case NOT_READY: + doAnswer(invocationOnMock -> { + while (true) {} + }) + .when(mockProvider) + .initialize(any()); + break; + case FATAL: + doThrow(new FatalError(errorMessage)).when(mockProvider).initialize(any()); + break; + } + // Configure all evaluation methods with a single helper + configureMockEvaluations(mockProvider, errorCode, errorMessage); + + OpenFeatureAPI.getInstance().setProvider(providerState.name(), mockProvider); + Client client = OpenFeatureAPI.getInstance().getClient(providerState.name()); + state.client = client; + + ProviderEventDetails details = + ProviderEventDetails.builder().errorCode(errorCode).build(); + switch (providerState) { + case FATAL: + case ERROR: + mockProvider.emitProviderReady(details); + mockProvider.emitProviderError(details); + break; + case STALE: + mockProvider.emitProviderReady(details); + mockProvider.emitProviderStale(details); + break; + default: + } + Awaitility.await().until(() -> { + ProviderState providerState1 = client.getProviderState(); + return providerState1 == providerState; + }); + } + + private void configureMockEvaluations(FeatureProvider mockProvider, ErrorCode errorCode, String errorMessage) { + // Configure Boolean evaluation + when(mockProvider.getBooleanEvaluation(anyString(), any(Boolean.class), any())) + .thenAnswer(invocation -> createProviderEvaluation(invocation.getArgument(1), errorCode, errorMessage)); + + // Configure String evaluation + when(mockProvider.getStringEvaluation(anyString(), any(String.class), any())) + .thenAnswer(invocation -> createProviderEvaluation(invocation.getArgument(1), errorCode, errorMessage)); + + // Configure Integer evaluation + when(mockProvider.getIntegerEvaluation(anyString(), any(Integer.class), any())) + .thenAnswer(invocation -> createProviderEvaluation(invocation.getArgument(1), errorCode, errorMessage)); + + // Configure Double evaluation + when(mockProvider.getDoubleEvaluation(anyString(), any(Double.class), any())) + .thenAnswer(invocation -> createProviderEvaluation(invocation.getArgument(1), errorCode, errorMessage)); + + // Configure Object evaluation + when(mockProvider.getObjectEvaluation(anyString(), any(Value.class), any())) + .thenAnswer(invocation -> createProviderEvaluation(invocation.getArgument(1), errorCode, errorMessage)); + } + + private ProviderEvaluation createProviderEvaluation( + T defaultValue, ErrorCode errorCode, String errorMessage) { + return ProviderEvaluation.builder() + .value(defaultValue) + .errorCode(errorCode) + .errorMessage(errorMessage) + .reason(Reason.ERROR.toString()) + .build(); + } } diff --git a/src/test/java/dev/openfeature/sdk/e2e/steps/StepDefinitions.java b/src/test/java/dev/openfeature/sdk/e2e/steps/StepDefinitions.java index 924c9d59e..c31e9eb7e 100644 --- a/src/test/java/dev/openfeature/sdk/e2e/steps/StepDefinitions.java +++ b/src/test/java/dev/openfeature/sdk/e2e/steps/StepDefinitions.java @@ -21,6 +21,7 @@ import java.util.Map; import lombok.SneakyThrows; +@Deprecated public class StepDefinitions { private static Client client; diff --git a/src/test/java/dev/openfeature/sdk/testutils/TestFlagsUtils.java b/src/test/java/dev/openfeature/sdk/testutils/TestFlagsUtils.java index c1767ff6f..7c45166f9 100644 --- a/src/test/java/dev/openfeature/sdk/testutils/TestFlagsUtils.java +++ b/src/test/java/dev/openfeature/sdk/testutils/TestFlagsUtils.java @@ -1,18 +1,28 @@ package dev.openfeature.sdk.testutils; -import static dev.openfeature.sdk.Structure.mapToStructure; +import static dev.openfeature.sdk.e2e.Utils.OBJECT_MAPPER; -import com.google.common.collect.ImmutableMap; +import com.fasterxml.jackson.core.StreamReadFeature; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.module.SimpleModule; import dev.openfeature.sdk.ImmutableMetadata; -import dev.openfeature.sdk.Value; +import dev.openfeature.sdk.providers.memory.ContextEvaluator; import dev.openfeature.sdk.providers.memory.Flag; -import java.util.HashMap; +import dev.openfeature.sdk.testutils.jackson.ContextEvaluatorDeserializer; +import dev.openfeature.sdk.testutils.jackson.ImmutableMetadataDeserializer; +import dev.openfeature.sdk.testutils.jackson.InMemoryFlagMixin; +import java.io.IOException; +import java.nio.file.Paths; +import java.util.Collections; import java.util.Map; import lombok.experimental.UtilityClass; +import lombok.extern.slf4j.Slf4j; /** * Test flags utils. */ +@Slf4j @UtilityClass public class TestFlagsUtils { @@ -25,87 +35,37 @@ public class TestFlagsUtils { public static final String WRONG_FLAG_KEY = "wrong-flag"; public static final String METADATA_FLAG_KEY = "metadata-flag"; + private static Map> flags; /** * Building flags for testing purposes. * * @return map of flags */ - public static Map> buildFlags() { - Map> flags = new HashMap<>(); - flags.put( - BOOLEAN_FLAG_KEY, - Flag.builder() - .variant("on", true) - .variant("off", false) - .defaultVariant("on") - .build()); - flags.put( - STRING_FLAG_KEY, - Flag.builder() - .variant("greeting", "hi") - .variant("parting", "bye") - .defaultVariant("greeting") - .build()); - flags.put( - INT_FLAG_KEY, - Flag.builder() - .variant("one", 1) - .variant("ten", 10) - .defaultVariant("ten") - .build()); - flags.put( - FLOAT_FLAG_KEY, - Flag.builder() - .variant("tenth", 0.1) - .variant("half", 0.5) - .defaultVariant("half") - .build()); - flags.put( - OBJECT_FLAG_KEY, - Flag.builder() - .variant("empty", new HashMap<>()) - .variant( - "template", - new Value(mapToStructure(ImmutableMap.of( - "showImages", new Value(true), - "title", new Value("Check out these pics!"), - "imagesPerPage", new Value(100))))) - .defaultVariant("template") - .build()); - flags.put( - CONTEXT_AWARE_FLAG_KEY, - Flag.builder() - .variant("internal", "INTERNAL") - .variant("external", "EXTERNAL") - .defaultVariant("external") - .contextEvaluator((flag, evaluationContext) -> { - if (new Value(false).equals(evaluationContext.getValue("customer"))) { - return (String) flag.getVariants().get("internal"); - } else { - return (String) flag.getVariants().get(flag.getDefaultVariant()); - } - }) - .build()); - flags.put( - WRONG_FLAG_KEY, - Flag.builder() - .variant("one", "uno") - .variant("two", "dos") - .defaultVariant("one") - .build()); - flags.put( - METADATA_FLAG_KEY, - Flag.builder() - .variant("on", true) - .variant("off", false) - .defaultVariant("on") - .flagMetadata(ImmutableMetadata.builder() - .addString("string", "1.0.2") - .addInteger("integer", 2) - .addBoolean("boolean", true) - .addDouble("float", 0.1d) - .build()) - .build()); + public static synchronized Map> buildFlags() { + if (flags == null) { + ObjectMapper objectMapper = OBJECT_MAPPER; + objectMapper.configure(StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION.mappedFeature(), true); + objectMapper.addMixIn(Flag.class, InMemoryFlagMixin.class); + objectMapper.addMixIn(Flag.FlagBuilder.class, InMemoryFlagMixin.FlagBuilderMixin.class); + + SimpleModule module = new SimpleModule(); + module.addDeserializer(ImmutableMetadata.class, new ImmutableMetadataDeserializer()); + module.addDeserializer(ContextEvaluator.class, new ContextEvaluatorDeserializer()); + objectMapper.registerModule(module); + + Map> flagsJson; + try { + flagsJson = objectMapper.readValue( + Paths.get("spec/specification/assets/gherkin/test-flags.json") + .toFile(), + new TypeReference<>() {}); + + } catch (IOException e) { + throw new RuntimeException(e); + } + flags = Collections.unmodifiableMap(flagsJson); + } + return flags; } } diff --git a/src/test/java/dev/openfeature/sdk/testutils/jackson/CelContextEvaluator.java b/src/test/java/dev/openfeature/sdk/testutils/jackson/CelContextEvaluator.java new file mode 100644 index 000000000..6ca3875ef --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/testutils/jackson/CelContextEvaluator.java @@ -0,0 +1,61 @@ +package dev.openfeature.sdk.testutils.jackson; + +import dev.cel.common.types.SimpleType; +import dev.cel.compiler.CelCompiler; +import dev.cel.compiler.CelCompilerFactory; +import dev.cel.runtime.CelRuntime; +import dev.cel.runtime.CelRuntimeFactory; +import dev.openfeature.sdk.EvaluationContext; +import dev.openfeature.sdk.providers.memory.ContextEvaluator; +import dev.openfeature.sdk.providers.memory.Flag; +import java.util.HashMap; +import java.util.Map; + +public class CelContextEvaluator implements ContextEvaluator { + private final CelRuntime.Program program; + + public CelContextEvaluator(String expression) { + try { + CelRuntime celRuntime = + CelRuntimeFactory.standardCelRuntimeBuilder().build(); + CelCompiler celCompiler = CelCompilerFactory.standardCelCompilerBuilder() + .addVar("customer", SimpleType.BOOL) + .addVar("email", SimpleType.STRING) + .addVar("age", SimpleType.INT) + .addVar("dummy", SimpleType.STRING) + .setResultType(SimpleType.STRING) + // Add other variables you expect + .build(); + + var ast = celCompiler.compile(expression).getAst(); + this.program = celRuntime.createProgram(ast); + } catch (Exception e) { + throw new RuntimeException("Failed to compile CEL expression: " + expression, e); + } + } + + @Override + @SuppressWarnings("unchecked") + public T evaluate(Flag flag, EvaluationContext evaluationContext) { + try { + Map objectMap = new HashMap<>(); + // Provide defaults for all declared variables to prevent runtime errors. + objectMap.put("email", ""); + objectMap.put("customer", true); + objectMap.put("age", 0); + objectMap.put("dummy", ""); + + if (evaluationContext != null) { + // Evaluate with context, overriding defaults. + objectMap.putAll(evaluationContext.asObjectMap()); + } + + Object result = program.eval(objectMap); + + String stringResult = (String) result; + return (T) flag.getVariants().get(stringResult); + } catch (Exception e) { + throw new RuntimeException(e); + } + } +} diff --git a/src/test/java/dev/openfeature/sdk/testutils/jackson/ContextEvaluatorDeserializer.java b/src/test/java/dev/openfeature/sdk/testutils/jackson/ContextEvaluatorDeserializer.java new file mode 100644 index 000000000..e348fc8c5 --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/testutils/jackson/ContextEvaluatorDeserializer.java @@ -0,0 +1,25 @@ +package dev.openfeature.sdk.testutils.jackson; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonNode; +import dev.openfeature.sdk.providers.memory.ContextEvaluator; +import java.io.IOException; + +public class ContextEvaluatorDeserializer extends JsonDeserializer> { + @Override + public ContextEvaluator deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + JsonNode node = p.getCodec().readTree(p); + + if (node.isTextual()) { + return new CelContextEvaluator<>(node.asText()); + } + + if (node.isObject() && node.has("expression")) { + return new CelContextEvaluator<>(node.get("expression").asText()); + } + + return null; + } +} diff --git a/src/test/java/dev/openfeature/sdk/testutils/jackson/ImmutableMetadataDeserializer.java b/src/test/java/dev/openfeature/sdk/testutils/jackson/ImmutableMetadataDeserializer.java new file mode 100644 index 000000000..09f7c6f24 --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/testutils/jackson/ImmutableMetadataDeserializer.java @@ -0,0 +1,41 @@ +package dev.openfeature.sdk.testutils.jackson; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import dev.openfeature.sdk.ImmutableMetadata; +import java.io.IOException; +import java.util.Map; + +public class ImmutableMetadataDeserializer extends JsonDeserializer { + @Override + public ImmutableMetadata deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + Map properties = p.readValueAs(new TypeReference>() {}); + + ImmutableMetadata.ImmutableMetadataBuilder builder = ImmutableMetadata.builder(); + + if (properties != null) { + for (Map.Entry entry : properties.entrySet()) { + String key = entry.getKey(); + Object value = entry.getValue(); + + if (value instanceof String) { + builder.addString(key, (String) value); + } else if (value instanceof Integer) { + builder.addInteger(key, (Integer) value); + } else if (value instanceof Long) { + builder.addLong(key, (Long) value); + } else if (value instanceof Float) { + builder.addFloat(key, (Float) value); + } else if (value instanceof Double) { + builder.addDouble(key, (Double) value); + } else if (value instanceof Boolean) { + builder.addBoolean(key, (Boolean) value); + } + } + } + + return builder.build(); + } +} diff --git a/src/test/java/dev/openfeature/sdk/testutils/jackson/InMemoryFlagMixin.java b/src/test/java/dev/openfeature/sdk/testutils/jackson/InMemoryFlagMixin.java new file mode 100644 index 000000000..dd0154cdd --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/testutils/jackson/InMemoryFlagMixin.java @@ -0,0 +1,20 @@ +package dev.openfeature.sdk.testutils.jackson; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; +import dev.openfeature.sdk.providers.memory.Flag; +import java.util.Map; + +@JsonDeserialize(builder = Flag.FlagBuilder.class) +@SuppressWarnings("rawtypes") +public abstract class InMemoryFlagMixin { + + @JsonPOJOBuilder(withPrefix = "") + public abstract class FlagBuilderMixin { + + @JsonProperty("variants") + @JsonDeserialize(using = VariantsMapDeserializer.class) + public abstract Flag.FlagBuilder variants(Map variants); + } +} diff --git a/src/test/java/dev/openfeature/sdk/testutils/jackson/VariantsMapDeserializer.java b/src/test/java/dev/openfeature/sdk/testutils/jackson/VariantsMapDeserializer.java new file mode 100644 index 000000000..f7a621cbb --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/testutils/jackson/VariantsMapDeserializer.java @@ -0,0 +1,65 @@ +package dev.openfeature.sdk.testutils.jackson; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.JsonNode; +import dev.openfeature.sdk.Value; +import java.io.IOException; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +public class VariantsMapDeserializer extends JsonDeserializer> { + + @Override + public Map deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + JsonNode node = p.getCodec().readTree(p); + Map variants = new HashMap<>(); + + Iterator> fields = node.fields(); + while (fields.hasNext()) { + Map.Entry field = fields.next(); + String variantKey = field.getKey(); + JsonNode variantNode = field.getValue(); + + // Convert the variant value to OpenFeature Value + Object variantValue = convertToValue(p, variantNode); + variants.put(variantKey, variantValue); + } + + return variants; + } + + private Object convertToValue(JsonParser p, JsonNode node) throws JsonProcessingException { + // If the node has a "value" property, use that + if (node.isObject() && node.has("value")) { + return convertJsonNodeToValue(p, node.get("value")); + } + + // Otherwise, treat the entire node as the value + return convertJsonNodeToValue(p, node); + } + + private Object convertJsonNodeToValue(JsonParser p, JsonNode node) throws JsonProcessingException { + if (node.isNull()) { + return null; + } else if (node.isBoolean()) { + return node.asBoolean(); + } else if (node.isInt()) { + return node.asInt(); + } else if (node.isDouble()) { + return node.asDouble(); + } else if (node.isTextual()) { + return node.asText(); + } else if (node.isArray()) { + return Value.objectToValue(p.getCodec().treeToValue(node, List.class)); + } else if (node.isObject()) { + return Value.objectToValue(p.getCodec().treeToValue(node, Object.class)); + } + + throw new IllegalArgumentException("Unsupported JSON node type: " + node.getNodeType()); + } +} From b69339067a75a524911dded9798a06e58d628bce Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 16 Sep 2025 16:30:28 +0200 Subject: [PATCH 266/391] fix(deps): update dependency com.fasterxml.jackson:jackson-bom to v2.20.0 (#1604) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 932dd584f..516a241f0 100644 --- a/pom.xml +++ b/pom.xml @@ -219,7 +219,7 @@ com.fasterxml.jackson jackson-bom - 2.16.1 + 2.20.0 pom import From af189f8fedecfc7fc126730dae48c5437876892c Mon Sep 17 00:00:00 2001 From: chrfwow Date: Tue, 16 Sep 2025 16:45:17 +0200 Subject: [PATCH 267/391] feat: Add vmlens checks (#1567) * Add vmlens Signed-off-by: christian.lutnik * fix test and gitignore Signed-off-by: christian.lutnik * remove vmlens agent binary Signed-off-by: christian.lutnik * remove unused import Signed-off-by: christian.lutnik * remove vmlens from gitignore, add failing test to check if vmlens still works Signed-off-by: christian.lutnik * remove failing test Signed-off-by: christian.lutnik * remove volatile Signed-off-by: christian.lutnik * update vmlens Signed-off-by: christian.lutnik --------- Signed-off-by: christian.lutnik Co-authored-by: Simon Schrottner --- .github/workflows/pullrequest.yml | 2 +- pom.xml | 25 +++++- .../openfeature/sdk/vmlens/VmLensTest.java | 77 +++++++++++++++++++ 3 files changed, 101 insertions(+), 3 deletions(-) create mode 100644 src/test/java/dev/openfeature/sdk/vmlens/VmLensTest.java diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 3149c89dd..742bf1af4 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -21,7 +21,7 @@ jobs: - name: Check out the code uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 - - name: Set up JDK 11 + - name: Set up JDK ${{ matrix.build.java }} uses: actions/setup-java@a7ab372554b6eb1a8eb25e7d9aec1cc9f3ea1a76 with: java-version: ${{ matrix.build.java }} diff --git a/pom.xml b/pom.xml index 516a241f0..67b031257 100644 --- a/pom.xml +++ b/pom.xml @@ -193,6 +193,13 @@ test + + com.vmlens + api + 1.2.13 + test + + @@ -239,7 +246,6 @@ pom import - @@ -331,7 +337,6 @@ - @@ -343,6 +348,22 @@ + + com.vmlens + vmlens-maven-plugin + 1.2.13 + + + test + + test + + + true + + + + maven-dependency-plugin 3.8.1 diff --git a/src/test/java/dev/openfeature/sdk/vmlens/VmLensTest.java b/src/test/java/dev/openfeature/sdk/vmlens/VmLensTest.java new file mode 100644 index 000000000..136c35965 --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/vmlens/VmLensTest.java @@ -0,0 +1,77 @@ +package dev.openfeature.sdk.vmlens; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import com.vmlens.api.AllInterleavings; +import com.vmlens.api.Runner; +import dev.openfeature.sdk.ImmutableContext; +import dev.openfeature.sdk.OpenFeatureAPI; +import dev.openfeature.sdk.OpenFeatureAPITestUtil; +import dev.openfeature.sdk.Value; +import dev.openfeature.sdk.providers.memory.Flag; +import dev.openfeature.sdk.providers.memory.InMemoryProvider; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +class VmLensTest { + final OpenFeatureAPI api = OpenFeatureAPITestUtil.createAPI(); + + @BeforeEach + void setUp() { + var flags = new HashMap>(); + flags.put("a", Flag.builder().variant("a", "def").defaultVariant("a").build()); + flags.put("b", Flag.builder().variant("a", "as").defaultVariant("a").build()); + api.setProviderAndWait(new InMemoryProvider(flags)); + } + + @AfterEach + void tearDown() { + api.clearHooks(); + api.shutdown(); + } + + @Test + void concurrentClientCreations() { + try (AllInterleavings allInterleavings = new AllInterleavings("Concurrent creations of the Client")) { + while (allInterleavings.hasNext()) { + Runner.runParallel(api::getClient, api::getClient); + } + } + // keep the linter happy + assertTrue(true); + } + + @Test + void concurrentFlagEvaluations() { + var client = api.getClient(); + try (AllInterleavings allInterleavings = new AllInterleavings("Concurrent evaluations")) { + while (allInterleavings.hasNext()) { + Runner.runParallel( + () -> assertEquals("def", client.getStringValue("a", "a")), + () -> assertEquals("as", client.getStringValue("b", "b"))); + } + } + } + + @Test + void concurrentContextSetting() { + var client = api.getClient(); + var contextA = new ImmutableContext(Map.of("a", new Value("b"))); + var contextB = new ImmutableContext(Map.of("c", new Value("d"))); + try (AllInterleavings allInterleavings = + new AllInterleavings("Concurrently setting the context and evaluating a flag")) { + while (allInterleavings.hasNext()) { + Runner.runParallel( + () -> assertEquals("def", client.getStringValue("a", "a")), + () -> client.setEvaluationContext(contextA), + () -> client.setEvaluationContext(contextB)); + assertThat(client.getEvaluationContext()).isIn(contextA, contextB); + } + } + } +} From a92a367fef71cc9ec26f6b1b6609fb8e6b2543bc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 16 Sep 2025 18:07:43 +0200 Subject: [PATCH 268/391] chore(deps): update dependency com.vmlens:vmlens-maven-plugin to v1.2.14 (#1606) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 67b031257..4c59a9b96 100644 --- a/pom.xml +++ b/pom.xml @@ -351,7 +351,7 @@ com.vmlens vmlens-maven-plugin - 1.2.13 + 1.2.14 test From e7922212d8cd964a8a24dacc518ff31c77fcfae6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 08:29:52 +0200 Subject: [PATCH 269/391] chore(deps): update dependency dev.cel:cel to v0.11.0 (#1603) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4c59a9b96..abbb6f008 100644 --- a/pom.xml +++ b/pom.xml @@ -189,7 +189,7 @@ dev.cel cel - 0.10.1 + 0.11.0 test From 45ff89f530e8c73636618676b9db46c61235df57 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 10:27:28 +0000 Subject: [PATCH 270/391] fix(deps): update dependency com.github.spotbugs:spotbugs to v4.9.6 (#1609) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index abbb6f008..0754cafbd 100644 --- a/pom.xml +++ b/pom.xml @@ -60,7 +60,7 @@ com.github.spotbugs spotbugs - 4.9.5 + 4.9.6 provided @@ -473,7 +473,7 @@ com.github.spotbugs spotbugs - 4.9.5 + 4.9.6 From a40667e9cb635f9ba31f6975ba72bc5932fca094 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 14:12:03 +0000 Subject: [PATCH 271/391] chore(deps): update actions/setup-java digest to ead9eaa (#1608) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 2a3633045..a7e2b1bc3 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 - name: Set up JDK 17 - uses: actions/setup-java@a7ab372554b6eb1a8eb25e7d9aec1cc9f3ea1a76 + uses: actions/setup-java@ead9eaa3cfe0b0fc2fa749519ae09c3d4f4080b0 with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 742bf1af4..819d0eac2 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 - name: Set up JDK ${{ matrix.build.java }} - uses: actions/setup-java@a7ab372554b6eb1a8eb25e7d9aec1cc9f3ea1a76 + uses: actions/setup-java@ead9eaa3cfe0b0fc2fa749519ae09c3d4f4080b0 with: java-version: ${{ matrix.build.java }} distribution: 'temurin' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f130b89d7..c6104f125 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 - name: Set up JDK 17 - uses: actions/setup-java@a7ab372554b6eb1a8eb25e7d9aec1cc9f3ea1a76 + uses: actions/setup-java@ead9eaa3cfe0b0fc2fa749519ae09c3d4f4080b0 with: java-version: '17' distribution: 'temurin' From 984560196d4a34fb21c8946d1dc675cf6565e90f Mon Sep 17 00:00:00 2001 From: chrfwow Date: Wed, 17 Sep 2025 17:35:53 +0200 Subject: [PATCH 272/391] fix: revert hook data to resolve bytecode incompatibility (#1613) * revert v2 Signed-off-by: christian.lutnik * remove vmlens to speed up the build Signed-off-by: christian.lutnik --------- Signed-off-by: christian.lutnik --- pom.xml | 4 +- .../java/dev/openfeature/sdk/HookContext.java | 63 +++--- .../openfeature/sdk/HookContextWithData.java | 50 ----- .../sdk/HookContextWithoutData.java | 55 ------ .../java/dev/openfeature/sdk/HookData.java | 81 -------- .../java/dev/openfeature/sdk/HookSupport.java | 105 +++------- .../dev/openfeature/sdk/ImmutableContext.java | 2 - .../openfeature/sdk/OpenFeatureClient.java | 43 ++-- src/main/java/dev/openfeature/sdk/Pair.java | 28 --- .../dev/openfeature/sdk/HookContextTest.java | 44 +---- .../dev/openfeature/sdk/HookDataTest.java | 79 -------- .../dev/openfeature/sdk/HookSupportTest.java | 184 ++---------------- .../sdk/benchmark/AllocationBenchmark.java | 24 --- 13 files changed, 111 insertions(+), 651 deletions(-) delete mode 100644 src/main/java/dev/openfeature/sdk/HookContextWithData.java delete mode 100644 src/main/java/dev/openfeature/sdk/HookContextWithoutData.java delete mode 100644 src/main/java/dev/openfeature/sdk/HookData.java delete mode 100644 src/main/java/dev/openfeature/sdk/Pair.java delete mode 100644 src/test/java/dev/openfeature/sdk/HookDataTest.java diff --git a/pom.xml b/pom.xml index 0754cafbd..07c0e23a7 100644 --- a/pom.xml +++ b/pom.xml @@ -348,7 +348,7 @@ - + maven-dependency-plugin 3.8.1 diff --git a/src/main/java/dev/openfeature/sdk/HookContext.java b/src/main/java/dev/openfeature/sdk/HookContext.java index e88e812a6..e14eeb643 100644 --- a/src/main/java/dev/openfeature/sdk/HookContext.java +++ b/src/main/java/dev/openfeature/sdk/HookContext.java @@ -1,13 +1,32 @@ package dev.openfeature.sdk; -import dev.openfeature.sdk.HookContextWithoutData.HookContextWithoutDataBuilder; +import lombok.Builder; +import lombok.NonNull; +import lombok.Value; +import lombok.With; /** - * A interface to hold immutable context that {@link Hook} instances use. + * A data class to hold immutable context that {@link Hook} instances use. + * + * @param the type for the flag being evaluated */ -public interface HookContext { +@Value +@Builder +@With +public class HookContext { + @NonNull String flagKey; + + @NonNull FlagValueType type; + + @NonNull T defaultValue; + + @NonNull EvaluationContext ctx; + + ClientMetadata clientMetadata; + Metadata providerMetadata; + /** - * Builds a {@link HookContextWithoutData} instances from request data. + * Builds a {@link HookContext} instances from request data. * * @param key feature flag key * @param type flag value type @@ -17,39 +36,21 @@ public interface HookContext { * @param defaultValue Fallback value * @param type that the flag is evaluating against * @return resulting context for hook - * @deprecated this should not be instantiated outside the SDK anymore */ - @Deprecated - static HookContext from( + public static HookContext from( String key, FlagValueType type, ClientMetadata clientMetadata, Metadata providerMetadata, EvaluationContext ctx, T defaultValue) { - return new HookContextWithoutData<>(key, type, defaultValue, ctx, clientMetadata, providerMetadata); - } - - /** - * Returns a builder for our default HookContext object. - */ - static HookContextWithoutDataBuilder builder() { - return HookContextWithoutData.builder(); - } - - String getFlagKey(); - - FlagValueType getType(); - - T getDefaultValue(); - - EvaluationContext getCtx(); - - ClientMetadata getClientMetadata(); - - Metadata getProviderMetadata(); - - default HookData getHookData() { - return null; + return HookContext.builder() + .flagKey(key) + .type(type) + .clientMetadata(clientMetadata) + .providerMetadata(providerMetadata) + .ctx(ctx) + .defaultValue(defaultValue) + .build(); } } diff --git a/src/main/java/dev/openfeature/sdk/HookContextWithData.java b/src/main/java/dev/openfeature/sdk/HookContextWithData.java deleted file mode 100644 index 137477c11..000000000 --- a/src/main/java/dev/openfeature/sdk/HookContextWithData.java +++ /dev/null @@ -1,50 +0,0 @@ -package dev.openfeature.sdk; - -class HookContextWithData implements HookContext { - private final HookContext context; - private final HookData data; - - private HookContextWithData(HookContext context, HookData data) { - this.context = context; - this.data = data; - } - - public static HookContextWithData of(HookContext context, HookData data) { - return new HookContextWithData<>(context, data); - } - - @Override - public String getFlagKey() { - return context.getFlagKey(); - } - - @Override - public FlagValueType getType() { - return context.getType(); - } - - @Override - public T getDefaultValue() { - return context.getDefaultValue(); - } - - @Override - public EvaluationContext getCtx() { - return context.getCtx(); - } - - @Override - public ClientMetadata getClientMetadata() { - return context.getClientMetadata(); - } - - @Override - public Metadata getProviderMetadata() { - return context.getProviderMetadata(); - } - - @Override - public HookData getHookData() { - return data; - } -} diff --git a/src/main/java/dev/openfeature/sdk/HookContextWithoutData.java b/src/main/java/dev/openfeature/sdk/HookContextWithoutData.java deleted file mode 100644 index df1ed6ad1..000000000 --- a/src/main/java/dev/openfeature/sdk/HookContextWithoutData.java +++ /dev/null @@ -1,55 +0,0 @@ -package dev.openfeature.sdk; - -import lombok.AccessLevel; -import lombok.Builder; -import lombok.Data; -import lombok.NonNull; -import lombok.Setter; -import lombok.With; - -/** - * A data class to hold immutable context that {@link Hook} instances use. - * - * @param the type for the flag being evaluated - */ -@Data -@Builder -@With -@Setter(AccessLevel.PRIVATE) -class HookContextWithoutData implements HookContext { - @NonNull String flagKey; - - @NonNull FlagValueType type; - - @NonNull T defaultValue; - - @Setter(AccessLevel.PACKAGE) - @NonNull EvaluationContext ctx; - - ClientMetadata clientMetadata; - Metadata providerMetadata; - - /** - * Builds a {@link HookContextWithoutData} instances from request data. - * - * @param key feature flag key - * @param type flag value type - * @param clientMetadata info on which client is calling - * @param providerMetadata info on the provider - * @param defaultValue Fallback value - * @param type that the flag is evaluating against - * @return resulting context for hook - */ - static HookContextWithoutData from( - String key, FlagValueType type, ClientMetadata clientMetadata, Metadata providerMetadata, T defaultValue) { - return new HookContextWithoutData<>( - key, type, defaultValue, ImmutableContext.EMPTY, clientMetadata, providerMetadata); - } - - /** - * Make the builder visible for javadocs. - * - * @param flag value type - */ - public static class HookContextWithoutDataBuilder {} -} diff --git a/src/main/java/dev/openfeature/sdk/HookData.java b/src/main/java/dev/openfeature/sdk/HookData.java deleted file mode 100644 index c7c644a93..000000000 --- a/src/main/java/dev/openfeature/sdk/HookData.java +++ /dev/null @@ -1,81 +0,0 @@ -package dev.openfeature.sdk; - -import java.util.HashMap; -import java.util.Map; - -/** - * Hook data provides a way for hooks to maintain state across their execution stages. - * Each hook instance gets its own isolated data store that persists only for the duration - * of a single flag evaluation. - */ -public interface HookData { - - /** - * Sets a value for the given key. - * - * @param key the key to store the value under - * @param value the value to store - */ - void set(String key, Object value); - - /** - * Gets the value for the given key. - * - * @param key the key to retrieve the value for - * @return the value, or null if not found - */ - Object get(String key); - - /** - * Gets the value for the given key, cast to the specified type. - * - * @param the type to cast to - * @param key the key to retrieve the value for - * @param type the class to cast to - * @return the value cast to the specified type, or null if not found - * @throws ClassCastException if the value cannot be cast to the specified type - */ - T get(String key, Class type); - - /** - * Default implementation uses a HashMap. - */ - static HookData create() { - return new DefaultHookData(); - } - - /** - * Default implementation of HookData. - */ - class DefaultHookData implements HookData { - private Map data; - - @Override - public void set(String key, Object value) { - if (data == null) { - data = new HashMap<>(); - } - data.put(key, value); - } - - @Override - public Object get(String key) { - if (data == null) { - return null; - } - return data.get(key); - } - - @Override - public T get(String key, Class type) { - Object value = get(key); - if (value == null) { - return null; - } - if (!type.isInstance(value)) { - throw new ClassCastException("Value for key '" + key + "' is not of type " + type.getName()); - } - return type.cast(value); - } - } -} diff --git a/src/main/java/dev/openfeature/sdk/HookSupport.java b/src/main/java/dev/openfeature/sdk/HookSupport.java index e9ebbbe58..73518ee8e 100644 --- a/src/main/java/dev/openfeature/sdk/HookSupport.java +++ b/src/main/java/dev/openfeature/sdk/HookSupport.java @@ -5,7 +5,7 @@ import java.util.List; import java.util.Map; import java.util.Optional; -import java.util.function.BiConsumer; +import java.util.function.Consumer; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -15,81 +15,52 @@ class HookSupport { public EvaluationContext beforeHooks( - FlagValueType flagValueType, - HookContext hookCtx, - List> hookDataPairs, - Map hints) { - return callBeforeHooks(flagValueType, hookCtx, hookDataPairs, hints); + FlagValueType flagValueType, HookContext hookCtx, List hooks, Map hints) { + return callBeforeHooks(flagValueType, hookCtx, hooks, hints); } public void afterHooks( FlagValueType flagValueType, HookContext hookContext, FlagEvaluationDetails details, - List> hookDataPairs, + List hooks, Map hints) { - executeHooksUnchecked( - flagValueType, hookDataPairs, hookContext, (hook, ctx) -> hook.after(ctx, details, hints)); + executeHooksUnchecked(flagValueType, hooks, hook -> hook.after(hookContext, details, hints)); } public void afterAllHooks( FlagValueType flagValueType, HookContext hookCtx, FlagEvaluationDetails details, - List> hookDataPairs, + List hooks, Map hints) { - executeHooks( - flagValueType, - hookDataPairs, - hookCtx, - "finally", - (hook, ctx) -> hook.finallyAfter(ctx, details, hints)); + executeHooks(flagValueType, hooks, "finally", hook -> hook.finallyAfter(hookCtx, details, hints)); } public void errorHooks( FlagValueType flagValueType, HookContext hookCtx, Exception e, - List> hookDataPairs, + List hooks, Map hints) { - executeHooks(flagValueType, hookDataPairs, hookCtx, "error", (hook, ctx) -> hook.error(ctx, e, hints)); - } - - public List> getHookDataPairs(List hooks, FlagValueType flagValueType) { - var pairs = new ArrayList>(); - for (Hook hook : hooks) { - if (hook.supportsFlagValueType(flagValueType)) { - pairs.add(Pair.of(hook, HookData.create())); - } - } - return pairs; + executeHooks(flagValueType, hooks, "error", hook -> hook.error(hookCtx, e, hints)); } private void executeHooks( - FlagValueType flagValueType, - List> hookDataPairs, - HookContext hookContext, - String hookMethod, - BiConsumer, HookContext> hookCode) { - if (hookDataPairs != null) { - for (Pair hookDataPair : hookDataPairs) { - Hook hook = hookDataPair.getLeft(); - HookData hookData = hookDataPair.getRight(); - executeChecked(hook, hookData, hookContext, hookCode, hookMethod); + FlagValueType flagValueType, List hooks, String hookMethod, Consumer> hookCode) { + if (hooks != null) { + for (Hook hook : hooks) { + if (hook.supportsFlagValueType(flagValueType)) { + executeChecked(hook, hookCode, hookMethod); + } } } } // before, error, and finally hooks shouldn't throw - private void executeChecked( - Hook hook, - HookData hookData, - HookContext hookContext, - BiConsumer, HookContext> hookCode, - String hookMethod) { + private void executeChecked(Hook hook, Consumer> hookCode, String hookMethod) { try { - var hookCtxWithData = HookContextWithData.of(hookContext, hookData); - hookCode.accept(hook, hookCtxWithData); + hookCode.accept(hook); } catch (Exception exception) { log.error( "Unhandled exception when running {} hook {} (only 'after' hooks should throw)", @@ -100,41 +71,29 @@ private void executeChecked( } // after hooks can throw in order to do validation - private void executeHooksUnchecked( - FlagValueType flagValueType, - List> hookDataPairs, - HookContext hookContext, - BiConsumer, HookContext> hookCode) { - if (hookDataPairs != null) { - for (Pair hookDataPair : hookDataPairs) { - Hook hook = hookDataPair.getLeft(); - HookData hookData = hookDataPair.getRight(); - var hookCtxWithData = HookContextWithData.of(hookContext, hookData); - hookCode.accept(hook, hookCtxWithData); + private void executeHooksUnchecked(FlagValueType flagValueType, List hooks, Consumer> hookCode) { + if (hooks != null) { + for (Hook hook : hooks) { + if (hook.supportsFlagValueType(flagValueType)) { + hookCode.accept(hook); + } } } } private EvaluationContext callBeforeHooks( - FlagValueType flagValueType, - HookContext hookCtx, - List> hookDataPairs, - Map hints) { + FlagValueType flagValueType, HookContext hookCtx, List hooks, Map hints) { // These traverse backwards from normal. - List> reversedHooks = new ArrayList<>(hookDataPairs); + List reversedHooks = new ArrayList<>(hooks); Collections.reverse(reversedHooks); EvaluationContext context = hookCtx.getCtx(); - - for (Pair hookDataPair : reversedHooks) { - Hook hook = hookDataPair.getLeft(); - HookData hookData = hookDataPair.getRight(); - - // Create a new context with this hook's data - HookContext contextWithHookData = HookContextWithData.of(hookCtx, hookData); - Optional optional = - Optional.ofNullable(hook.before(contextWithHookData, hints)).orElse(Optional.empty()); - if (optional.isPresent()) { - context = context.merge(optional.get()); + for (Hook hook : reversedHooks) { + if (hook.supportsFlagValueType(flagValueType)) { + Optional optional = + Optional.ofNullable(hook.before(hookCtx, hints)).orElse(Optional.empty()); + if (optional.isPresent()) { + context = context.merge(optional.get()); + } } } return context; diff --git a/src/main/java/dev/openfeature/sdk/ImmutableContext.java b/src/main/java/dev/openfeature/sdk/ImmutableContext.java index e4916dfca..8560c369e 100644 --- a/src/main/java/dev/openfeature/sdk/ImmutableContext.java +++ b/src/main/java/dev/openfeature/sdk/ImmutableContext.java @@ -20,8 +20,6 @@ @SuppressWarnings("PMD.BeanMembersShouldSerialize") public final class ImmutableContext implements EvaluationContext { - public static final ImmutableContext EMPTY = new ImmutableContext(); - @Delegate(excludes = DelegateExclusions.class) private final ImmutableStructure structure; diff --git a/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java b/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java index 10c359e3e..b5522b66a 100644 --- a/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java +++ b/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java @@ -164,27 +164,32 @@ private FlagEvaluationDetails evaluateFlag( var hints = Collections.unmodifiableMap(flagOptions.getHookHints()); FlagEvaluationDetails details = null; - List mergedHooks; - List> hookDataPairs = null; - HookContextWithoutData hookContext = null; + List mergedHooks = null; + HookContext afterHookContext = null; try { - final var stateManager = openfeatureApi.getFeatureProviderStateManager(this.domain); + var stateManager = openfeatureApi.getFeatureProviderStateManager(this.domain); // provider must be accessed once to maintain a consistent reference - final var provider = stateManager.getProvider(); - final var state = stateManager.getState(); - hookContext = - HookContextWithoutData.from(key, type, this.getMetadata(), provider.getMetadata(), defaultValue); - - // we are setting the evaluation context one after the other, so that we have a hook context in each - // possible exception case. - hookContext.setCtx(mergeEvaluationContext(ctx)); + var provider = stateManager.getProvider(); + var state = stateManager.getState(); mergedHooks = ObjectUtils.merge( provider.getProviderHooks(), flagOptions.getHooks(), clientHooks, openfeatureApi.getMutableHooks()); - hookDataPairs = hookSupport.getHookDataPairs(mergedHooks, type); - var mergedCtx = hookSupport.beforeHooks(type, hookContext, hookDataPairs, hints); - hookContext.setCtx(mergedCtx); + + var mergedCtx = hookSupport.beforeHooks( + type, + HookContext.from( + key, + type, + this.getMetadata(), + provider.getMetadata(), + mergeEvaluationContext(ctx), + defaultValue), + mergedHooks, + hints); + + afterHookContext = + HookContext.from(key, type, this.getMetadata(), provider.getMetadata(), mergedCtx, defaultValue); // "short circuit" if the provider is in NOT_READY or FATAL state if (ProviderState.NOT_READY.equals(state)) { @@ -202,9 +207,9 @@ private FlagEvaluationDetails evaluateFlag( var error = ExceptionUtils.instantiateErrorByErrorCode(details.getErrorCode(), details.getErrorMessage()); enrichDetailsWithErrorDefaults(defaultValue, details); - hookSupport.errorHooks(type, hookContext, error, hookDataPairs, hints); + hookSupport.errorHooks(type, afterHookContext, error, mergedHooks, hints); } else { - hookSupport.afterHooks(type, hookContext, details, hookDataPairs, hints); + hookSupport.afterHooks(type, afterHookContext, details, mergedHooks, hints); } } catch (Exception e) { if (details == null) { @@ -217,9 +222,9 @@ private FlagEvaluationDetails evaluateFlag( } details.setErrorMessage(e.getMessage()); enrichDetailsWithErrorDefaults(defaultValue, details); - hookSupport.errorHooks(type, hookContext, e, hookDataPairs, hints); + hookSupport.errorHooks(type, afterHookContext, e, mergedHooks, hints); } finally { - hookSupport.afterAllHooks(type, hookContext, details, hookDataPairs, hints); + hookSupport.afterAllHooks(type, afterHookContext, details, mergedHooks, hints); } return details; diff --git a/src/main/java/dev/openfeature/sdk/Pair.java b/src/main/java/dev/openfeature/sdk/Pair.java deleted file mode 100644 index bc6614093..000000000 --- a/src/main/java/dev/openfeature/sdk/Pair.java +++ /dev/null @@ -1,28 +0,0 @@ -package dev.openfeature.sdk; - -class Pair { - private final K key; - private final V value; - - private Pair(K key, V value) { - this.key = key; - this.value = value; - } - - public K getLeft() { - return key; - } - - public V getRight() { - return value; - } - - @Override - public String toString() { - return "Pair{" + "key=" + key + ", value=" + value + '}'; - } - - public static Pair of(K key, V value) { - return new Pair<>(key, value); - } -} diff --git a/src/test/java/dev/openfeature/sdk/HookContextTest.java b/src/test/java/dev/openfeature/sdk/HookContextTest.java index 123052b7d..2196b8b1f 100644 --- a/src/test/java/dev/openfeature/sdk/HookContextTest.java +++ b/src/test/java/dev/openfeature/sdk/HookContextTest.java @@ -1,6 +1,6 @@ package dev.openfeature.sdk; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.mock; import org.junit.jupiter.api.Test; @@ -29,46 +29,4 @@ void metadata_field_is_type_metadata() { "The before stage MUST run before flag resolution occurs. It accepts a hook context (required) and hook hints (optional) as parameters. It has no return value.") @Test void not_applicable_for_dynamic_context() {} - - @Test - void shouldCreateHookContextWithHookData() { - HookData hookData = HookData.create(); - hookData.set("test", "value"); - - HookContextWithData context = HookContextWithData.of(mock(HookContext.class), hookData); - - assertNotNull(context.getHookData()); - assertEquals("value", context.getHookData().get("test")); - } - - @Test - void shouldCreateHookContextWithoutHookData() { - HookContext context = HookContext.builder() - .flagKey("test-flag") - .type(FlagValueType.STRING) - .defaultValue("default") - .ctx(new ImmutableContext()) - .build(); - - assertNull(context.getHookData()); - } - - @Test - void shouldCreateHookContextWithHookDataUsingWith() { - HookContext originalContext = HookContext.builder() - .flagKey("test-flag") - .type(FlagValueType.STRING) - .defaultValue("default") - .ctx(new ImmutableContext()) - .build(); - - HookData hookData = HookData.create(); - hookData.set("timing", System.currentTimeMillis()); - - HookContext contextWithHookData = HookContextWithData.of(originalContext, hookData); - - assertNull(originalContext.getHookData()); - assertNotNull(contextWithHookData.getHookData()); - assertNotNull(contextWithHookData.getHookData().get("timing")); - } } diff --git a/src/test/java/dev/openfeature/sdk/HookDataTest.java b/src/test/java/dev/openfeature/sdk/HookDataTest.java deleted file mode 100644 index eacbeeb78..000000000 --- a/src/test/java/dev/openfeature/sdk/HookDataTest.java +++ /dev/null @@ -1,79 +0,0 @@ -package dev.openfeature.sdk; - -import static org.junit.jupiter.api.Assertions.*; - -import org.junit.jupiter.api.Test; - -class HookDataTest { - - @Test - void shouldStoreAndRetrieveValues() { - HookData hookData = HookData.create(); - - hookData.set("key1", "value1"); - hookData.set("key2", 42); - hookData.set("key3", true); - - assertEquals("value1", hookData.get("key1")); - assertEquals(42, hookData.get("key2")); - assertEquals(true, hookData.get("key3")); - } - - @Test - void shouldReturnNullForMissingKeys() { - HookData hookData = HookData.create(); - - assertNull(hookData.get("nonexistent")); - } - - @Test - void shouldSupportTypeSafeRetrieval() { - HookData hookData = HookData.create(); - - hookData.set("string", "hello"); - hookData.set("integer", 123); - hookData.set("boolean", false); - - assertEquals("hello", hookData.get("string", String.class)); - assertEquals(Integer.valueOf(123), hookData.get("integer", Integer.class)); - assertEquals(Boolean.FALSE, hookData.get("boolean", Boolean.class)); - } - - @Test - void shouldReturnNullForMissingKeysWithType() { - HookData hookData = HookData.create(); - - assertNull(hookData.get("missing", String.class)); - } - - @Test - void shouldThrowClassCastExceptionForWrongType() { - HookData hookData = HookData.create(); - - hookData.set("string", "not a number"); - - assertThrows(ClassCastException.class, () -> { - hookData.get("string", Integer.class); - }); - } - - @Test - void shouldOverwriteExistingValues() { - HookData hookData = HookData.create(); - - hookData.set("key", "original"); - assertEquals("original", hookData.get("key")); - - hookData.set("key", "updated"); - assertEquals("updated", hookData.get("key")); - } - - @Test - void shouldSupportNullValues() { - HookData hookData = HookData.create(); - - hookData.set("nullKey", null); - assertNull(hookData.get("nullKey")); - assertNull(hookData.get("nullKey", String.class)); - } -} diff --git a/src/test/java/dev/openfeature/sdk/HookSupportTest.java b/src/test/java/dev/openfeature/sdk/HookSupportTest.java index 67ec03d94..02a8ff90c 100644 --- a/src/test/java/dev/openfeature/sdk/HookSupportTest.java +++ b/src/test/java/dev/openfeature/sdk/HookSupportTest.java @@ -9,7 +9,6 @@ import java.util.Arrays; import java.util.Collections; import java.util.HashMap; -import java.util.List; import java.util.Map; import java.util.Optional; import org.junit.jupiter.api.DisplayName; @@ -24,15 +23,8 @@ void shouldMergeEvaluationContextsOnBeforeHooksCorrectly() { Map attributes = new HashMap<>(); attributes.put("baseKey", new Value("baseValue")); EvaluationContext baseContext = new ImmutableContext(attributes); - FlagValueType valueType = FlagValueType.STRING; - HookContext hookContext = HookContextWithoutData.builder() - .flagKey("flagKey") - .type(valueType) - .defaultValue("defaultValue") - .ctx(baseContext) - .clientMetadata(() -> "client") - .providerMetadata(() -> "provider") - .build(); + HookContext hookContext = new HookContext<>( + "flagKey", FlagValueType.STRING, "defaultValue", baseContext, () -> "client", () -> "provider"); Hook hook1 = mockStringHook(); Hook hook2 = mockStringHook(); when(hook1.before(any(), any())).thenReturn(Optional.of(evaluationContextWithValue("bla", "blubber"))); @@ -40,10 +32,7 @@ void shouldMergeEvaluationContextsOnBeforeHooksCorrectly() { HookSupport hookSupport = new HookSupport(); EvaluationContext result = hookSupport.beforeHooks( - valueType, - hookContext, - hookSupport.getHookDataPairs(Arrays.asList(hook1, hook2), valueType), - Collections.emptyMap()); + FlagValueType.STRING, hookContext, Arrays.asList(hook1, hook2), Collections.emptyMap()); assertThat(result.getValue("bla").asString()).isEqualTo("blubber"); assertThat(result.getValue("foo").asString()).isEqualTo("bar"); @@ -56,32 +45,36 @@ void shouldMergeEvaluationContextsOnBeforeHooksCorrectly() { void shouldAlwaysCallGenericHook(FlagValueType flagValueType) { Hook genericHook = mockGenericHook(); HookSupport hookSupport = new HookSupport(); - var hookDataPairs = hookSupport.getHookDataPairs(Collections.singletonList(genericHook), flagValueType); EvaluationContext baseContext = new ImmutableContext(); IllegalStateException expectedException = new IllegalStateException("All fine, just a test"); - HookContext hookContext = HookContext.builder() - .flagKey("flagKey") - .type(flagValueType) - .defaultValue(createDefaultValue(flagValueType)) - .ctx(baseContext) - .clientMetadata(() -> "client") - .providerMetadata(() -> "provider") - .build(); + HookContext hookContext = new HookContext<>( + "flagKey", + flagValueType, + createDefaultValue(flagValueType), + baseContext, + () -> "client", + () -> "provider"); - hookSupport.beforeHooks(flagValueType, hookContext, hookDataPairs, Collections.emptyMap()); + hookSupport.beforeHooks( + flagValueType, hookContext, Collections.singletonList(genericHook), Collections.emptyMap()); hookSupport.afterHooks( flagValueType, hookContext, FlagEvaluationDetails.builder().build(), - hookDataPairs, + Collections.singletonList(genericHook), Collections.emptyMap()); hookSupport.afterAllHooks( flagValueType, hookContext, FlagEvaluationDetails.builder().build(), - hookDataPairs, + Collections.singletonList(genericHook), + Collections.emptyMap()); + hookSupport.errorHooks( + flagValueType, + hookContext, + expectedException, + Collections.singletonList(genericHook), Collections.emptyMap()); - hookSupport.errorHooks(flagValueType, hookContext, expectedException, hookDataPairs, Collections.emptyMap()); verify(genericHook).before(any(), any()); verify(genericHook).after(any(), any(), any()); @@ -89,101 +82,6 @@ void shouldAlwaysCallGenericHook(FlagValueType flagValueType) { verify(genericHook).error(any(), any(), any()); } - @ParameterizedTest - @EnumSource(value = FlagValueType.class) - @DisplayName("should allow hooks to store and retrieve data across stages") - void shouldPassDataAcrossStages(FlagValueType flagValueType) { - HookSupport hookSupport = new HookSupport(); - HookContext hookContext = getObjectHookContext(flagValueType); - - TestHookWithData testHook = new TestHookWithData("test-key", "value"); - var pairs = hookSupport.getHookDataPairs(List.of(testHook), flagValueType); - - callAllHooks(flagValueType, hookSupport, hookContext, testHook); - - assertHookData(testHook, "value"); - } - - @ParameterizedTest - @EnumSource(value = FlagValueType.class) - @DisplayName("should isolate data between different hook instances") - void shouldIsolateDataBetweenHooks(FlagValueType flagValueType) { - HookSupport hookSupport = new HookSupport(); - HookContext hookContext = getObjectHookContext(flagValueType); - - TestHookWithData testHook1 = new TestHookWithData("test-key", "value-1"); - TestHookWithData testHook2 = new TestHookWithData("test-key", "value-2"); - var pairs = hookSupport.getHookDataPairs(List.of(testHook1, testHook2), flagValueType); - - callAllHooks(flagValueType, hookSupport, hookContext, pairs); - - assertHookData(testHook1, "value-1"); - assertHookData(testHook2, "value-2"); - } - - @ParameterizedTest - @EnumSource(value = FlagValueType.class) - @DisplayName("should isolate data between the same hook instances") - void shouldIsolateDataBetweenSameHooks(FlagValueType flagValueType) { - - HookSupport hookSupport = new HookSupport(); - HookContext hookContext = getObjectHookContext(flagValueType); - - TestHookWithData testHook = new TestHookWithData("test-key", "value-1"); - - // run hooks first time - callAllHooks(flagValueType, hookSupport, hookContext, testHook); - assertHookData(testHook, "value-1"); - - // re-run with different value, will throw if HookData contains already data - testHook.value = "value-2"; - callAllHooks(flagValueType, hookSupport, hookContext, testHook); - - assertHookData(testHook, "value-2"); - } - - private HookContext getObjectHookContext(FlagValueType flagValueType) { - EvaluationContext baseContext = new ImmutableContext(); - HookContext hookContext = HookContext.builder() - .flagKey("flagKey") - .type(flagValueType) - .defaultValue(createDefaultValue(flagValueType)) - .ctx(baseContext) - .clientMetadata(() -> "client") - .providerMetadata(() -> "provider") - .build(); - return hookContext; - } - - private static void assertHookData(TestHookWithData testHook1, String expected) { - assertThat(testHook1.onBeforeValue).isEqualTo(expected); - assertThat(testHook1.onFinallyAfterValue).isEqualTo(expected); - assertThat(testHook1.onAfterValue).isEqualTo(expected); - assertThat(testHook1.onErrorValue).isEqualTo(expected); - } - - private static void callAllHooks( - FlagValueType flagValueType, - HookSupport hookSupport, - HookContext hookContext, - TestHookWithData testHook) { - var pairs = hookSupport.getHookDataPairs(List.of(testHook), flagValueType); - callAllHooks(flagValueType, hookSupport, hookContext, pairs); - } - - private static void callAllHooks( - FlagValueType flagValueType, - HookSupport hookSupport, - HookContext hookContext, - List> pairs) { - hookSupport.beforeHooks(flagValueType, hookContext, pairs, Collections.emptyMap()); - hookSupport.afterHooks( - flagValueType, hookContext, new FlagEvaluationDetails<>(), pairs, Collections.emptyMap()); - hookSupport.errorHooks(flagValueType, hookContext, new Exception(), pairs, Collections.emptyMap()); - hookSupport.afterAllHooks( - flagValueType, hookContext, new FlagEvaluationDetails<>(), pairs, Collections.emptyMap()); - } - private Object createDefaultValue(FlagValueType flagValueType) { switch (flagValueType) { case INTEGER: @@ -207,46 +105,4 @@ private EvaluationContext evaluationContextWithValue(String key, String value) { EvaluationContext baseContext = new ImmutableContext(attributes); return baseContext; } - - private class TestHookWithData implements Hook { - - private final String key; - Object value; - - Object onBeforeValue; - Object onAfterValue; - Object onErrorValue; - Object onFinallyAfterValue; - - TestHookWithData(String key, Object value) { - this.key = key; - this.value = value; - } - - @Override - public Optional before(HookContext ctx, Map hints) { - var storedValue = ctx.getHookData().get(key); - if (storedValue != null) { - throw new Error("Hook data isolation violated! Data is already set."); - } - ctx.getHookData().set(key, value); - onBeforeValue = ctx.getHookData().get(key); - return Optional.empty(); - } - - @Override - public void after(HookContext ctx, FlagEvaluationDetails details, Map hints) { - onAfterValue = ctx.getHookData().get(key); - } - - @Override - public void error(HookContext ctx, Exception error, Map hints) { - onErrorValue = ctx.getHookData().get(key); - } - - @Override - public void finallyAfter(HookContext ctx, FlagEvaluationDetails details, Map hints) { - onFinallyAfterValue = ctx.getHookData().get(key); - } - } } diff --git a/src/test/java/dev/openfeature/sdk/benchmark/AllocationBenchmark.java b/src/test/java/dev/openfeature/sdk/benchmark/AllocationBenchmark.java index 9fe043722..5bc89d03d 100644 --- a/src/test/java/dev/openfeature/sdk/benchmark/AllocationBenchmark.java +++ b/src/test/java/dev/openfeature/sdk/benchmark/AllocationBenchmark.java @@ -54,30 +54,6 @@ public Optional before(HookContext ctx, Map() { - @Override - public Optional before(HookContext ctx, Map hints) { - return Optional.ofNullable(new ImmutableContext()); - } - }); - client.addHooks(new Hook() { - @Override - public Optional before(HookContext ctx, Map hints) { - return Optional.ofNullable(new ImmutableContext()); - } - }); - client.addHooks(new Hook() { - @Override - public Optional before(HookContext ctx, Map hints) { - return Optional.ofNullable(new ImmutableContext()); - } - }); - client.addHooks(new Hook() { - @Override - public Optional before(HookContext ctx, Map hints) { - return Optional.ofNullable(new ImmutableContext()); - } - }); Map invocationAttrs = new HashMap<>(); invocationAttrs.put("invoke", new Value(3)); From fa23e960ff9dc52b5c44b56e521485ca03e0e650 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 16:36:59 +0000 Subject: [PATCH 273/391] chore(deps): update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.9.6.0 (#1612) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 07c0e23a7..641d2e894 100644 --- a/pom.xml +++ b/pom.xml @@ -457,7 +457,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.9.5.0 + 4.9.6.0 spotbugs-exclusions.xml From fbf2a752647817d3e25d4f8b67893ba5e8f89b7a Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Wed, 17 Sep 2025 12:40:39 -0400 Subject: [PATCH 274/391] chore: fix checkout (#1614) * chore: checkout Signed-off-by: Todd Baert * Update pullrequest.yml Signed-off-by: Todd Baert * Update release.yml Signed-off-by: Todd Baert --------- Signed-off-by: Todd Baert --- .github/workflows/merge.yml | 3 +++ .github/workflows/pullrequest.yml | 3 +++ .github/workflows/release.yml | 3 +++ 3 files changed, 9 insertions(+) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index a7e2b1bc3..bc01938d8 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -22,6 +22,9 @@ jobs: steps: - uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 + with: + fetch-depth: 0 + submodules: recursive - name: Set up JDK 17 uses: actions/setup-java@ead9eaa3cfe0b0fc2fa749519ae09c3d4f4080b0 with: diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 819d0eac2..a1a112d7b 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -20,6 +20,9 @@ jobs: steps: - name: Check out the code uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 + with: + fetch-depth: 0 + submodules: recursive - name: Set up JDK ${{ matrix.build.java }} uses: actions/setup-java@ead9eaa3cfe0b0fc2fa749519ae09c3d4f4080b0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c6104f125..c07ff847e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,6 +38,9 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 + with: + fetch-depth: 0 + submodules: recursive - name: Set up JDK 17 uses: actions/setup-java@ead9eaa3cfe0b0fc2fa749519ae09c3d4f4080b0 From 69c5a1244283d22af0119f534270726a8c520367 Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Wed, 17 Sep 2025 12:58:02 -0400 Subject: [PATCH 275/391] chore: relax coverage Signed-off-by: Todd Baert --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 641d2e894..cfc16648b 100644 --- a/pom.xml +++ b/pom.xml @@ -444,7 +444,7 @@ LINE COVEREDRATIO - 0.80 + 0.70 From 9ff13e2f523a948ef954202e47af999e145ff3e0 Mon Sep 17 00:00:00 2001 From: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Date: Wed, 17 Sep 2025 13:21:53 -0400 Subject: [PATCH 276/391] chore(main): release 1.18.1 (#1602) * chore(main): release 1.19.0 Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> * Update .release-please-manifest.json Signed-off-by: Todd Baert * Update CHANGELOG.md Signed-off-by: Todd Baert * Update README.md Signed-off-by: Todd Baert * Update README.md Signed-off-by: Todd Baert * Update pom.xml Signed-off-by: Todd Baert * Update version.txt Signed-off-by: Todd Baert --------- Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: Todd Baert Co-authored-by: Todd Baert --- .release-please-manifest.json | 2 +- CHANGELOG.md | 20 ++++++++++++++++++++ README.md | 8 ++++---- pom.xml | 2 +- version.txt | 2 +- 5 files changed, 27 insertions(+), 7 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b0c190560..0ddd8a814 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{".":"1.18.0"} +{".":"1.18.1"} diff --git a/CHANGELOG.md b/CHANGELOG.md index dafacd904..a241abad6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## [1.18.1](https://github.com/open-feature/java-sdk/compare/v1.18.0...v1.18.1) (2025-09-17) + + +### ๐Ÿ› Bug Fixes + +* **deps:** update dependency com.fasterxml.jackson:jackson-bom to v2.20.0 ([#1604](https://github.com/open-feature/java-sdk/issues/1604)) ([b693390](https://github.com/open-feature/java-sdk/commit/b69339067a75a524911dded9798a06e58d628bce)) +* **deps:** update dependency com.github.spotbugs:spotbugs to v4.9.6 ([#1609](https://github.com/open-feature/java-sdk/issues/1609)) ([45ff89f](https://github.com/open-feature/java-sdk/commit/45ff89f530e8c73636618676b9db46c61235df57)) +* revert hook data to resolve bytecode incompatibility ([#1613](https://github.com/open-feature/java-sdk/issues/1613)) ([9845601](https://github.com/open-feature/java-sdk/commit/984560196d4a34fb21c8946d1dc675cf6565e90f)) + + +### ๐Ÿงน Chore + +* **deps:** update actions/setup-java digest to ead9eaa ([#1608](https://github.com/open-feature/java-sdk/issues/1608)) ([a40667e](https://github.com/open-feature/java-sdk/commit/a40667e9cb635f9ba31f6975ba72bc5932fca094)) +* **deps:** update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.9.6.0 ([#1612](https://github.com/open-feature/java-sdk/issues/1612)) ([fa23e96](https://github.com/open-feature/java-sdk/commit/fa23e960ff9dc52b5c44b56e521485ca03e0e650)) +* **deps:** update dependency com.vmlens:vmlens-maven-plugin to v1.2.14 ([#1606](https://github.com/open-feature/java-sdk/issues/1606)) ([a92a367](https://github.com/open-feature/java-sdk/commit/a92a367fef71cc9ec26f6b1b6609fb8e6b2543bc)) +* **deps:** update dependency dev.cel:cel to v0.11.0 ([#1603](https://github.com/open-feature/java-sdk/issues/1603)) ([e792221](https://github.com/open-feature/java-sdk/commit/e7922212d8cd964a8a24dacc518ff31c77fcfae6)) +* **deps:** update github/codeql-action digest to 573acd9 ([#1600](https://github.com/open-feature/java-sdk/issues/1600)) ([6fb139f](https://github.com/open-feature/java-sdk/commit/6fb139f8425fb76368b1e1baa745aa182f8c13f7)) +* fix checkout ([#1614](https://github.com/open-feature/java-sdk/issues/1614)) ([fbf2a75](https://github.com/open-feature/java-sdk/commit/fbf2a752647817d3e25d4f8b67893ba5e8f89b7a)) +* relax coverage ([69c5a12](https://github.com/open-feature/java-sdk/commit/69c5a1244283d22af0119f534270726a8c520367)) + ## [1.18.0](https://github.com/open-feature/java-sdk/compare/v1.17.0...v1.18.0) (2025-09-16) diff --git a/README.md b/README.md index 39f558f8f..58f586478 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ - - Release + + Release @@ -59,7 +59,7 @@ Note that this library is intended to be used in server-side contexts and has no dev.openfeature sdk - 1.18.0 + 1.18.1 ``` @@ -84,7 +84,7 @@ If you would like snapshot builds, this is the relevant repository information: ```groovy dependencies { - implementation 'dev.openfeature:sdk:1.18.0' + implementation 'dev.openfeature:sdk:1.18.1' } ``` diff --git a/pom.xml b/pom.xml index cfc16648b..ea6e22a11 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ dev.openfeature sdk - 1.18.0 + 1.18.1 [17,) diff --git a/version.txt b/version.txt index 84cc52946..ec6d649be 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.18.0 +1.18.1 From 6dcd21f559477c1b473cd30e459ca7241c4f7210 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 18 Sep 2025 08:29:55 +0200 Subject: [PATCH 277/391] fix(deps): update dependency org.projectlombok:lombok to v1.18.42 (#1616) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ea6e22a11..d257c7f09 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,7 @@ org.projectlombok lombok - 1.18.40 + 1.18.42 provided From 17d0e487f31864facc0e69ee76352cab82b6b6b7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 19 Sep 2025 02:34:18 +0000 Subject: [PATCH 278/391] chore(deps): update github/codeql-action digest to 12dda79 (#1618) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index a1a112d7b..46e415359 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@573acd9552f33577783abde4acb66a1058e762e5 + uses: github/codeql-action/init@12dda79905a80126f2c9e61d8c032085742e7893 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@573acd9552f33577783abde4acb66a1058e762e5 + uses: github/codeql-action/analyze@12dda79905a80126f2c9e61d8c032085742e7893 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 2ab9903d2..1fe5726c3 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@573acd9552f33577783abde4acb66a1058e762e5 + uses: github/codeql-action/init@12dda79905a80126f2c9e61d8c032085742e7893 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@573acd9552f33577783abde4acb66a1058e762e5 + uses: github/codeql-action/autobuild@12dda79905a80126f2c9e61d8c032085742e7893 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@573acd9552f33577783abde4acb66a1058e762e5 + uses: github/codeql-action/analyze@12dda79905a80126f2c9e61d8c032085742e7893 From d4beca71bb60359b88e739153ff96ffc11aa74ef Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 19 Sep 2025 05:09:52 +0000 Subject: [PATCH 279/391] chore(deps): update dependency org.assertj:assertj-core to v3.27.5 (#1619) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d257c7f09..a91de564a 100644 --- a/pom.xml +++ b/pom.xml @@ -88,7 +88,7 @@ org.assertj assertj-core - 3.27.4 + 3.27.5 test From 3ef41f5225b93ca9d4b975c265d4ec41dbd91717 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 19 Sep 2025 07:28:40 +0200 Subject: [PATCH 280/391] chore(deps): update dependency com.google.guava:guava to v33.5.0-jre (#1615) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a91de564a..7e23294e8 100644 --- a/pom.xml +++ b/pom.xml @@ -150,7 +150,7 @@ com.google.guava guava - 33.4.8-jre + 33.5.0-jre test From 6cf64d6b0c0ae351a707d70257380f2bce81a82e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 20 Sep 2025 01:51:15 +0000 Subject: [PATCH 281/391] chore(deps): update github/codeql-action digest to 0337c4c (#1621) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 46e415359..5893ad69b 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@12dda79905a80126f2c9e61d8c032085742e7893 + uses: github/codeql-action/init@0337c4c06e7e00d0d6e64396c13b9dc18dd6d8c5 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@12dda79905a80126f2c9e61d8c032085742e7893 + uses: github/codeql-action/analyze@0337c4c06e7e00d0d6e64396c13b9dc18dd6d8c5 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 1fe5726c3..a821027a2 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@12dda79905a80126f2c9e61d8c032085742e7893 + uses: github/codeql-action/init@0337c4c06e7e00d0d6e64396c13b9dc18dd6d8c5 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@12dda79905a80126f2c9e61d8c032085742e7893 + uses: github/codeql-action/autobuild@0337c4c06e7e00d0d6e64396c13b9dc18dd6d8c5 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@12dda79905a80126f2c9e61d8c032085742e7893 + uses: github/codeql-action/analyze@0337c4c06e7e00d0d6e64396c13b9dc18dd6d8c5 From 857fb9d78c509ee9c1087c355eb0fdb4ffdb668e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 20 Sep 2025 12:37:26 +0000 Subject: [PATCH 282/391] chore(deps): update dependency org.mockito:mockito-core to v5.20.0 (#1622) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7e23294e8..faeb6c367 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ UTF-8 11 ${maven.compiler.source} - 5.19.0 + 5.20.0 **/e2e/*.java ${project.groupId}.${project.artifactId} From 99a997dcc594e06662cc3509e9c8698611893567 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 25 Sep 2025 06:01:11 +0000 Subject: [PATCH 283/391] chore(deps): update github/codeql-action digest to e4b85ab (#1626) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 5893ad69b..2cf73b0e6 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@0337c4c06e7e00d0d6e64396c13b9dc18dd6d8c5 + uses: github/codeql-action/init@e4b85ab654a244f420e4d9a9ca6305cf2d3fdc90 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@0337c4c06e7e00d0d6e64396c13b9dc18dd6d8c5 + uses: github/codeql-action/analyze@e4b85ab654a244f420e4d9a9ca6305cf2d3fdc90 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index a821027a2..7c19f6510 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@0337c4c06e7e00d0d6e64396c13b9dc18dd6d8c5 + uses: github/codeql-action/init@e4b85ab654a244f420e4d9a9ca6305cf2d3fdc90 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@0337c4c06e7e00d0d6e64396c13b9dc18dd6d8c5 + uses: github/codeql-action/autobuild@e4b85ab654a244f420e4d9a9ca6305cf2d3fdc90 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@0337c4c06e7e00d0d6e64396c13b9dc18dd6d8c5 + uses: github/codeql-action/analyze@e4b85ab654a244f420e4d9a9ca6305cf2d3fdc90 From d0f9647fd09a8602ee47aae7778dbf7534c3fbd5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 25 Sep 2025 08:14:46 +0200 Subject: [PATCH 284/391] fix(deps): update dependency io.cucumber:cucumber-bom to v7.29.0 (#1624) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index faeb6c367..2b4ed32ed 100644 --- a/pom.xml +++ b/pom.xml @@ -234,7 +234,7 @@ io.cucumber cucumber-bom - 7.28.2 + 7.29.0 pom import From c1944d2b1c1a85efb3b4f76a5836dfc0e1c9124b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 25 Sep 2025 06:21:37 +0000 Subject: [PATCH 285/391] chore(deps): update actions/cache digest to 0057852 (#1631) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index bc01938d8..d39980b71 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -36,7 +36,7 @@ jobs: server-password: ${{ secrets.CENTRAL_PASSWORD }} - name: Cache local Maven repository - uses: actions/cache@638ed79f9dc94c1de1baef91bcab5edaa19451f4 + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 with: path: ~/.m2/repository key: ${{ runner.os }}-17-maven-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 2cf73b0e6..66c01ab0d 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -37,7 +37,7 @@ jobs: languages: java - name: Cache local Maven repository - uses: actions/cache@638ed79f9dc94c1de1baef91bcab5edaa19451f4 + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 with: path: ~/.m2/repository key: ${{ runner.os }}${{ matrix.build.java }}-maven-${{ hashFiles('**/pom.xml') }} From eeda09980cc85a538f0c41fef10bf285b0829761 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 25 Sep 2025 06:28:21 +0000 Subject: [PATCH 286/391] chore(deps): update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.12.0 (#1623) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2b4ed32ed..f34d89d0a 100644 --- a/pom.xml +++ b/pom.xml @@ -580,7 +580,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.11.3 + 3.12.0 true all,-missing From 14f550fd4ff9223437cc36d6cc1b248125a68e3c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 25 Sep 2025 06:35:01 +0000 Subject: [PATCH 287/391] chore(deps): update dependency org.assertj:assertj-core to v3.27.6 (#1627) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f34d89d0a..baa6cc863 100644 --- a/pom.xml +++ b/pom.xml @@ -88,7 +88,7 @@ org.assertj assertj-core - 3.27.5 + 3.27.6 test From 0596adac7dde1d9b5bf0da3763799d965870e828 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 25 Sep 2025 10:02:08 +0200 Subject: [PATCH 288/391] chore(deps): update dependency com.diffplug.spotless:spotless-maven-plugin to v3 (#1632) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index baa6cc863..a66bdbf7d 100644 --- a/pom.xml +++ b/pom.xml @@ -517,7 +517,7 @@ com.diffplug.spotless spotless-maven-plugin - 2.46.1 + 3.0.0 From 014e82af10ae478596c65c80d2cf92fc843339ed Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 25 Sep 2025 08:08:26 +0000 Subject: [PATCH 289/391] chore(deps): update dependency org.sonatype.central:central-publishing-maven-plugin to v0.9.0 (#1630) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a66bdbf7d..f4e17f484 100644 --- a/pom.xml +++ b/pom.xml @@ -611,7 +611,7 @@ org.sonatype.central central-publishing-maven-plugin - 0.8.0 + 0.9.0 true central From 55c344a8323fa94f4b890d5a119976e879bbb43c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 25 Sep 2025 08:14:37 +0000 Subject: [PATCH 290/391] chore(deps): update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.14.1 (#1625) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f4e17f484..72ac3debc 100644 --- a/pom.xml +++ b/pom.xml @@ -291,7 +291,7 @@ maven-compiler-plugin - 3.14.0 + 3.14.1 @@ -743,7 +743,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 default-testCompile From fb3144a0b5e2f02e8af33d746fb6c426724adede Mon Sep 17 00:00:00 2001 From: ThomasKrieger Date: Thu, 25 Sep 2025 10:45:54 +0200 Subject: [PATCH 291/391] fix: improve vmlens handling (#1628) * fix: for #1611 Only execute concurrent tests with VMLens VMLens test run now takes 4s and there is no risk of hanging tests. The hanging tests was during executing ArchUnitTests with VMLens. Renamed VmLensTest to VmLensCT and added a filter in the VMlens plugin. increased timeout for gherkin tests to 30s from 10s Signed-off-by: ThomasKrieger * added await in ProviderSteps and removed Awaitility.await() since it is not needed anymore since we wait during the setting of the states Signed-off-by: ThomasKrieger --------- Signed-off-by: ThomasKrieger --- pom.xml | 9 ++++++--- .../openfeature/sdk/e2e/steps/ProviderSteps.java | 13 ++++--------- .../sdk/vmlens/{VmLensTest.java => VmLensCT.java} | 2 +- 3 files changed, 11 insertions(+), 13 deletions(-) rename src/test/java/dev/openfeature/sdk/vmlens/{VmLensTest.java => VmLensCT.java} (99%) diff --git a/pom.xml b/pom.xml index 72ac3debc..c53541731 100644 --- a/pom.xml +++ b/pom.xml @@ -196,7 +196,7 @@ com.vmlens api - 1.2.13 + 1.2.14 test @@ -348,7 +348,7 @@ - + maven-dependency-plugin 3.8.1 diff --git a/src/test/java/dev/openfeature/sdk/e2e/steps/ProviderSteps.java b/src/test/java/dev/openfeature/sdk/e2e/steps/ProviderSteps.java index d9dde3c2b..f22a0811a 100644 --- a/src/test/java/dev/openfeature/sdk/e2e/steps/ProviderSteps.java +++ b/src/test/java/dev/openfeature/sdk/e2e/steps/ProviderSteps.java @@ -26,7 +26,6 @@ import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; import java.util.Map; -import org.awaitility.Awaitility; public class ProviderSteps { private final State state; @@ -113,19 +112,15 @@ private void setupMockProvider(ErrorCode errorCode, String errorMessage, Provide switch (providerState) { case FATAL: case ERROR: - mockProvider.emitProviderReady(details); - mockProvider.emitProviderError(details); + mockProvider.emitProviderReady(details).await(); + mockProvider.emitProviderError(details).await(); break; case STALE: - mockProvider.emitProviderReady(details); - mockProvider.emitProviderStale(details); + mockProvider.emitProviderReady(details).await(); + mockProvider.emitProviderStale(details).await(); break; default: } - Awaitility.await().until(() -> { - ProviderState providerState1 = client.getProviderState(); - return providerState1 == providerState; - }); } private void configureMockEvaluations(FeatureProvider mockProvider, ErrorCode errorCode, String errorMessage) { diff --git a/src/test/java/dev/openfeature/sdk/vmlens/VmLensTest.java b/src/test/java/dev/openfeature/sdk/vmlens/VmLensCT.java similarity index 99% rename from src/test/java/dev/openfeature/sdk/vmlens/VmLensTest.java rename to src/test/java/dev/openfeature/sdk/vmlens/VmLensCT.java index 136c35965..c09e254e6 100644 --- a/src/test/java/dev/openfeature/sdk/vmlens/VmLensTest.java +++ b/src/test/java/dev/openfeature/sdk/vmlens/VmLensCT.java @@ -18,7 +18,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -class VmLensTest { +class VmLensCT { final OpenFeatureAPI api = OpenFeatureAPITestUtil.createAPI(); @BeforeEach From 9bffa0a45aaea6fb5ecf7b489c02cd502fc2d93c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 25 Sep 2025 18:36:14 +0000 Subject: [PATCH 292/391] chore(deps): update dependency com.vmlens:api to v1.2.15 (#1636) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c53541731..334e0a36c 100644 --- a/pom.xml +++ b/pom.xml @@ -196,7 +196,7 @@ com.vmlens api - 1.2.14 + 1.2.15 test From 139c9b21b73717e52fde4970561009cbd27addaa Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 25 Sep 2025 22:46:38 +0000 Subject: [PATCH 293/391] chore(deps): update dependency com.vmlens:vmlens-maven-plugin to v1.2.15 (#1637) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 334e0a36c..5d9456a33 100644 --- a/pom.xml +++ b/pom.xml @@ -351,7 +351,7 @@ com.vmlens vmlens-maven-plugin - 1.2.14 + 1.2.15 test From f9796e8e1623bdac0ec52b7102e11759d3e449d8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 02:48:47 +0000 Subject: [PATCH 294/391] chore(deps): update github/codeql-action digest to 94a9b7a (#1635) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 66c01ab0d..a8f9d79d6 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@e4b85ab654a244f420e4d9a9ca6305cf2d3fdc90 + uses: github/codeql-action/init@94a9b7a1101a1320dcadcbda5e7fd9a1e6abaaca with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@e4b85ab654a244f420e4d9a9ca6305cf2d3fdc90 + uses: github/codeql-action/analyze@94a9b7a1101a1320dcadcbda5e7fd9a1e6abaaca diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 7c19f6510..6b1184be9 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@e4b85ab654a244f420e4d9a9ca6305cf2d3fdc90 + uses: github/codeql-action/init@94a9b7a1101a1320dcadcbda5e7fd9a1e6abaaca with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@e4b85ab654a244f420e4d9a9ca6305cf2d3fdc90 + uses: github/codeql-action/autobuild@94a9b7a1101a1320dcadcbda5e7fd9a1e6abaaca - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@e4b85ab654a244f420e4d9a9ca6305cf2d3fdc90 + uses: github/codeql-action/analyze@94a9b7a1101a1320dcadcbda5e7fd9a1e6abaaca From 58b6575410b75760d5402f3f927dc8a2e62e9654 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 22:32:45 +0000 Subject: [PATCH 295/391] chore(deps): update github/codeql-action digest to 6a87ebe (#1639) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index a8f9d79d6..e76566f4c 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@94a9b7a1101a1320dcadcbda5e7fd9a1e6abaaca + uses: github/codeql-action/init@6a87ebe42bbd3423c818b3d15ce9803ba45bd522 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@94a9b7a1101a1320dcadcbda5e7fd9a1e6abaaca + uses: github/codeql-action/analyze@6a87ebe42bbd3423c818b3d15ce9803ba45bd522 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 6b1184be9..ac65ff01f 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@94a9b7a1101a1320dcadcbda5e7fd9a1e6abaaca + uses: github/codeql-action/init@6a87ebe42bbd3423c818b3d15ce9803ba45bd522 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@94a9b7a1101a1320dcadcbda5e7fd9a1e6abaaca + uses: github/codeql-action/autobuild@6a87ebe42bbd3423c818b3d15ce9803ba45bd522 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@94a9b7a1101a1320dcadcbda5e7fd9a1e6abaaca + uses: github/codeql-action/analyze@6a87ebe42bbd3423c818b3d15ce9803ba45bd522 From b686932fa86138e02bddaab0be79d61f39946a02 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 28 Sep 2025 21:50:11 +0000 Subject: [PATCH 296/391] chore(deps): update dependency com.puppycrawl.tools:checkstyle to v11.1.0 (#1640) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5d9456a33..ff136ee30 100644 --- a/pom.xml +++ b/pom.xml @@ -504,7 +504,7 @@ com.puppycrawl.tools checkstyle - 11.0.1 + 11.1.0 From 69a87a81e8f4796c5d4a895b9379c0103765ba3d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 29 Sep 2025 01:28:40 +0000 Subject: [PATCH 297/391] chore(deps): update dependency maven-wrapper to v3.3.4 (#1638) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- mvnw | 2 +- mvnw.cmd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mvnw b/mvnw index e9cf8d330..bd8896bf2 100644 --- a/mvnw +++ b/mvnw @@ -19,7 +19,7 @@ # ---------------------------------------------------------------------------- # ---------------------------------------------------------------------------- -# Apache Maven Wrapper startup batch script, version 3.3.3 +# Apache Maven Wrapper startup batch script, version 3.3.4 # # Optional ENV vars # ----------------- diff --git a/mvnw.cmd b/mvnw.cmd index 3fd2be860..5761d9489 100644 --- a/mvnw.cmd +++ b/mvnw.cmd @@ -19,7 +19,7 @@ @REM ---------------------------------------------------------------------------- @REM ---------------------------------------------------------------------------- -@REM Apache Maven Wrapper startup batch script, version 3.3.3 +@REM Apache Maven Wrapper startup batch script, version 3.3.4 @REM @REM Optional ENV vars @REM MVNW_REPOURL - repo url base for downloading maven distribution From f6cb98556be3dacdb4e8d7770014dc2e7df65b6b Mon Sep 17 00:00:00 2001 From: ThomasKrieger Date: Mon, 29 Sep 2025 15:41:27 +0200 Subject: [PATCH 298/391] fix: deployment failure because no tests were run by VMLens (#1634) new VMLens version to fix the deployment failure fix: for #1611 Signed-off-by: ThomasKrieger From 4c18cc4ee502030935796e98272fd45b6c394c11 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 29 Sep 2025 16:55:21 +0200 Subject: [PATCH 299/391] chore(deps): update dependency com.vmlens:api to v1.2.16 (#1642) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ff136ee30..61a22d0dc 100644 --- a/pom.xml +++ b/pom.xml @@ -196,7 +196,7 @@ com.vmlens api - 1.2.15 + 1.2.16 test From 2155cc94371a0147fafc3246e7d4e4b9d9b7a5a3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 29 Sep 2025 15:02:20 +0000 Subject: [PATCH 300/391] chore(deps): update github/codeql-action digest to 36adfa7 (#1641) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index e76566f4c..f014235cb 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@6a87ebe42bbd3423c818b3d15ce9803ba45bd522 + uses: github/codeql-action/init@36adfa7b0f5334b69b6ccdc55e94eefc75cd3279 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@6a87ebe42bbd3423c818b3d15ce9803ba45bd522 + uses: github/codeql-action/analyze@36adfa7b0f5334b69b6ccdc55e94eefc75cd3279 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index ac65ff01f..fbb7fbde1 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@6a87ebe42bbd3423c818b3d15ce9803ba45bd522 + uses: github/codeql-action/init@36adfa7b0f5334b69b6ccdc55e94eefc75cd3279 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@6a87ebe42bbd3423c818b3d15ce9803ba45bd522 + uses: github/codeql-action/autobuild@36adfa7b0f5334b69b6ccdc55e94eefc75cd3279 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@6a87ebe42bbd3423c818b3d15ce9803ba45bd522 + uses: github/codeql-action/analyze@36adfa7b0f5334b69b6ccdc55e94eefc75cd3279 From 6b922a2a6107cff7f951dcaf9e1c09609aeade83 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 29 Sep 2025 17:35:26 +0000 Subject: [PATCH 301/391] chore(deps): update github/codeql-action digest to 80cb6b5 (#1644) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index f014235cb..899f3815b 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@36adfa7b0f5334b69b6ccdc55e94eefc75cd3279 + uses: github/codeql-action/init@80cb6b56b93de3e779c7d476d9100d06fb87c877 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@36adfa7b0f5334b69b6ccdc55e94eefc75cd3279 + uses: github/codeql-action/analyze@80cb6b56b93de3e779c7d476d9100d06fb87c877 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index fbb7fbde1..fb4c48f81 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@36adfa7b0f5334b69b6ccdc55e94eefc75cd3279 + uses: github/codeql-action/init@80cb6b56b93de3e779c7d476d9100d06fb87c877 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@36adfa7b0f5334b69b6ccdc55e94eefc75cd3279 + uses: github/codeql-action/autobuild@80cb6b56b93de3e779c7d476d9100d06fb87c877 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@36adfa7b0f5334b69b6ccdc55e94eefc75cd3279 + uses: github/codeql-action/analyze@80cb6b56b93de3e779c7d476d9100d06fb87c877 From 01ce26afc9b8a4bc098dc3406e65c483fd940d15 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 29 Sep 2025 20:38:37 +0000 Subject: [PATCH 302/391] chore(deps): update dependency com.vmlens:vmlens-maven-plugin to v1.2.16 (#1643) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 61a22d0dc..5edf029c7 100644 --- a/pom.xml +++ b/pom.xml @@ -351,7 +351,7 @@ com.vmlens vmlens-maven-plugin - 1.2.15 + 1.2.16 test From 2da33d60bc51ff9adadc3113d53106162e42f4b7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 30 Sep 2025 14:17:09 +0200 Subject: [PATCH 303/391] fix(deps): update dependency org.junit:junit-bom to v5.14.0 (#1646) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5edf029c7..8cf5c7592 100644 --- a/pom.xml +++ b/pom.xml @@ -242,7 +242,7 @@ org.junit junit-bom - 5.13.4 + 5.14.0 pom import From 261ea5dfa6b73d6e538388315719b0f06f417927 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 30 Sep 2025 17:28:34 +0000 Subject: [PATCH 304/391] chore(deps): update dependency org.codehaus.mojo:exec-maven-plugin to v3.6.0 (#1645) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8cf5c7592..244373ae6 100644 --- a/pom.xml +++ b/pom.xml @@ -668,7 +668,7 @@ org.codehaus.mojo exec-maven-plugin - 3.5.1 + 3.6.0 update-test-harness-submodule From 8893bf3817053e416d0d8656890441095357411b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 08:31:08 +0200 Subject: [PATCH 305/391] fix(deps): update dependency org.junit:junit-bom to v6 (#1647) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 244373ae6..4307474bc 100644 --- a/pom.xml +++ b/pom.xml @@ -242,7 +242,7 @@ org.junit junit-bom - 5.14.0 + 6.0.0 pom import From badac4f6aaf8fb1a71f4a50f906b4c74603f10ae Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 08:56:02 +0200 Subject: [PATCH 306/391] chore(deps): update amannn/action-semantic-pull-request digest to e49f57c (#1648) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/lint-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml index 7629cb0c7..707faef76 100644 --- a/.github/workflows/lint-pr.yml +++ b/.github/workflows/lint-pr.yml @@ -18,6 +18,6 @@ jobs: name: Validate PR title runs-on: ubuntu-latest steps: - - uses: amannn/action-semantic-pull-request@e7d011b07ef37e089bea6539210f6a0d360d8af9 + - uses: amannn/action-semantic-pull-request@e49f57ce06c1747542fce2243c7a98682384bc0e env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 07bda4a99127e2c35d1e5323516c59f5beed20f8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 2 Oct 2025 02:09:07 +0000 Subject: [PATCH 307/391] fix(deps): update dependency io.cucumber:cucumber-bom to v7.30.0 (#1649) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4307474bc..153ac1d09 100644 --- a/pom.xml +++ b/pom.xml @@ -234,7 +234,7 @@ io.cucumber cucumber-bom - 7.29.0 + 7.30.0 pom import From 1de446d38ee2abdc3149f8eff374c617c26462fb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 2 Oct 2025 20:39:52 +0000 Subject: [PATCH 308/391] chore(deps): update github/codeql-action digest to 21a7ba3 (#1650) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 899f3815b..d6557e11f 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@80cb6b56b93de3e779c7d476d9100d06fb87c877 + uses: github/codeql-action/init@21a7ba37dd3a3acab11343f27c466aae7dfef4c7 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@80cb6b56b93de3e779c7d476d9100d06fb87c877 + uses: github/codeql-action/analyze@21a7ba37dd3a3acab11343f27c466aae7dfef4c7 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index fb4c48f81..8038c2cf9 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@80cb6b56b93de3e779c7d476d9100d06fb87c877 + uses: github/codeql-action/init@21a7ba37dd3a3acab11343f27c466aae7dfef4c7 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@80cb6b56b93de3e779c7d476d9100d06fb87c877 + uses: github/codeql-action/autobuild@21a7ba37dd3a3acab11343f27c466aae7dfef4c7 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@80cb6b56b93de3e779c7d476d9100d06fb87c877 + uses: github/codeql-action/analyze@21a7ba37dd3a3acab11343f27c466aae7dfef4c7 From bb4218456e87391ae4ad96999e6cb49f78eab0aa Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 2 Oct 2025 14:22:10 -0700 Subject: [PATCH 309/391] chore(deps): update dependency org.apache.maven.plugins:maven-dependency-plugin to v3.9.0 (#1651) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 153ac1d09..b1eeb91cb 100644 --- a/pom.xml +++ b/pom.xml @@ -369,7 +369,7 @@ maven-dependency-plugin - 3.8.1 + 3.9.0 verify From fe44e519c9de5dbc00b25aeaa6f1bf31809688f0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 3 Oct 2025 16:41:32 +0000 Subject: [PATCH 310/391] chore(deps): update github/codeql-action digest to 065c6cf (#1652) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index d6557e11f..ef6d4b2ca 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@21a7ba37dd3a3acab11343f27c466aae7dfef4c7 + uses: github/codeql-action/init@065c6cfb7809de8db2167a953b5b622491cda914 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@21a7ba37dd3a3acab11343f27c466aae7dfef4c7 + uses: github/codeql-action/analyze@065c6cfb7809de8db2167a953b5b622491cda914 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 8038c2cf9..2480aef2b 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@21a7ba37dd3a3acab11343f27c466aae7dfef4c7 + uses: github/codeql-action/init@065c6cfb7809de8db2167a953b5b622491cda914 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@21a7ba37dd3a3acab11343f27c466aae7dfef4c7 + uses: github/codeql-action/autobuild@065c6cfb7809de8db2167a953b5b622491cda914 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@21a7ba37dd3a3acab11343f27c466aae7dfef4c7 + uses: github/codeql-action/analyze@065c6cfb7809de8db2167a953b5b622491cda914 From 71dfb08a096a03fb02e44be4ada796e99b053cf0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 00:52:46 +0000 Subject: [PATCH 311/391] chore(deps): update dependency org.codehaus.mojo:exec-maven-plugin to v3.6.1 (#1653) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b1eeb91cb..5917d41bd 100644 --- a/pom.xml +++ b/pom.xml @@ -668,7 +668,7 @@ org.codehaus.mojo exec-maven-plugin - 3.6.0 + 3.6.1 update-test-harness-submodule From 52c7f9906672320d08ad6e840dbaf4978d5fb6e2 Mon Sep 17 00:00:00 2001 From: alexandraoberaigner <82218944+alexandraoberaigner@users.noreply.github.com> Date: Mon, 6 Oct 2025 08:43:08 +0200 Subject: [PATCH 312/391] feat: add hook data support (#1620) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add hook data support Signed-off-by: Alexandraย Oberaigner * feat: gemini suggestions Signed-off-by: Alexandraย Oberaigner * feat: hook executor impl (WIP) Signed-off-by: Alexandraย Oberaigner * Use shared hook context Signed-off-by: Guido Breitenhuber * Split HookData interface and implementation Signed-off-by: Guido Breitenhuber * Atopted tests Signed-off-by: Guido Breitenhuber * Remove obsolete test Signed-off-by: Guido Breitenhuber * HookSupport improvements: rename back to old name, move code from static factory method to ctor Signed-off-by: Alexandraย Oberaigner * PR suggestion: use concrete hooks Signed-off-by: Alexandraย Oberaigner * PR suggestions: DefaultHookData access modifier, no star imports Signed-off-by: Alexandraย Oberaigner * feat: separate hook support data from logic, PR suggestions Signed-off-by: Alexandraย Oberaigner * Update DefaultHookDataTest.java spotless Signed-off-by: Alexandraย Oberaigner * fix tests, spotless apply Signed-off-by: Alexandraย Oberaigner * exclude lombok generated functions from codecov Signed-off-by: Alexandraย Oberaigner * replace init function with setters Signed-off-by: Alexandraย Oberaigner * pr suggestion: replace Generated annotation with more descriptive ExcludeFromGeneratedCoverageReport, replace delomboked functions with lombok annotations Signed-off-by: Alexandraย Oberaigner * PR suggestion: make HookSupportData a real POJO Signed-off-by: Alexandraย Oberaigner * gemini suggestions Signed-off-by: Alexandraย Oberaigner * PR suggestion: call hooks as early as possible Signed-off-by: Alexandraย Oberaigner * PR suggestions: integration test hook data usage in client, set pair value Signed-off-by: Alexandraย Oberaigner * add hook data spec test Signed-off-by: Alexandraย Oberaigner --------- Signed-off-by: Alexandraย Oberaigner Signed-off-by: Guido Breitenhuber Co-authored-by: Guido Breitenhuber --- .../dev/openfeature/sdk/DefaultHookData.java | 39 ++ .../java/dev/openfeature/sdk/HookContext.java | 338 +++++++++++++++++- .../java/dev/openfeature/sdk/HookData.java | 35 ++ .../java/dev/openfeature/sdk/HookSupport.java | 161 +++++---- .../dev/openfeature/sdk/HookSupportData.java | 18 + .../dev/openfeature/sdk/ImmutableContext.java | 2 + .../java/dev/openfeature/sdk/ObjectHook.java | 15 + .../openfeature/sdk/OpenFeatureClient.java | 62 ++-- src/main/java/dev/openfeature/sdk/Pair.java | 29 ++ .../openfeature/sdk/SharedHookContext.java | 32 ++ .../openfeature/sdk/DefaultHookDataTest.java | 81 +++++ .../dev/openfeature/sdk/HookContextTest.java | 2 +- .../dev/openfeature/sdk/HookSpecTest.java | 25 ++ .../dev/openfeature/sdk/HookSupportTest.java | 138 ++++--- .../sdk/OpenFeatureClientTest.java | 32 ++ .../dev/openfeature/sdk/TestHookWithData.java | 42 +++ .../sdk/benchmark/AllocationBenchmark.java | 34 +- 17 files changed, 926 insertions(+), 159 deletions(-) create mode 100644 src/main/java/dev/openfeature/sdk/DefaultHookData.java create mode 100644 src/main/java/dev/openfeature/sdk/HookData.java create mode 100644 src/main/java/dev/openfeature/sdk/HookSupportData.java create mode 100644 src/main/java/dev/openfeature/sdk/ObjectHook.java create mode 100644 src/main/java/dev/openfeature/sdk/Pair.java create mode 100644 src/main/java/dev/openfeature/sdk/SharedHookContext.java create mode 100644 src/test/java/dev/openfeature/sdk/DefaultHookDataTest.java create mode 100644 src/test/java/dev/openfeature/sdk/TestHookWithData.java diff --git a/src/main/java/dev/openfeature/sdk/DefaultHookData.java b/src/main/java/dev/openfeature/sdk/DefaultHookData.java new file mode 100644 index 000000000..d0efe49d0 --- /dev/null +++ b/src/main/java/dev/openfeature/sdk/DefaultHookData.java @@ -0,0 +1,39 @@ +package dev.openfeature.sdk; + +import java.util.HashMap; +import java.util.Map; + +/** + * Default implementation of HookData. + */ +public class DefaultHookData implements HookData { + private Map data; + + @Override + public void set(String key, Object value) { + if (data == null) { + data = new HashMap<>(); + } + data.put(key, value); + } + + @Override + public Object get(String key) { + if (data == null) { + return null; + } + return data.get(key); + } + + @Override + public T get(String key, Class type) { + Object value = get(key); + if (value == null) { + return null; + } + if (!type.isInstance(value)) { + throw new ClassCastException("Value for key '" + key + "' is not of type " + type.getName()); + } + return type.cast(value); + } +} diff --git a/src/main/java/dev/openfeature/sdk/HookContext.java b/src/main/java/dev/openfeature/sdk/HookContext.java index e14eeb643..8d4d2e13a 100644 --- a/src/main/java/dev/openfeature/sdk/HookContext.java +++ b/src/main/java/dev/openfeature/sdk/HookContext.java @@ -1,32 +1,56 @@ package dev.openfeature.sdk; -import lombok.Builder; +import dev.openfeature.sdk.internal.ExcludeFromGeneratedCoverageReport; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import java.util.Objects; +import lombok.EqualsAndHashCode; import lombok.NonNull; -import lombok.Value; -import lombok.With; +import lombok.ToString; /** * A data class to hold immutable context that {@link Hook} instances use. * * @param the type for the flag being evaluated */ -@Value -@Builder -@With -public class HookContext { - @NonNull String flagKey; +@EqualsAndHashCode +@ToString +public final class HookContext { + private final SharedHookContext sharedContext; + private EvaluationContext ctx; + private final HookData hookData; - @NonNull FlagValueType type; - - @NonNull T defaultValue; - - @NonNull EvaluationContext ctx; + HookContext(@NonNull SharedHookContext sharedContext, EvaluationContext evaluationContext, HookData hookData) { + this.sharedContext = sharedContext; + ctx = evaluationContext; + this.hookData = hookData; + } - ClientMetadata clientMetadata; - Metadata providerMetadata; + /** + * Obsolete constructor. + * This constructor is retained for binary compatibility but is no longer part of the public API. + * + * @param flagKey feature flag key + * @param type flag value type + * @param clientMetadata info on which client is calling + * @param providerMetadata info on the provider + * @param ctx Evaluation Context for the request + * @param defaultValue Fallback value + * @deprecated HookContext is initialized by the SDK and passed to hooks. Users should not create new instances. + */ + @Deprecated + HookContext( + @NonNull String flagKey, + @NonNull FlagValueType type, + @NonNull T defaultValue, + @NonNull EvaluationContext ctx, + ClientMetadata clientMetadata, + Metadata providerMetadata, + HookData hookData) { + this(new SharedHookContext<>(flagKey, type, clientMetadata, providerMetadata, defaultValue), ctx, hookData); + } /** - * Builds a {@link HookContext} instances from request data. + * Builds {@link HookContext} instances from request data. * * @param key feature flag key * @param type flag value type @@ -36,7 +60,9 @@ public class HookContext { * @param defaultValue Fallback value * @param type that the flag is evaluating against * @return resulting context for hook + * @deprecated HookContext is initialized by the SDK and passed to hooks. Users should not create new instances. */ + @Deprecated public static HookContext from( String key, FlagValueType type, @@ -51,6 +77,286 @@ public static HookContext from( .providerMetadata(providerMetadata) .ctx(ctx) .defaultValue(defaultValue) + .hookData(null) .build(); } + + /** + * Creates a new builder for {@link HookContext}. + * + * @param the type for the flag being evaluated + * @return a new builder + * @deprecated HookContext is initialized by the SDK and passed to hooks. Users should not create new instances. + */ + @Deprecated + public static HookContextBuilder builder() { + return new HookContextBuilder(); + } + + public @NonNull String getFlagKey() { + return sharedContext.getFlagKey(); + } + + public @NonNull FlagValueType getType() { + return sharedContext.getType(); + } + + public @NonNull T getDefaultValue() { + return sharedContext.getDefaultValue(); + } + + public @NonNull EvaluationContext getCtx() { + return this.ctx; + } + + public ClientMetadata getClientMetadata() { + return sharedContext.getClientMetadata(); + } + + public Metadata getProviderMetadata() { + return sharedContext.getProviderMetadata(); + } + + @SuppressFBWarnings(value = "EI_EXPOSE_REP", justification = "Intentional exposure of hookData") + public HookData getHookData() { + return this.hookData; + } + + void setCtx(@NonNull EvaluationContext ctx) { + this.ctx = ctx; + } + + /** + * Returns a new HookContext with the provided flagKey if it is different from the current one. + * + * @param flagKey new flag key + * @return new HookContext with updated flagKey or the same instance if unchanged + * @deprecated HookContext is initialized by the SDK and passed to hooks. Users should not create new instances. + */ + @ExcludeFromGeneratedCoverageReport + @Deprecated + public HookContext withFlagKey(@NonNull String flagKey) { + return Objects.equals(this.getFlagKey(), flagKey) + ? this + : new HookContext( + flagKey, + this.getType(), + this.getDefaultValue(), + this.getCtx(), + this.getClientMetadata(), + this.getProviderMetadata(), + this.hookData); + } + + /** + * Returns a new HookContext with the provided type if it is different from the current one. + * + * @param type new flag value type + * @return new HookContext with updated type or the same instance if unchanged + * @deprecated HookContext is initialized by the SDK and passed to hooks. Users should not create new instances. + */ + @ExcludeFromGeneratedCoverageReport + @Deprecated + public HookContext withType(@NonNull FlagValueType type) { + return this.getType() == type + ? this + : new HookContext( + this.getFlagKey(), + type, + this.getDefaultValue(), + this.getCtx(), + this.getClientMetadata(), + this.getProviderMetadata(), + this.hookData); + } + + /** + * Returns a new HookContext with the provided defaultValue if it is different from the current one. + * + * @param defaultValue new default value + * @return new HookContext with updated defaultValue or the same instance if unchanged + * @deprecated HookContext is initialized by the SDK and passed to hooks. Users should not create new instances. + */ + @ExcludeFromGeneratedCoverageReport + @Deprecated + public HookContext withDefaultValue(@NonNull T defaultValue) { + return this.getDefaultValue() == defaultValue + ? this + : new HookContext( + this.getFlagKey(), + this.getType(), + defaultValue, + this.getCtx(), + this.getClientMetadata(), + this.getProviderMetadata(), + this.hookData); + } + + /** + * Returns a new HookContext with the provided ctx if it is different from the current one. + * + * @param ctx new evaluation context + * @return new HookContext with updated ctx or the same instance if unchanged + * @deprecated HookContext is initialized by the SDK and passed to hooks. Users should not create new instances. + */ + @ExcludeFromGeneratedCoverageReport + @Deprecated + public HookContext withCtx(@NonNull EvaluationContext ctx) { + return this.ctx == ctx + ? this + : new HookContext( + this.getFlagKey(), + this.getType(), + this.getDefaultValue(), + ctx, + this.getClientMetadata(), + this.getProviderMetadata(), + this.hookData); + } + + /** + * Returns a new HookContext with the provided clientMetadata if it is different from the current one. + * + * @param clientMetadata new client metadata + * @return new HookContext with updated clientMetadata or the same instance if unchanged + * @deprecated HookContext is initialized by the SDK and passed to hooks. Users should not create new instances. + */ + @ExcludeFromGeneratedCoverageReport + @Deprecated + public HookContext withClientMetadata(ClientMetadata clientMetadata) { + return this.getClientMetadata() == clientMetadata + ? this + : new HookContext( + this.getFlagKey(), + this.getType(), + this.getDefaultValue(), + this.getCtx(), + clientMetadata, + this.getProviderMetadata(), + this.hookData); + } + + /** + * Returns a new HookContext with the provided providerMetadata if it is different from the current one. + * + * @param providerMetadata new provider metadata + * @return new HookContext with updated providerMetadata or the same instance if unchanged + * @deprecated HookContext is initialized by the SDK and passed to hooks. Users should not create new instances. + */ + @ExcludeFromGeneratedCoverageReport + @Deprecated + public HookContext withProviderMetadata(Metadata providerMetadata) { + return this.getProviderMetadata() == providerMetadata + ? this + : new HookContext( + this.getFlagKey(), + this.getType(), + this.getDefaultValue(), + this.getCtx(), + this.getClientMetadata(), + providerMetadata, + this.hookData); + } + + /** + * Returns a new HookContext with the provided hookData if it is different from the current one. + * + * @param hookData new hook data + * @return new HookContext with updated hookData or the same instance if unchanged + * @deprecated HookContext is initialized by the SDK and passed to hooks. Users should not create new instances. + */ + @ExcludeFromGeneratedCoverageReport + @Deprecated + public HookContext withHookData(HookData hookData) { + return this.hookData == hookData + ? this + : new HookContext( + this.getFlagKey(), + this.getType(), + this.getDefaultValue(), + this.getCtx(), + this.getClientMetadata(), + this.getProviderMetadata(), + hookData); + } + + /** + * Builder for HookContext. + * + * @param The flag type. + * @deprecated HookContext is initialized by the SDK and passed to hooks. Users should not create new instances. + */ + @Deprecated + @ToString + public static class HookContextBuilder { + private String flagKey; + private FlagValueType type; + private T defaultValue; + private EvaluationContext ctx; + private ClientMetadata clientMetadata; + private Metadata providerMetadata; + private HookData hookData; + + HookContextBuilder() {} + + @ExcludeFromGeneratedCoverageReport + public HookContextBuilder flagKey(@NonNull String flagKey) { + this.flagKey = flagKey; + return this; + } + + @ExcludeFromGeneratedCoverageReport + public HookContextBuilder type(@NonNull FlagValueType type) { + this.type = type; + return this; + } + + @ExcludeFromGeneratedCoverageReport + public HookContextBuilder defaultValue(@NonNull T defaultValue) { + this.defaultValue = defaultValue; + return this; + } + + @ExcludeFromGeneratedCoverageReport + public HookContextBuilder ctx(@NonNull EvaluationContext ctx) { + this.ctx = ctx; + return this; + } + + @ExcludeFromGeneratedCoverageReport + public HookContextBuilder clientMetadata(ClientMetadata clientMetadata) { + this.clientMetadata = clientMetadata; + return this; + } + + @ExcludeFromGeneratedCoverageReport + public HookContextBuilder providerMetadata(Metadata providerMetadata) { + this.providerMetadata = providerMetadata; + return this; + } + + @SuppressFBWarnings(value = "EI_EXPOSE_REP2", justification = "Intentional exposure of hookData") + @ExcludeFromGeneratedCoverageReport + public HookContextBuilder hookData(HookData hookData) { + this.hookData = hookData; + return this; + } + + /** + * Builds the HookContext instance. + * + * @return a new HookContext + */ + @ExcludeFromGeneratedCoverageReport + public HookContext build() { + return new HookContext( + this.flagKey, + this.type, + this.defaultValue, + this.ctx, + this.clientMetadata, + this.providerMetadata, + this.hookData); + } + } } diff --git a/src/main/java/dev/openfeature/sdk/HookData.java b/src/main/java/dev/openfeature/sdk/HookData.java new file mode 100644 index 000000000..bd2c5dba9 --- /dev/null +++ b/src/main/java/dev/openfeature/sdk/HookData.java @@ -0,0 +1,35 @@ +package dev.openfeature.sdk; + +/** + * Hook data provides a way for hooks to maintain state across their execution stages. + * Each hook instance gets its own isolated data store that persists only for the duration + * of a single flag evaluation. + */ +public interface HookData { + /** + * Sets a value for the given key. + * + * @param key the key to store the value under + * @param value the value to store + */ + void set(String key, Object value); + + /** + * Gets the value for the given key. + * + * @param key the key to retrieve the value for + * @return the value, or null if not found + */ + Object get(String key); + + /** + * Gets the value for the given key, cast to the specified type. + * + * @param the type to cast to + * @param key the key to retrieve the value for + * @param type the class to cast to + * @return the value cast to the specified type, or null if not found + * @throws ClassCastException if the value cannot be cast to the specified type + */ + T get(String key, Class type); +} diff --git a/src/main/java/dev/openfeature/sdk/HookSupport.java b/src/main/java/dev/openfeature/sdk/HookSupport.java index 73518ee8e..c7a7630da 100644 --- a/src/main/java/dev/openfeature/sdk/HookSupport.java +++ b/src/main/java/dev/openfeature/sdk/HookSupport.java @@ -3,99 +3,124 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import java.util.Map; import java.util.Optional; -import java.util.function.Consumer; -import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +/** + * Helper class to run hooks. Initialize {@link HookSupportData} by calling setHooks, setHookContexts + * & updateEvaluationContext in this exact order. + */ @Slf4j -@RequiredArgsConstructor -@SuppressWarnings({"unchecked", "rawtypes"}) class HookSupport { - public EvaluationContext beforeHooks( - FlagValueType flagValueType, HookContext hookCtx, List hooks, Map hints) { - return callBeforeHooks(flagValueType, hookCtx, hooks, hints); + /** + * Sets the {@link Hook}-{@link HookContext}-{@link Pair} list in the given data object with {@link HookContext} + * set to null. Filters hooks by supported {@link FlagValueType}. + * + * @param hookSupportData the data object to modify + * @param hooks the hooks to set + * @param type the flag value type to filter unsupported hooks + */ + public void setHooks(HookSupportData hookSupportData, List hooks, FlagValueType type) { + List> hookContextPairs = new ArrayList<>(); + for (Hook hook : hooks) { + if (hook.supportsFlagValueType(type)) { + hookContextPairs.add(Pair.of(hook, null)); + } + } + hookSupportData.hooks = hookContextPairs; } - public void afterHooks( - FlagValueType flagValueType, - HookContext hookContext, - FlagEvaluationDetails details, - List hooks, - Map hints) { - executeHooksUnchecked(flagValueType, hooks, hook -> hook.after(hookContext, details, hints)); + /** + * Creates & sets a {@link HookContext} for every {@link Hook}-{@link HookContext}-{@link Pair} + * in the given data object with a new {@link HookData} instance. + * + * @param hookSupportData the data object to modify + * @param sharedContext the shared context from which the new {@link HookContext} is created + */ + public void setHookContexts(HookSupportData hookSupportData, SharedHookContext sharedContext) { + for (int i = 0; i < hookSupportData.hooks.size(); i++) { + Pair hookContextPair = hookSupportData.hooks.get(i); + HookContext curHookContext = sharedContext.hookContextFor(null, new DefaultHookData()); + hookContextPair.setValue(curHookContext); + } } - public void afterAllHooks( - FlagValueType flagValueType, - HookContext hookCtx, - FlagEvaluationDetails details, - List hooks, - Map hints) { - executeHooks(flagValueType, hooks, "finally", hook -> hook.finallyAfter(hookCtx, details, hints)); + /** + * Updates the evaluation context in the given data object's eval context and each hooks eval context. + * + * @param hookSupportData the data object to modify + * @param evaluationContext the new context to set + */ + public void updateEvaluationContext(HookSupportData hookSupportData, EvaluationContext evaluationContext) { + hookSupportData.evaluationContext = evaluationContext; + if (hookSupportData.hooks != null) { + for (Pair hookContextPair : hookSupportData.hooks) { + var curHookContext = hookContextPair.getValue(); + if (curHookContext != null) { + curHookContext.setCtx(evaluationContext); + } + } + } } - public void errorHooks( - FlagValueType flagValueType, - HookContext hookCtx, - Exception e, - List hooks, - Map hints) { - executeHooks(flagValueType, hooks, "error", hook -> hook.error(hookCtx, e, hints)); - } + public void executeBeforeHooks(HookSupportData data) { + // These traverse backwards from normal. + List> reversedHooks = new ArrayList<>(data.getHooks()); + Collections.reverse(reversedHooks); - private void executeHooks( - FlagValueType flagValueType, List hooks, String hookMethod, Consumer> hookCode) { - if (hooks != null) { - for (Hook hook : hooks) { - if (hook.supportsFlagValueType(flagValueType)) { - executeChecked(hook, hookCode, hookMethod); - } + for (Pair hookContextPair : reversedHooks) { + var hook = hookContextPair.getKey(); + var hookContext = hookContextPair.getValue(); + + Optional returnedEvalContext = Optional.ofNullable( + hook.before(hookContext, data.getHints())) + .orElse(Optional.empty()); + if (returnedEvalContext.isPresent()) { + // update shared evaluation context for all hooks + updateEvaluationContext(data, data.getEvaluationContext().merge(returnedEvalContext.get())); } } } - // before, error, and finally hooks shouldn't throw - private void executeChecked(Hook hook, Consumer> hookCode, String hookMethod) { - try { - hookCode.accept(hook); - } catch (Exception exception) { - log.error( - "Unhandled exception when running {} hook {} (only 'after' hooks should throw)", - hookMethod, - hook.getClass(), - exception); + public void executeErrorHooks(HookSupportData data, Exception error) { + for (Pair hookContextPair : data.getHooks()) { + var hook = hookContextPair.getKey(); + var hookContext = hookContextPair.getValue(); + try { + hook.error(hookContext, error, data.getHints()); + } catch (Exception e) { + log.error( + "Unhandled exception when running {} hook {} (only 'after' hooks should throw)", + "error", + hook.getClass(), + e); + } } } // after hooks can throw in order to do validation - private void executeHooksUnchecked(FlagValueType flagValueType, List hooks, Consumer> hookCode) { - if (hooks != null) { - for (Hook hook : hooks) { - if (hook.supportsFlagValueType(flagValueType)) { - hookCode.accept(hook); - } - } + public void executeAfterHooks(HookSupportData data, FlagEvaluationDetails details) { + for (Pair hookContextPair : data.getHooks()) { + var hook = hookContextPair.getKey(); + var hookContext = hookContextPair.getValue(); + hook.after(hookContext, details, data.getHints()); } } - private EvaluationContext callBeforeHooks( - FlagValueType flagValueType, HookContext hookCtx, List hooks, Map hints) { - // These traverse backwards from normal. - List reversedHooks = new ArrayList<>(hooks); - Collections.reverse(reversedHooks); - EvaluationContext context = hookCtx.getCtx(); - for (Hook hook : reversedHooks) { - if (hook.supportsFlagValueType(flagValueType)) { - Optional optional = - Optional.ofNullable(hook.before(hookCtx, hints)).orElse(Optional.empty()); - if (optional.isPresent()) { - context = context.merge(optional.get()); - } + public void executeAfterAllHooks(HookSupportData data, FlagEvaluationDetails details) { + for (Pair hookContextPair : data.getHooks()) { + var hook = hookContextPair.getKey(); + var hookContext = hookContextPair.getValue(); + try { + hook.finallyAfter(hookContext, details, data.getHints()); + } catch (Exception e) { + log.error( + "Unhandled exception when running {} hook {} (only 'after' hooks should throw)", + "finally", + hook.getClass(), + e); } } - return context; } } diff --git a/src/main/java/dev/openfeature/sdk/HookSupportData.java b/src/main/java/dev/openfeature/sdk/HookSupportData.java new file mode 100644 index 000000000..2d3346ba1 --- /dev/null +++ b/src/main/java/dev/openfeature/sdk/HookSupportData.java @@ -0,0 +1,18 @@ +package dev.openfeature.sdk; + +import java.util.List; +import java.util.Map; +import lombok.Getter; + +/** + * Encapsulates data for hook execution per flag evaluation. + */ +@Getter +class HookSupportData { + + List> hooks; + EvaluationContext evaluationContext; + Map hints; + + HookSupportData() {} +} diff --git a/src/main/java/dev/openfeature/sdk/ImmutableContext.java b/src/main/java/dev/openfeature/sdk/ImmutableContext.java index 8560c369e..e4916dfca 100644 --- a/src/main/java/dev/openfeature/sdk/ImmutableContext.java +++ b/src/main/java/dev/openfeature/sdk/ImmutableContext.java @@ -20,6 +20,8 @@ @SuppressWarnings("PMD.BeanMembersShouldSerialize") public final class ImmutableContext implements EvaluationContext { + public static final ImmutableContext EMPTY = new ImmutableContext(); + @Delegate(excludes = DelegateExclusions.class) private final ImmutableStructure structure; diff --git a/src/main/java/dev/openfeature/sdk/ObjectHook.java b/src/main/java/dev/openfeature/sdk/ObjectHook.java new file mode 100644 index 000000000..ad3af6444 --- /dev/null +++ b/src/main/java/dev/openfeature/sdk/ObjectHook.java @@ -0,0 +1,15 @@ +package dev.openfeature.sdk; + +/** + * An extension point which can run around flag resolution. They are intended to be used as a way to add custom logic + * to the lifecycle of flag evaluation. + * + * @see Hook + */ +public interface ObjectHook extends Hook { + + @Override + default boolean supportsFlagValueType(FlagValueType flagValueType) { + return FlagValueType.OBJECT == flagValueType; + } +} diff --git a/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java b/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java index b5522b66a..614bc1e34 100644 --- a/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java +++ b/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java @@ -48,9 +48,10 @@ public class OpenFeatureClient implements Client { private final String version; private final ConcurrentLinkedQueue clientHooks; - private final HookSupport hookSupport; private final AtomicReference evaluationContext = new AtomicReference<>(); + private final HookSupport hookSupport; + /** * Deprecated public constructor. Use OpenFeature.API.getClient() instead. * @@ -67,8 +68,8 @@ public OpenFeatureClient(OpenFeatureAPI openFeatureAPI, String domain, String ve this.openfeatureApi = openFeatureAPI; this.domain = domain; this.version = version; - this.clientHooks = new ConcurrentLinkedQueue<>(); this.hookSupport = new HookSupport(); + this.clientHooks = new ConcurrentLinkedQueue<>(); } /** @@ -159,37 +160,32 @@ public EvaluationContext getEvaluationContext() { + "Instead, we return an evaluation result with the appropriate error code.") private FlagEvaluationDetails evaluateFlag( FlagValueType type, String key, T defaultValue, EvaluationContext ctx, FlagEvaluationOptions options) { + FlagEvaluationDetails details = null; + HookSupportData hookSupportData = new HookSupportData(); + var flagOptions = ObjectUtils.defaultIfNull( options, () -> FlagEvaluationOptions.builder().build()); - var hints = Collections.unmodifiableMap(flagOptions.getHookHints()); - - FlagEvaluationDetails details = null; - List mergedHooks = null; - HookContext afterHookContext = null; + hookSupportData.hints = Collections.unmodifiableMap(flagOptions.getHookHints()); try { - var stateManager = openfeatureApi.getFeatureProviderStateManager(this.domain); + final var stateManager = openfeatureApi.getFeatureProviderStateManager(this.domain); // provider must be accessed once to maintain a consistent reference - var provider = stateManager.getProvider(); - var state = stateManager.getState(); + final var provider = stateManager.getProvider(); + final var state = stateManager.getState(); - mergedHooks = ObjectUtils.merge( + // Hooks are initialized as early as possible to enable the execution of error stages + var mergedHooks = ObjectUtils.merge( provider.getProviderHooks(), flagOptions.getHooks(), clientHooks, openfeatureApi.getMutableHooks()); + hookSupport.setHooks(hookSupportData, mergedHooks, type); + + var sharedHookContext = + new SharedHookContext(key, type, this.getMetadata(), provider.getMetadata(), defaultValue); + hookSupport.setHookContexts(hookSupportData, sharedHookContext); - var mergedCtx = hookSupport.beforeHooks( - type, - HookContext.from( - key, - type, - this.getMetadata(), - provider.getMetadata(), - mergeEvaluationContext(ctx), - defaultValue), - mergedHooks, - hints); - - afterHookContext = - HookContext.from(key, type, this.getMetadata(), provider.getMetadata(), mergedCtx, defaultValue); + var evalContext = mergeEvaluationContext(ctx); + hookSupport.updateEvaluationContext(hookSupportData, evalContext); + + hookSupport.executeBeforeHooks(hookSupportData); // "short circuit" if the provider is in NOT_READY or FATAL state if (ProviderState.NOT_READY.equals(state)) { @@ -199,17 +195,17 @@ private FlagEvaluationDetails evaluateFlag( throw new FatalError("Provider is in an irrecoverable error state"); } - var providerEval = - (ProviderEvaluation) createProviderEvaluation(type, key, defaultValue, provider, mergedCtx); + var providerEval = (ProviderEvaluation) + createProviderEvaluation(type, key, defaultValue, provider, hookSupportData.getEvaluationContext()); details = FlagEvaluationDetails.from(providerEval, key); if (details.getErrorCode() != null) { var error = ExceptionUtils.instantiateErrorByErrorCode(details.getErrorCode(), details.getErrorMessage()); enrichDetailsWithErrorDefaults(defaultValue, details); - hookSupport.errorHooks(type, afterHookContext, error, mergedHooks, hints); + hookSupport.executeErrorHooks(hookSupportData, error); } else { - hookSupport.afterHooks(type, afterHookContext, details, mergedHooks, hints); + hookSupport.executeAfterHooks(hookSupportData, details); } } catch (Exception e) { if (details == null) { @@ -222,9 +218,13 @@ private FlagEvaluationDetails evaluateFlag( } details.setErrorMessage(e.getMessage()); enrichDetailsWithErrorDefaults(defaultValue, details); - hookSupport.errorHooks(type, afterHookContext, e, mergedHooks, hints); + if (hookSupportData.getHooks() != null) { + hookSupport.executeErrorHooks(hookSupportData, e); + } } finally { - hookSupport.afterAllHooks(type, afterHookContext, details, mergedHooks, hints); + if (hookSupportData.getHooks() != null) { + hookSupport.executeAfterAllHooks(hookSupportData, details); + } } return details; diff --git a/src/main/java/dev/openfeature/sdk/Pair.java b/src/main/java/dev/openfeature/sdk/Pair.java new file mode 100644 index 000000000..765be9f2d --- /dev/null +++ b/src/main/java/dev/openfeature/sdk/Pair.java @@ -0,0 +1,29 @@ +package dev.openfeature.sdk; + +import lombok.Setter; +import lombok.ToString; + +@ToString +class Pair { + private final K key; + + @Setter + private V value; + + private Pair(K key, V value) { + this.key = key; + this.value = value; + } + + public K getKey() { + return key; + } + + public V getValue() { + return value; + } + + public static Pair of(K key, V value) { + return new Pair<>(key, value); + } +} diff --git a/src/main/java/dev/openfeature/sdk/SharedHookContext.java b/src/main/java/dev/openfeature/sdk/SharedHookContext.java new file mode 100644 index 000000000..8faab37b2 --- /dev/null +++ b/src/main/java/dev/openfeature/sdk/SharedHookContext.java @@ -0,0 +1,32 @@ +package dev.openfeature.sdk; + +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode +class SharedHookContext { + + private final String flagKey; + private final FlagValueType type; + private final ClientMetadata clientMetadata; + private final Metadata providerMetadata; + private final T defaultValue; + + public SharedHookContext( + String flagKey, + FlagValueType type, + ClientMetadata clientMetadata, + Metadata providerMetadata, + T defaultValue) { + this.flagKey = flagKey; + this.type = type; + this.clientMetadata = clientMetadata; + this.providerMetadata = providerMetadata; + this.defaultValue = defaultValue; + } + + public HookContext hookContextFor(EvaluationContext evaluationContext, HookData hookData) { + return new HookContext<>(this, evaluationContext, hookData); + } +} diff --git a/src/test/java/dev/openfeature/sdk/DefaultHookDataTest.java b/src/test/java/dev/openfeature/sdk/DefaultHookDataTest.java new file mode 100644 index 000000000..ac50988ea --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/DefaultHookDataTest.java @@ -0,0 +1,81 @@ +package dev.openfeature.sdk; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class DefaultHookDataTest { + + @Test + void shouldStoreAndRetrieveValues() { + var hookData = new DefaultHookData(); + + hookData.set("key1", "value1"); + hookData.set("key2", 42); + hookData.set("key3", true); + + assertEquals("value1", hookData.get("key1")); + assertEquals(42, hookData.get("key2")); + assertEquals(true, hookData.get("key3")); + } + + @Test + void shouldReturnNullForMissingKeys() { + var hookData = new DefaultHookData(); + + assertNull(hookData.get("nonexistent")); + } + + @Test + void shouldSupportTypeSafeRetrieval() { + var hookData = new DefaultHookData(); + + hookData.set("string", "hello"); + hookData.set("integer", 123); + hookData.set("boolean", false); + + assertEquals("hello", hookData.get("string", String.class)); + assertEquals(Integer.valueOf(123), hookData.get("integer", Integer.class)); + assertEquals(Boolean.FALSE, hookData.get("boolean", Boolean.class)); + } + + @Test + void shouldReturnNullForMissingKeysWithType() { + var hookData = new DefaultHookData(); + + assertNull(hookData.get("missing", String.class)); + } + + @Test + void shouldThrowClassCastExceptionForWrongType() { + var hookData = new DefaultHookData(); + + hookData.set("string", "not a number"); + + assertThrows(ClassCastException.class, () -> { + hookData.get("string", Integer.class); + }); + } + + @Test + void shouldOverwriteExistingValues() { + var hookData = new DefaultHookData(); + + hookData.set("key", "original"); + assertEquals("original", hookData.get("key")); + + hookData.set("key", "updated"); + assertEquals("updated", hookData.get("key")); + } + + @Test + void shouldSupportNullValues() { + var hookData = new DefaultHookData(); + + hookData.set("nullKey", null); + assertNull(hookData.get("nullKey")); + assertNull(hookData.get("nullKey", String.class)); + } +} diff --git a/src/test/java/dev/openfeature/sdk/HookContextTest.java b/src/test/java/dev/openfeature/sdk/HookContextTest.java index 2196b8b1f..a37ade9d5 100644 --- a/src/test/java/dev/openfeature/sdk/HookContextTest.java +++ b/src/test/java/dev/openfeature/sdk/HookContextTest.java @@ -1,6 +1,6 @@ package dev.openfeature.sdk; -import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.mock; import org.junit.jupiter.api.Test; diff --git a/src/test/java/dev/openfeature/sdk/HookSpecTest.java b/src/test/java/dev/openfeature/sdk/HookSpecTest.java index 3a953d18a..56d88dfba 100644 --- a/src/test/java/dev/openfeature/sdk/HookSpecTest.java +++ b/src/test/java/dev/openfeature/sdk/HookSpecTest.java @@ -6,6 +6,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doThrow; @@ -801,4 +802,28 @@ void doesnt_use_finally() { Hook.class.getMethod("finallyAfter", HookContext.class, FlagEvaluationDetails.class, Map.class)) .doesNotThrowAnyException(); } + + @Specification( + number = "4.6.1", + text = "hook data MUST be a structure supporting the definition of arbitrary " + + "properties, with keys of type string, and values of any type.") + @Test + void hook_data_structure() { + // Arrange + HookData hookData = new DefaultHookData(); + + // Act - Add arbitrary properties to hook data + hookData.set("stringKey", "StringValue"); // String value + hookData.set("intKey", 42); // Integer value + hookData.set("doubleKey", 3.14); // Double value + hookData.set("objectKey", new Object()); // Object value + hookData.set("nullKey", null); // Null value + + // Assert - Retrieve and validate the properties + assertEquals("StringValue", hookData.get("stringKey")); + assertEquals(42, hookData.get("intKey")); + assertEquals(3.14, hookData.get("doubleKey")); + assertNotNull(hookData.get("objectKey")); + assertNull(hookData.get("nullKey")); + } } diff --git a/src/test/java/dev/openfeature/sdk/HookSupportTest.java b/src/test/java/dev/openfeature/sdk/HookSupportTest.java index 02a8ff90c..b1bb70ba1 100644 --- a/src/test/java/dev/openfeature/sdk/HookSupportTest.java +++ b/src/test/java/dev/openfeature/sdk/HookSupportTest.java @@ -2,13 +2,14 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import dev.openfeature.sdk.fixtures.HookFixtures; import java.util.Arrays; -import java.util.Collections; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Optional; import org.junit.jupiter.api.DisplayName; @@ -17,22 +18,30 @@ import org.junit.jupiter.params.provider.EnumSource; class HookSupportTest implements HookFixtures { + + private static final HookSupport hookSupport = new HookSupport(); + @Test @DisplayName("should merge EvaluationContexts on before hooks correctly") void shouldMergeEvaluationContextsOnBeforeHooksCorrectly() { Map attributes = new HashMap<>(); attributes.put("baseKey", new Value("baseValue")); - EvaluationContext baseContext = new ImmutableContext(attributes); - HookContext hookContext = new HookContext<>( - "flagKey", FlagValueType.STRING, "defaultValue", baseContext, () -> "client", () -> "provider"); + EvaluationContext baseEvalContext = new ImmutableContext(attributes); + Hook hook1 = mockStringHook(); Hook hook2 = mockStringHook(); when(hook1.before(any(), any())).thenReturn(Optional.of(evaluationContextWithValue("bla", "blubber"))); when(hook2.before(any(), any())).thenReturn(Optional.of(evaluationContextWithValue("foo", "bar"))); - HookSupport hookSupport = new HookSupport(); - EvaluationContext result = hookSupport.beforeHooks( - FlagValueType.STRING, hookContext, Arrays.asList(hook1, hook2), Collections.emptyMap()); + var sharedContext = getBaseHookContextForType(FlagValueType.STRING); + var hookSupportData = new HookSupportData(); + hookSupport.setHooks(hookSupportData, Arrays.asList(hook1, hook2), FlagValueType.STRING); + hookSupport.setHookContexts(hookSupportData, sharedContext); + hookSupport.updateEvaluationContext(hookSupportData, baseEvalContext); + + hookSupport.executeBeforeHooks(hookSupportData); + + EvaluationContext result = hookSupportData.getEvaluationContext(); assertThat(result.getValue("bla").asString()).isEqualTo("blubber"); assertThat(result.getValue("foo").asString()).isEqualTo("bar"); @@ -44,37 +53,11 @@ void shouldMergeEvaluationContextsOnBeforeHooksCorrectly() { @DisplayName("should always call generic hook") void shouldAlwaysCallGenericHook(FlagValueType flagValueType) { Hook genericHook = mockGenericHook(); - HookSupport hookSupport = new HookSupport(); - EvaluationContext baseContext = new ImmutableContext(); - IllegalStateException expectedException = new IllegalStateException("All fine, just a test"); - HookContext hookContext = new HookContext<>( - "flagKey", - flagValueType, - createDefaultValue(flagValueType), - baseContext, - () -> "client", - () -> "provider"); - - hookSupport.beforeHooks( - flagValueType, hookContext, Collections.singletonList(genericHook), Collections.emptyMap()); - hookSupport.afterHooks( - flagValueType, - hookContext, - FlagEvaluationDetails.builder().build(), - Collections.singletonList(genericHook), - Collections.emptyMap()); - hookSupport.afterAllHooks( - flagValueType, - hookContext, - FlagEvaluationDetails.builder().build(), - Collections.singletonList(genericHook), - Collections.emptyMap()); - hookSupport.errorHooks( - flagValueType, - hookContext, - expectedException, - Collections.singletonList(genericHook), - Collections.emptyMap()); + + var hookSupportData = new HookSupportData(); + hookSupport.setHooks(hookSupportData, List.of(genericHook), flagValueType); + + callAllHooks(hookSupportData); verify(genericHook).before(any(), any()); verify(genericHook).after(any(), any(), any()); @@ -82,6 +65,82 @@ void shouldAlwaysCallGenericHook(FlagValueType flagValueType) { verify(genericHook).error(any(), any(), any()); } + @ParameterizedTest + @EnumSource(value = FlagValueType.class) + @DisplayName("should allow hooks to store and retrieve data across stages") + void shouldPassDataAcrossStages(FlagValueType flagValueType) { + var testHook = new TestHookWithData(); + var hookSupportData = new HookSupportData(); + hookSupport.setHooks(hookSupportData, List.of(testHook), flagValueType); + hookSupport.setHookContexts(hookSupportData, getBaseHookContextForType(flagValueType)); + + hookSupport.executeBeforeHooks(hookSupportData); + assertHookData(testHook, "before"); + + hookSupport.executeAfterHooks( + hookSupportData, FlagEvaluationDetails.builder().build()); + assertHookData(testHook, "before", "after"); + + hookSupport.executeAfterAllHooks( + hookSupportData, FlagEvaluationDetails.builder().build()); + assertHookData(testHook, "before", "after", "finallyAfter"); + + hookSupport.executeErrorHooks(hookSupportData, mock(Exception.class)); + assertHookData(testHook, "before", "after", "finallyAfter", "error"); + } + + @ParameterizedTest + @EnumSource(value = FlagValueType.class) + @DisplayName("should isolate data between different hook instances") + void shouldIsolateDataBetweenHooks(FlagValueType flagValueType) { + var testHook1 = new TestHookWithData(1); + var testHook2 = new TestHookWithData(2); + + var hookSupportData = new HookSupportData(); + hookSupport.setHooks(hookSupportData, List.of(testHook1, testHook2), flagValueType); + hookSupport.setHookContexts(hookSupportData, getBaseHookContextForType(flagValueType)); + + callAllHooks(hookSupportData); + + assertHookData(testHook1, 1, "before", "after", "finallyAfter", "error"); + assertHookData(testHook2, 2, "before", "after", "finallyAfter", "error"); + } + + private static void callAllHooks(HookSupportData hookSupportData) { + hookSupport.executeBeforeHooks(hookSupportData); + hookSupport.executeAfterHooks( + hookSupportData, FlagEvaluationDetails.builder().build()); + hookSupport.executeAfterAllHooks( + hookSupportData, FlagEvaluationDetails.builder().build()); + hookSupport.executeErrorHooks(hookSupportData, mock(Exception.class)); + } + + private static void assertHookData(TestHookWithData testHook, String... expectedKeys) { + for (String expectedKey : expectedKeys) { + assertThat(testHook.hookData.get(expectedKey)) + .withFailMessage("Expected key %s not present in hook data", expectedKey) + .isNotNull(); + } + } + + private static void assertHookData(TestHookWithData testHook, Object expectedValue, String... expectedKeys) { + for (String expectedKey : expectedKeys) { + assertThat(testHook.hookData.get(expectedKey)) + .withFailMessage("Expected key '%s' not present in hook data", expectedKey) + .isNotNull(); + assertThat(testHook.hookData.get(expectedKey)) + .withFailMessage( + "Expected key '%s' not containing expected value. Expected '%s' but found '%s'", + expectedKey, expectedValue, testHook.hookData.get(expectedKey)) + .isEqualTo(expectedValue); + } + } + + private SharedHookContext getBaseHookContextForType(FlagValueType flagValueType) { + return new SharedHookContext<>( + "flagKey", flagValueType, () -> "client", () -> "provider", createDefaultValue(flagValueType)); + } + private Object createDefaultValue(FlagValueType flagValueType) { switch (flagValueType) { case INTEGER: @@ -102,7 +161,6 @@ private Object createDefaultValue(FlagValueType flagValueType) { private EvaluationContext evaluationContextWithValue(String key, String value) { Map attributes = new HashMap<>(); attributes.put(key, new Value(value)); - EvaluationContext baseContext = new ImmutableContext(attributes); - return baseContext; + return new ImmutableContext(attributes); } } diff --git a/src/test/java/dev/openfeature/sdk/OpenFeatureClientTest.java b/src/test/java/dev/openfeature/sdk/OpenFeatureClientTest.java index 97a1417a1..88ebfaf9d 100644 --- a/src/test/java/dev/openfeature/sdk/OpenFeatureClientTest.java +++ b/src/test/java/dev/openfeature/sdk/OpenFeatureClientTest.java @@ -16,6 +16,8 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; import org.mockito.Mockito; import org.simplify4u.slf4jmock.LoggerMock; import org.slf4j.Logger; @@ -104,4 +106,34 @@ void shouldNotCallEvaluationMethodsWhenProviderIsInNotReadyState() { assertThat(details.getErrorCode()).isEqualTo(ErrorCode.PROVIDER_NOT_READY); } + + @ParameterizedTest + @ValueSource(booleans = {true, false}) + @DisplayName("Should support usage of HookData with/without error") + void shouldSupportUsageOfHookData(boolean isError) { + OpenFeatureAPI api = new OpenFeatureAPI(); + FeatureProvider provider; + if (isError) { + provider = new AlwaysBrokenWithExceptionProvider(); + } else { + provider = new DoSomethingProvider(); + } + api.setProviderAndWait("shouldSupportUsageOfHookData", provider); + + var testHook = new TestHookWithData("test-data"); + api.addHooks(testHook); + + Client client = api.getClient("shouldSupportUsageOfHookData"); + client.getBooleanDetails("key", true); + + assertThat(testHook.hookData.get("before")).isEqualTo("test-data"); + assertThat(testHook.hookData.get("finallyAfter")).isEqualTo("test-data"); + if (isError) { + assertThat(testHook.hookData.get("after")).isEqualTo(null); + assertThat(testHook.hookData.get("error")).isEqualTo("test-data"); + } else { + assertThat(testHook.hookData.get("after")).isEqualTo("test-data"); + assertThat(testHook.hookData.get("error")).isEqualTo(null); + } + } } diff --git a/src/test/java/dev/openfeature/sdk/TestHookWithData.java b/src/test/java/dev/openfeature/sdk/TestHookWithData.java new file mode 100644 index 000000000..dc415fa16 --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/TestHookWithData.java @@ -0,0 +1,42 @@ +package dev.openfeature.sdk; + +import java.util.Map; +import java.util.Optional; + +class TestHookWithData implements Hook { + private final Object value; + HookData hookData = null; + + public TestHookWithData(Object value) { + this.value = value; + } + + public TestHookWithData() { + this("test"); + } + + @Override + public Optional before(HookContext ctx, Map hints) { + ctx.getHookData().set("before", value); + hookData = ctx.getHookData(); + return Optional.empty(); + } + + @Override + public void after(HookContext ctx, FlagEvaluationDetails details, Map hints) { + ctx.getHookData().set("after", value); + hookData = ctx.getHookData(); + } + + @Override + public void error(HookContext ctx, Exception error, Map hints) { + ctx.getHookData().set("error", value); + hookData = ctx.getHookData(); + } + + @Override + public void finallyAfter(HookContext ctx, FlagEvaluationDetails details, Map hints) { + ctx.getHookData().set("finallyAfter", value); + hookData = ctx.getHookData(); + } +} diff --git a/src/test/java/dev/openfeature/sdk/benchmark/AllocationBenchmark.java b/src/test/java/dev/openfeature/sdk/benchmark/AllocationBenchmark.java index 5bc89d03d..d6a03efd6 100644 --- a/src/test/java/dev/openfeature/sdk/benchmark/AllocationBenchmark.java +++ b/src/test/java/dev/openfeature/sdk/benchmark/AllocationBenchmark.java @@ -6,14 +6,18 @@ import static dev.openfeature.sdk.testutils.TestFlagsUtils.OBJECT_FLAG_KEY; import static dev.openfeature.sdk.testutils.TestFlagsUtils.STRING_FLAG_KEY; +import dev.openfeature.sdk.BooleanHook; import dev.openfeature.sdk.Client; +import dev.openfeature.sdk.DoubleHook; import dev.openfeature.sdk.EvaluationContext; -import dev.openfeature.sdk.Hook; import dev.openfeature.sdk.HookContext; import dev.openfeature.sdk.ImmutableContext; import dev.openfeature.sdk.ImmutableStructure; +import dev.openfeature.sdk.IntegerHook; import dev.openfeature.sdk.NoOpProvider; +import dev.openfeature.sdk.ObjectHook; import dev.openfeature.sdk.OpenFeatureAPI; +import dev.openfeature.sdk.StringHook; import dev.openfeature.sdk.Value; import java.util.HashMap; import java.util.Map; @@ -25,7 +29,7 @@ /** * Runs a large volume of flag evaluations on a VM with 1G memory and GC - * completely disabled so we can take a heap-dump. + * completely disabled, so we can take a heap-dump. */ public class AllocationBenchmark { @@ -48,12 +52,36 @@ public void run() { Map clientAttrs = new HashMap<>(); clientAttrs.put("client", new Value(2)); client.setEvaluationContext(new ImmutableContext(clientAttrs)); - client.addHooks(new Hook() { + client.addHooks(new ObjectHook() { @Override public Optional before(HookContext ctx, Map hints) { return Optional.ofNullable(new ImmutableContext()); } }); + client.addHooks(new StringHook() { + @Override + public Optional before(HookContext ctx, Map hints) { + return Optional.ofNullable(new ImmutableContext()); + } + }); + client.addHooks(new BooleanHook() { + @Override + public Optional before(HookContext ctx, Map hints) { + return Optional.ofNullable(new ImmutableContext()); + } + }); + client.addHooks(new IntegerHook() { + @Override + public Optional before(HookContext ctx, Map hints) { + return Optional.ofNullable(new ImmutableContext()); + } + }); + client.addHooks(new DoubleHook() { + @Override + public Optional before(HookContext ctx, Map hints) { + return Optional.ofNullable(new ImmutableContext()); + } + }); Map invocationAttrs = new HashMap<>(); invocationAttrs.put("invoke", new Value(3)); From 461b4154852809af34010da6b2ed7715d0bb7e04 Mon Sep 17 00:00:00 2001 From: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Date: Mon, 6 Oct 2025 07:08:53 -0400 Subject: [PATCH 313/391] chore(main): release 1.18.2 (#1617) * chore(main): release 1.19.0 Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> * change pr to release 1.18.2 instead of 1.19.0 Signed-off-by: christian.lutnik --------- Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: christian.lutnik Co-authored-by: christian.lutnik --- .release-please-manifest.json | 2 +- CHANGELOG.md | 51 +++++++++++++++++++++++++++++++++++ README.md | 8 +++--- pom.xml | 2 +- version.txt | 2 +- 5 files changed, 58 insertions(+), 7 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0ddd8a814..f386789e1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{".":"1.18.1"} +{".":"1.18.2"} diff --git a/CHANGELOG.md b/CHANGELOG.md index a241abad6..cbb4c6135 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,56 @@ # Changelog +## [1.18.2](https://github.com/open-feature/java-sdk/compare/v1.18.1...v1.18.2) (2025-10-06) + + +### ๐Ÿ› Bug Fixes + +* deployment failure because no tests were run by VMLens ([#1634](https://github.com/open-feature/java-sdk/issues/1634)) ([f6cb985](https://github.com/open-feature/java-sdk/commit/f6cb98556be3dacdb4e8d7770014dc2e7df65b6b)) +* **deps:** update dependency io.cucumber:cucumber-bom to v7.29.0 ([#1624](https://github.com/open-feature/java-sdk/issues/1624)) ([d0f9647](https://github.com/open-feature/java-sdk/commit/d0f9647fd09a8602ee47aae7778dbf7534c3fbd5)) +* **deps:** update dependency io.cucumber:cucumber-bom to v7.30.0 ([#1649](https://github.com/open-feature/java-sdk/issues/1649)) ([07bda4a](https://github.com/open-feature/java-sdk/commit/07bda4a99127e2c35d1e5323516c59f5beed20f8)) +* **deps:** update dependency org.junit:junit-bom to v5.14.0 ([#1646](https://github.com/open-feature/java-sdk/issues/1646)) ([2da33d6](https://github.com/open-feature/java-sdk/commit/2da33d60bc51ff9adadc3113d53106162e42f4b7)) +* **deps:** update dependency org.junit:junit-bom to v6 ([#1647](https://github.com/open-feature/java-sdk/issues/1647)) ([8893bf3](https://github.com/open-feature/java-sdk/commit/8893bf3817053e416d0d8656890441095357411b)) +* **deps:** update dependency org.projectlombok:lombok to v1.18.42 ([#1616](https://github.com/open-feature/java-sdk/issues/1616)) ([6dcd21f](https://github.com/open-feature/java-sdk/commit/6dcd21f559477c1b473cd30e459ca7241c4f7210)) +* for [#1611](https://github.com/open-feature/java-sdk/issues/1611) ([f6cb985](https://github.com/open-feature/java-sdk/commit/f6cb98556be3dacdb4e8d7770014dc2e7df65b6b)) +* improve vmlens handling ([#1628](https://github.com/open-feature/java-sdk/issues/1628)) ([fb3144a](https://github.com/open-feature/java-sdk/commit/fb3144a0b5e2f02e8af33d746fb6c426724adede)) + + +### โœจ New Features + +* add hook data support ([#1620](https://github.com/open-feature/java-sdk/issues/1620)) ([52c7f99](https://github.com/open-feature/java-sdk/commit/52c7f9906672320d08ad6e840dbaf4978d5fb6e2)) + + +### ๐Ÿงน Chore + +* **deps:** update actions/cache digest to 0057852 ([#1631](https://github.com/open-feature/java-sdk/issues/1631)) ([c1944d2](https://github.com/open-feature/java-sdk/commit/c1944d2b1c1a85efb3b4f76a5836dfc0e1c9124b)) +* **deps:** update amannn/action-semantic-pull-request digest to e49f57c ([#1648](https://github.com/open-feature/java-sdk/issues/1648)) ([badac4f](https://github.com/open-feature/java-sdk/commit/badac4f6aaf8fb1a71f4a50f906b4c74603f10ae)) +* **deps:** update dependency com.diffplug.spotless:spotless-maven-plugin to v3 ([#1632](https://github.com/open-feature/java-sdk/issues/1632)) ([0596ada](https://github.com/open-feature/java-sdk/commit/0596adac7dde1d9b5bf0da3763799d965870e828)) +* **deps:** update dependency com.google.guava:guava to v33.5.0-jre ([#1615](https://github.com/open-feature/java-sdk/issues/1615)) ([3ef41f5](https://github.com/open-feature/java-sdk/commit/3ef41f5225b93ca9d4b975c265d4ec41dbd91717)) +* **deps:** update dependency com.puppycrawl.tools:checkstyle to v11.1.0 ([#1640](https://github.com/open-feature/java-sdk/issues/1640)) ([b686932](https://github.com/open-feature/java-sdk/commit/b686932fa86138e02bddaab0be79d61f39946a02)) +* **deps:** update dependency com.vmlens:api to v1.2.15 ([#1636](https://github.com/open-feature/java-sdk/issues/1636)) ([9bffa0a](https://github.com/open-feature/java-sdk/commit/9bffa0a45aaea6fb5ecf7b489c02cd502fc2d93c)) +* **deps:** update dependency com.vmlens:api to v1.2.16 ([#1642](https://github.com/open-feature/java-sdk/issues/1642)) ([4c18cc4](https://github.com/open-feature/java-sdk/commit/4c18cc4ee502030935796e98272fd45b6c394c11)) +* **deps:** update dependency com.vmlens:vmlens-maven-plugin to v1.2.15 ([#1637](https://github.com/open-feature/java-sdk/issues/1637)) ([139c9b2](https://github.com/open-feature/java-sdk/commit/139c9b21b73717e52fde4970561009cbd27addaa)) +* **deps:** update dependency com.vmlens:vmlens-maven-plugin to v1.2.16 ([#1643](https://github.com/open-feature/java-sdk/issues/1643)) ([01ce26a](https://github.com/open-feature/java-sdk/commit/01ce26afc9b8a4bc098dc3406e65c483fd940d15)) +* **deps:** update dependency maven-wrapper to v3.3.4 ([#1638](https://github.com/open-feature/java-sdk/issues/1638)) ([69a87a8](https://github.com/open-feature/java-sdk/commit/69a87a81e8f4796c5d4a895b9379c0103765ba3d)) +* **deps:** update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.14.1 ([#1625](https://github.com/open-feature/java-sdk/issues/1625)) ([55c344a](https://github.com/open-feature/java-sdk/commit/55c344a8323fa94f4b890d5a119976e879bbb43c)) +* **deps:** update dependency org.apache.maven.plugins:maven-dependency-plugin to v3.9.0 ([#1651](https://github.com/open-feature/java-sdk/issues/1651)) ([bb42184](https://github.com/open-feature/java-sdk/commit/bb4218456e87391ae4ad96999e6cb49f78eab0aa)) +* **deps:** update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.12.0 ([#1623](https://github.com/open-feature/java-sdk/issues/1623)) ([eeda099](https://github.com/open-feature/java-sdk/commit/eeda09980cc85a538f0c41fef10bf285b0829761)) +* **deps:** update dependency org.assertj:assertj-core to v3.27.5 ([#1619](https://github.com/open-feature/java-sdk/issues/1619)) ([d4beca7](https://github.com/open-feature/java-sdk/commit/d4beca71bb60359b88e739153ff96ffc11aa74ef)) +* **deps:** update dependency org.assertj:assertj-core to v3.27.6 ([#1627](https://github.com/open-feature/java-sdk/issues/1627)) ([14f550f](https://github.com/open-feature/java-sdk/commit/14f550fd4ff9223437cc36d6cc1b248125a68e3c)) +* **deps:** update dependency org.codehaus.mojo:exec-maven-plugin to v3.6.0 ([#1645](https://github.com/open-feature/java-sdk/issues/1645)) ([261ea5d](https://github.com/open-feature/java-sdk/commit/261ea5dfa6b73d6e538388315719b0f06f417927)) +* **deps:** update dependency org.codehaus.mojo:exec-maven-plugin to v3.6.1 ([#1653](https://github.com/open-feature/java-sdk/issues/1653)) ([71dfb08](https://github.com/open-feature/java-sdk/commit/71dfb08a096a03fb02e44be4ada796e99b053cf0)) +* **deps:** update dependency org.mockito:mockito-core to v5.20.0 ([#1622](https://github.com/open-feature/java-sdk/issues/1622)) ([857fb9d](https://github.com/open-feature/java-sdk/commit/857fb9d78c509ee9c1087c355eb0fdb4ffdb668e)) +* **deps:** update dependency org.sonatype.central:central-publishing-maven-plugin to v0.9.0 ([#1630](https://github.com/open-feature/java-sdk/issues/1630)) ([014e82a](https://github.com/open-feature/java-sdk/commit/014e82af10ae478596c65c80d2cf92fc843339ed)) +* **deps:** update github/codeql-action digest to 0337c4c ([#1621](https://github.com/open-feature/java-sdk/issues/1621)) ([6cf64d6](https://github.com/open-feature/java-sdk/commit/6cf64d6b0c0ae351a707d70257380f2bce81a82e)) +* **deps:** update github/codeql-action digest to 065c6cf ([#1652](https://github.com/open-feature/java-sdk/issues/1652)) ([fe44e51](https://github.com/open-feature/java-sdk/commit/fe44e519c9de5dbc00b25aeaa6f1bf31809688f0)) +* **deps:** update github/codeql-action digest to 12dda79 ([#1618](https://github.com/open-feature/java-sdk/issues/1618)) ([17d0e48](https://github.com/open-feature/java-sdk/commit/17d0e487f31864facc0e69ee76352cab82b6b6b7)) +* **deps:** update github/codeql-action digest to 21a7ba3 ([#1650](https://github.com/open-feature/java-sdk/issues/1650)) ([1de446d](https://github.com/open-feature/java-sdk/commit/1de446d38ee2abdc3149f8eff374c617c26462fb)) +* **deps:** update github/codeql-action digest to 36adfa7 ([#1641](https://github.com/open-feature/java-sdk/issues/1641)) ([2155cc9](https://github.com/open-feature/java-sdk/commit/2155cc94371a0147fafc3246e7d4e4b9d9b7a5a3)) +* **deps:** update github/codeql-action digest to 6a87ebe ([#1639](https://github.com/open-feature/java-sdk/issues/1639)) ([58b6575](https://github.com/open-feature/java-sdk/commit/58b6575410b75760d5402f3f927dc8a2e62e9654)) +* **deps:** update github/codeql-action digest to 80cb6b5 ([#1644](https://github.com/open-feature/java-sdk/issues/1644)) ([6b922a2](https://github.com/open-feature/java-sdk/commit/6b922a2a6107cff7f951dcaf9e1c09609aeade83)) +* **deps:** update github/codeql-action digest to 94a9b7a ([#1635](https://github.com/open-feature/java-sdk/issues/1635)) ([f9796e8](https://github.com/open-feature/java-sdk/commit/f9796e8e1623bdac0ec52b7102e11759d3e449d8)) +* **deps:** update github/codeql-action digest to e4b85ab ([#1626](https://github.com/open-feature/java-sdk/issues/1626)) ([99a997d](https://github.com/open-feature/java-sdk/commit/99a997dcc594e06662cc3509e9c8698611893567)) + ## [1.18.1](https://github.com/open-feature/java-sdk/compare/v1.18.0...v1.18.1) (2025-09-17) diff --git a/README.md b/README.md index 58f586478..70b131e9a 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ - - Release + + Release @@ -59,7 +59,7 @@ Note that this library is intended to be used in server-side contexts and has no dev.openfeature sdk - 1.18.1 + 1.18.2 ``` @@ -84,7 +84,7 @@ If you would like snapshot builds, this is the relevant repository information: ```groovy dependencies { - implementation 'dev.openfeature:sdk:1.18.1' + implementation 'dev.openfeature:sdk:1.18.2' } ``` diff --git a/pom.xml b/pom.xml index 5917d41bd..33a98de7a 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ dev.openfeature sdk - 1.18.1 + 1.18.2 [17,) diff --git a/version.txt b/version.txt index ec6d649be..b57fc7228 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.18.1 +1.18.2 From ab0553b31c1afe3a448a58c2df231851f4453f30 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 7 Oct 2025 01:04:11 +0000 Subject: [PATCH 314/391] chore(deps): update github/codeql-action digest to 5528384 (#1654) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index ef6d4b2ca..a94de73da 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@065c6cfb7809de8db2167a953b5b622491cda914 + uses: github/codeql-action/init@55283843ca9b4d67ebda238e93f97913b6d527ca with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@065c6cfb7809de8db2167a953b5b622491cda914 + uses: github/codeql-action/analyze@55283843ca9b4d67ebda238e93f97913b6d527ca diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 2480aef2b..9c1b0962a 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@065c6cfb7809de8db2167a953b5b622491cda914 + uses: github/codeql-action/init@55283843ca9b4d67ebda238e93f97913b6d527ca with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@065c6cfb7809de8db2167a953b5b622491cda914 + uses: github/codeql-action/autobuild@55283843ca9b4d67ebda238e93f97913b6d527ca - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@065c6cfb7809de8db2167a953b5b622491cda914 + uses: github/codeql-action/analyze@55283843ca9b4d67ebda238e93f97913b6d527ca From 1266940ddb4347fe54b8ef26de85d7a88daa3815 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 7 Oct 2025 12:46:23 +0200 Subject: [PATCH 315/391] chore(deps): update github/codeql-action digest to 239d7b2 (#1656) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index a94de73da..375ce689d 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@55283843ca9b4d67ebda238e93f97913b6d527ca + uses: github/codeql-action/init@239d7b286f1cc525f01e99e2f7039bcfe5cf3919 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@55283843ca9b4d67ebda238e93f97913b6d527ca + uses: github/codeql-action/analyze@239d7b286f1cc525f01e99e2f7039bcfe5cf3919 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 9c1b0962a..fc461c700 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@55283843ca9b4d67ebda238e93f97913b6d527ca + uses: github/codeql-action/init@239d7b286f1cc525f01e99e2f7039bcfe5cf3919 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@55283843ca9b4d67ebda238e93f97913b6d527ca + uses: github/codeql-action/autobuild@239d7b286f1cc525f01e99e2f7039bcfe5cf3919 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@55283843ca9b4d67ebda238e93f97913b6d527ca + uses: github/codeql-action/analyze@239d7b286f1cc525f01e99e2f7039bcfe5cf3919 From 0ab5832fec1df40a54c9856b3841484ace8118b4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 7 Oct 2025 12:55:56 +0200 Subject: [PATCH 316/391] chore(deps): update github/codeql-action digest to 2f11c17 (#1658) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 375ce689d..ebb554154 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@239d7b286f1cc525f01e99e2f7039bcfe5cf3919 + uses: github/codeql-action/init@2f11c17b09609f544685db8f691ba3176174beb4 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@239d7b286f1cc525f01e99e2f7039bcfe5cf3919 + uses: github/codeql-action/analyze@2f11c17b09609f544685db8f691ba3176174beb4 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index fc461c700..0558a7943 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@239d7b286f1cc525f01e99e2f7039bcfe5cf3919 + uses: github/codeql-action/init@2f11c17b09609f544685db8f691ba3176174beb4 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@239d7b286f1cc525f01e99e2f7039bcfe5cf3919 + uses: github/codeql-action/autobuild@2f11c17b09609f544685db8f691ba3176174beb4 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@239d7b286f1cc525f01e99e2f7039bcfe5cf3919 + uses: github/codeql-action/analyze@2f11c17b09609f544685db8f691ba3176174beb4 From 490eeac9b06302359f5af0c3eb79f41562e53c5b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 7 Oct 2025 11:03:05 +0000 Subject: [PATCH 317/391] chore(deps): update dependency com.vmlens:vmlens-maven-plugin to v1.2.17 (#1659) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 33a98de7a..478f7de3f 100644 --- a/pom.xml +++ b/pom.xml @@ -351,7 +351,7 @@ com.vmlens vmlens-maven-plugin - 1.2.16 + 1.2.17 test From 354632084a2978db17a0d7791253c9442e843c33 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 7 Oct 2025 11:11:44 +0000 Subject: [PATCH 318/391] chore(deps): update dependency com.vmlens:api to v1.2.17 (#1657) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 478f7de3f..eb62abc70 100644 --- a/pom.xml +++ b/pom.xml @@ -196,7 +196,7 @@ com.vmlens api - 1.2.16 + 1.2.17 test From 59fa1e28602ba2a485323882cfbd7872280ec683 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 8 Oct 2025 02:54:51 +0000 Subject: [PATCH 319/391] chore(deps): update github/codeql-action digest to 8a6b62b (#1660) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index ebb554154..e356961bb 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@2f11c17b09609f544685db8f691ba3176174beb4 + uses: github/codeql-action/init@8a6b62bc2dc4eb1fbb471c60b48b640bbdac8575 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@2f11c17b09609f544685db8f691ba3176174beb4 + uses: github/codeql-action/analyze@8a6b62bc2dc4eb1fbb471c60b48b640bbdac8575 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 0558a7943..6131c8253 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@2f11c17b09609f544685db8f691ba3176174beb4 + uses: github/codeql-action/init@8a6b62bc2dc4eb1fbb471c60b48b640bbdac8575 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@2f11c17b09609f544685db8f691ba3176174beb4 + uses: github/codeql-action/autobuild@8a6b62bc2dc4eb1fbb471c60b48b640bbdac8575 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@2f11c17b09609f544685db8f691ba3176174beb4 + uses: github/codeql-action/analyze@8a6b62bc2dc4eb1fbb471c60b48b640bbdac8575 From 2889ca601ed7fe6c10d1b93a4fd2c197e9b8d516 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 8 Oct 2025 18:02:06 +0000 Subject: [PATCH 320/391] chore(deps): update github/codeql-action digest to 6fd4ceb (#1662) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index e356961bb..b8983a723 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@8a6b62bc2dc4eb1fbb471c60b48b640bbdac8575 + uses: github/codeql-action/init@6fd4ceb7bbb8ec2746fd4d3a64b77787dffd9afc with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@8a6b62bc2dc4eb1fbb471c60b48b640bbdac8575 + uses: github/codeql-action/analyze@6fd4ceb7bbb8ec2746fd4d3a64b77787dffd9afc diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 6131c8253..ee5826037 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@8a6b62bc2dc4eb1fbb471c60b48b640bbdac8575 + uses: github/codeql-action/init@6fd4ceb7bbb8ec2746fd4d3a64b77787dffd9afc with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@8a6b62bc2dc4eb1fbb471c60b48b640bbdac8575 + uses: github/codeql-action/autobuild@6fd4ceb7bbb8ec2746fd4d3a64b77787dffd9afc - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@8a6b62bc2dc4eb1fbb471c60b48b640bbdac8575 + uses: github/codeql-action/analyze@6fd4ceb7bbb8ec2746fd4d3a64b77787dffd9afc From e3f2e422df793044682328cb8f7835fec9607cb1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 9 Oct 2025 05:10:25 +0000 Subject: [PATCH 321/391] chore(deps): update dependency net.bytebuddy:byte-buddy to v1.17.8 (#1663) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index eb62abc70..1f4a6d5da 100644 --- a/pom.xml +++ b/pom.xml @@ -211,7 +211,7 @@ net.bytebuddy byte-buddy - 1.17.7 + 1.17.8 test From e264a7a600229b380ce1d63459990718a2f427e4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 9 Oct 2025 08:48:39 +0000 Subject: [PATCH 322/391] chore(deps): update dependency net.bytebuddy:byte-buddy-agent to v1.17.8 (#1664) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1f4a6d5da..f8099007b 100644 --- a/pom.xml +++ b/pom.xml @@ -218,7 +218,7 @@ net.bytebuddy byte-buddy-agent - 1.17.7 + 1.17.8 test From 7aa3445802ee7a64804497b7ed2d407cd0544ce7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 10 Oct 2025 13:47:31 +0000 Subject: [PATCH 323/391] chore(deps): update dependency com.vmlens:api to v1.2.18 (#1666) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f8099007b..176aeed4f 100644 --- a/pom.xml +++ b/pom.xml @@ -196,7 +196,7 @@ com.vmlens api - 1.2.17 + 1.2.18 test From 1a2d32437976651f582b33244173347938d8c3ad Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 10 Oct 2025 17:35:26 +0000 Subject: [PATCH 324/391] chore(deps): update dependency com.vmlens:vmlens-maven-plugin to v1.2.18 (#1667) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 176aeed4f..53e90c67d 100644 --- a/pom.xml +++ b/pom.xml @@ -351,7 +351,7 @@ com.vmlens vmlens-maven-plugin - 1.2.17 + 1.2.18 test From 4cd6aeb21f2fe491320e1033674dd0db8ad72d5f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 10 Oct 2025 22:35:21 +0000 Subject: [PATCH 325/391] chore(deps): update github/codeql-action digest to 17783bf (#1668) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index b8983a723..97fa5739f 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@6fd4ceb7bbb8ec2746fd4d3a64b77787dffd9afc + uses: github/codeql-action/init@17783bfb99b07f70fae080b654aed0c514057477 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@6fd4ceb7bbb8ec2746fd4d3a64b77787dffd9afc + uses: github/codeql-action/analyze@17783bfb99b07f70fae080b654aed0c514057477 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index ee5826037..7d6aef28d 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@6fd4ceb7bbb8ec2746fd4d3a64b77787dffd9afc + uses: github/codeql-action/init@17783bfb99b07f70fae080b654aed0c514057477 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@6fd4ceb7bbb8ec2746fd4d3a64b77787dffd9afc + uses: github/codeql-action/autobuild@17783bfb99b07f70fae080b654aed0c514057477 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@6fd4ceb7bbb8ec2746fd4d3a64b77787dffd9afc + uses: github/codeql-action/analyze@17783bfb99b07f70fae080b654aed0c514057477 From 4de637f716314ae99b26bf02e8a78c4a3c5c1940 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 15 Oct 2025 06:06:50 +0000 Subject: [PATCH 326/391] fix(deps): update dependency com.github.spotbugs:spotbugs to v4.9.7 (#1670) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 53e90c67d..1a2bda168 100644 --- a/pom.xml +++ b/pom.xml @@ -60,7 +60,7 @@ com.github.spotbugs spotbugs - 4.9.6 + 4.9.7 provided @@ -476,7 +476,7 @@ com.github.spotbugs spotbugs - 4.9.6 + 4.9.7 From c5d54940bfe1e9671bd2dc2dc0f4a6f414fd6e36 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 15 Oct 2025 08:22:32 +0200 Subject: [PATCH 327/391] chore(deps): update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.9.7.0 (#1671) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1a2bda168..e5feb632d 100644 --- a/pom.xml +++ b/pom.xml @@ -460,7 +460,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.9.6.0 + 4.9.7.0 spotbugs-exclusions.xml From a9a5431676ea37f0de0270d19cc4e98065fb09b8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 15 Oct 2025 13:10:01 +0200 Subject: [PATCH 328/391] chore(deps): update dependency com.vmlens:api to v1.2.19 (#1672) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e5feb632d..97e8af1d6 100644 --- a/pom.xml +++ b/pom.xml @@ -196,7 +196,7 @@ com.vmlens api - 1.2.18 + 1.2.19 test From 060dd410fb5bf1fd2cc498e9b12ef0681667149f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 15 Oct 2025 11:17:07 +0000 Subject: [PATCH 329/391] chore(deps): update dependency com.vmlens:vmlens-maven-plugin to v1.2.19 (#1673) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 97e8af1d6..8d3ff4897 100644 --- a/pom.xml +++ b/pom.xml @@ -351,7 +351,7 @@ com.vmlens vmlens-maven-plugin - 1.2.18 + 1.2.19 test From fdf69f9b366f5278eb3387ccd761ebb1c3f7805b Mon Sep 17 00:00:00 2001 From: chrfwow Date: Wed, 15 Oct 2025 16:49:57 +0200 Subject: [PATCH 330/391] chore: Extract vmlens version (#1610) Extract vmlens version Signed-off-by: christian.lutnik --- pom.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 8d3ff4897..65106c35f 100644 --- a/pom.xml +++ b/pom.xml @@ -13,6 +13,7 @@ 11 ${maven.compiler.source} 5.20.0 + 1.2.19 **/e2e/*.java ${project.groupId}.${project.artifactId} @@ -196,7 +197,7 @@ com.vmlens api - 1.2.19 + ${com.vmlens.version} test @@ -351,7 +352,7 @@ com.vmlens vmlens-maven-plugin - 1.2.19 + ${com.vmlens.version} test From e2d1bb63e5f42868422d510779ebbb33c74fe377 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 17 Oct 2025 03:05:31 +0000 Subject: [PATCH 331/391] chore(deps): update github/codeql-action digest to ee753b4 (#1674) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 97fa5739f..252b06872 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@17783bfb99b07f70fae080b654aed0c514057477 + uses: github/codeql-action/init@ee753b4724a8022c6235aff6a88efbfd82155923 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@17783bfb99b07f70fae080b654aed0c514057477 + uses: github/codeql-action/analyze@ee753b4724a8022c6235aff6a88efbfd82155923 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 7d6aef28d..1c824ce05 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@17783bfb99b07f70fae080b654aed0c514057477 + uses: github/codeql-action/init@ee753b4724a8022c6235aff6a88efbfd82155923 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@17783bfb99b07f70fae080b654aed0c514057477 + uses: github/codeql-action/autobuild@ee753b4724a8022c6235aff6a88efbfd82155923 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@17783bfb99b07f70fae080b654aed0c514057477 + uses: github/codeql-action/analyze@ee753b4724a8022c6235aff6a88efbfd82155923 From e12d594002abe54eeb56a54e3e5d429609247717 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 17 Oct 2025 12:43:23 +0000 Subject: [PATCH 332/391] chore(deps): update com.vmlens.version to v1.2.20 (#1675) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 65106c35f..9c15aef16 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ 11 ${maven.compiler.source} 5.20.0 - 1.2.19 + 1.2.20 **/e2e/*.java ${project.groupId}.${project.artifactId} From e0f1ab03d6694d2ae45ac10825d4fbc52a7c8b5a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 18 Oct 2025 03:10:09 +0000 Subject: [PATCH 333/391] chore(deps): update github/codeql-action digest to d88a554 (#1676) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 252b06872..8faba4042 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@ee753b4724a8022c6235aff6a88efbfd82155923 + uses: github/codeql-action/init@d88a5540c3fd916f4e15b7744d287a124278e065 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ee753b4724a8022c6235aff6a88efbfd82155923 + uses: github/codeql-action/analyze@d88a5540c3fd916f4e15b7744d287a124278e065 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 1c824ce05..c65ca82a7 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@ee753b4724a8022c6235aff6a88efbfd82155923 + uses: github/codeql-action/init@d88a5540c3fd916f4e15b7744d287a124278e065 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@ee753b4724a8022c6235aff6a88efbfd82155923 + uses: github/codeql-action/autobuild@d88a5540c3fd916f4e15b7744d287a124278e065 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ee753b4724a8022c6235aff6a88efbfd82155923 + uses: github/codeql-action/analyze@d88a5540c3fd916f4e15b7744d287a124278e065 From b21c6745cfca313bd48d6c975929161f934be50d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 18 Oct 2025 21:50:42 +0000 Subject: [PATCH 334/391] fix(deps): update dependency com.github.spotbugs:spotbugs to v4.9.8 (#1677) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 9c15aef16..0b1b9e319 100644 --- a/pom.xml +++ b/pom.xml @@ -61,7 +61,7 @@ com.github.spotbugs spotbugs - 4.9.7 + 4.9.8 provided @@ -477,7 +477,7 @@ com.github.spotbugs spotbugs - 4.9.7 + 4.9.8 From 8c9b126e6b600bac9c9edbc63ad0d19e4bd9b5cf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 19 Oct 2025 03:22:02 +0000 Subject: [PATCH 335/391] chore(deps): update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.9.8.0 (#1678) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0b1b9e319..95aae6c2f 100644 --- a/pom.xml +++ b/pom.xml @@ -461,7 +461,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.9.7.0 + 4.9.8.0 spotbugs-exclusions.xml From d9563626b436961e3a4706280686d31952e42885 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 19 Oct 2025 13:34:56 +0000 Subject: [PATCH 336/391] chore(deps): update dependency org.codehaus.mojo:exec-maven-plugin to v3.6.2 (#1679) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 95aae6c2f..b78e4c3f4 100644 --- a/pom.xml +++ b/pom.xml @@ -669,7 +669,7 @@ org.codehaus.mojo exec-maven-plugin - 3.6.1 + 3.6.2 update-test-harness-submodule From 110054faa099b44b2306f16cdf4ccbd33fa61fe0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 Oct 2025 05:48:29 +0000 Subject: [PATCH 337/391] chore(deps): update dependency com.github.spotbugs:spotbugs-maven-plugin to v4.9.8.1 (#1680) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b78e4c3f4..f16854c8c 100644 --- a/pom.xml +++ b/pom.xml @@ -461,7 +461,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.9.8.0 + 4.9.8.1 spotbugs-exclusions.xml From d7dfc06c6616892a12c645a109ad0eeef3c18cf9 Mon Sep 17 00:00:00 2001 From: chrfwow Date: Mon, 20 Oct 2025 19:58:58 +0200 Subject: [PATCH 338/391] test: Consolidate test providers (#1661) * Consolidate test providers Signed-off-by: christian.lutnik * spotless Signed-off-by: christian.lutnik * fix errors on flag evaluation logic Signed-off-by: christian.lutnik --------- Signed-off-by: christian.lutnik --- spotbugs-exclusions.xml | 3 +- .../openfeature/sdk/ImmutableMetadata.java | 2 + .../sdk/AlwaysBrokenWithDetailsProvider.java | 52 --- .../AlwaysBrokenWithExceptionProvider.java | 39 -- .../sdk/ClientProviderMappingTest.java | 15 +- .../sdk/DeveloperExperienceTest.java | 36 +- .../openfeature/sdk/DoSomethingProvider.java | 64 --- .../java/dev/openfeature/sdk/EventsTest.java | 138 +++--- .../openfeature/sdk/FatalErrorProvider.java | 45 -- .../sdk/FlagEvaluationSpecTest.java | 164 +++++--- .../dev/openfeature/sdk/HookSpecTest.java | 90 ++-- .../openfeature/sdk/OpenFeatureAPITest.java | 21 +- .../sdk/OpenFeatureClientTest.java | 23 +- .../java/dev/openfeature/sdk/e2e/Flag.java | 14 +- .../sdk/testutils/TestEventsProvider.java | 127 ------ .../testProvider/FlagEvaluation.java | 16 + .../testutils/testProvider/TestProvider.java | 396 ++++++++++++++++++ 17 files changed, 694 insertions(+), 551 deletions(-) delete mode 100644 src/test/java/dev/openfeature/sdk/AlwaysBrokenWithDetailsProvider.java delete mode 100644 src/test/java/dev/openfeature/sdk/AlwaysBrokenWithExceptionProvider.java delete mode 100644 src/test/java/dev/openfeature/sdk/DoSomethingProvider.java delete mode 100644 src/test/java/dev/openfeature/sdk/FatalErrorProvider.java delete mode 100644 src/test/java/dev/openfeature/sdk/testutils/TestEventsProvider.java create mode 100644 src/test/java/dev/openfeature/sdk/testutils/testProvider/FlagEvaluation.java create mode 100644 src/test/java/dev/openfeature/sdk/testutils/testProvider/TestProvider.java diff --git a/spotbugs-exclusions.xml b/spotbugs-exclusions.xml index 66032ad08..b841bbad4 100644 --- a/spotbugs-exclusions.xml +++ b/spotbugs-exclusions.xml @@ -49,7 +49,6 @@ - @@ -58,4 +57,4 @@ - \ No newline at end of file + diff --git a/src/main/java/dev/openfeature/sdk/ImmutableMetadata.java b/src/main/java/dev/openfeature/sdk/ImmutableMetadata.java index f6c1d742e..945e0ea17 100644 --- a/src/main/java/dev/openfeature/sdk/ImmutableMetadata.java +++ b/src/main/java/dev/openfeature/sdk/ImmutableMetadata.java @@ -13,6 +13,8 @@ @Slf4j @EqualsAndHashCode public class ImmutableMetadata { + public static final ImmutableMetadata EMPTY = new ImmutableMetadata(Collections.emptyMap()); + private final Map metadata; private ImmutableMetadata(Map metadata) { diff --git a/src/test/java/dev/openfeature/sdk/AlwaysBrokenWithDetailsProvider.java b/src/test/java/dev/openfeature/sdk/AlwaysBrokenWithDetailsProvider.java deleted file mode 100644 index bd0ac2c21..000000000 --- a/src/test/java/dev/openfeature/sdk/AlwaysBrokenWithDetailsProvider.java +++ /dev/null @@ -1,52 +0,0 @@ -package dev.openfeature.sdk; - -public class AlwaysBrokenWithDetailsProvider implements FeatureProvider { - - private final String name = "always broken with details"; - - @Override - public Metadata getMetadata() { - return () -> name; - } - - @Override - public ProviderEvaluation getBooleanEvaluation(String key, Boolean defaultValue, EvaluationContext ctx) { - return ProviderEvaluation.builder() - .errorMessage(TestConstants.BROKEN_MESSAGE) - .errorCode(ErrorCode.FLAG_NOT_FOUND) - .build(); - } - - @Override - public ProviderEvaluation getStringEvaluation(String key, String defaultValue, EvaluationContext ctx) { - return ProviderEvaluation.builder() - .errorMessage(TestConstants.BROKEN_MESSAGE) - .errorCode(ErrorCode.FLAG_NOT_FOUND) - .build(); - } - - @Override - public ProviderEvaluation getIntegerEvaluation(String key, Integer defaultValue, EvaluationContext ctx) { - return ProviderEvaluation.builder() - .errorMessage(TestConstants.BROKEN_MESSAGE) - .errorCode(ErrorCode.FLAG_NOT_FOUND) - .build(); - } - - @Override - public ProviderEvaluation getDoubleEvaluation(String key, Double defaultValue, EvaluationContext ctx) { - return ProviderEvaluation.builder() - .errorMessage(TestConstants.BROKEN_MESSAGE) - .errorCode(ErrorCode.FLAG_NOT_FOUND) - .build(); - } - - @Override - public ProviderEvaluation getObjectEvaluation( - String key, Value defaultValue, EvaluationContext invocationContext) { - return ProviderEvaluation.builder() - .errorMessage(TestConstants.BROKEN_MESSAGE) - .errorCode(ErrorCode.FLAG_NOT_FOUND) - .build(); - } -} diff --git a/src/test/java/dev/openfeature/sdk/AlwaysBrokenWithExceptionProvider.java b/src/test/java/dev/openfeature/sdk/AlwaysBrokenWithExceptionProvider.java deleted file mode 100644 index 0ad09db29..000000000 --- a/src/test/java/dev/openfeature/sdk/AlwaysBrokenWithExceptionProvider.java +++ /dev/null @@ -1,39 +0,0 @@ -package dev.openfeature.sdk; - -import dev.openfeature.sdk.exceptions.FlagNotFoundError; - -public class AlwaysBrokenWithExceptionProvider implements FeatureProvider { - - private final String name = "always broken"; - - @Override - public Metadata getMetadata() { - return () -> name; - } - - @Override - public ProviderEvaluation getBooleanEvaluation(String key, Boolean defaultValue, EvaluationContext ctx) { - throw new FlagNotFoundError(TestConstants.BROKEN_MESSAGE); - } - - @Override - public ProviderEvaluation getStringEvaluation(String key, String defaultValue, EvaluationContext ctx) { - throw new FlagNotFoundError(TestConstants.BROKEN_MESSAGE); - } - - @Override - public ProviderEvaluation getIntegerEvaluation(String key, Integer defaultValue, EvaluationContext ctx) { - throw new FlagNotFoundError(TestConstants.BROKEN_MESSAGE); - } - - @Override - public ProviderEvaluation getDoubleEvaluation(String key, Double defaultValue, EvaluationContext ctx) { - throw new FlagNotFoundError(TestConstants.BROKEN_MESSAGE); - } - - @Override - public ProviderEvaluation getObjectEvaluation( - String key, Value defaultValue, EvaluationContext invocationContext) { - throw new FlagNotFoundError(TestConstants.BROKEN_MESSAGE); - } -} diff --git a/src/test/java/dev/openfeature/sdk/ClientProviderMappingTest.java b/src/test/java/dev/openfeature/sdk/ClientProviderMappingTest.java index beadf7aad..6bbb2e6c3 100644 --- a/src/test/java/dev/openfeature/sdk/ClientProviderMappingTest.java +++ b/src/test/java/dev/openfeature/sdk/ClientProviderMappingTest.java @@ -2,6 +2,7 @@ import static org.junit.jupiter.api.Assertions.*; +import dev.openfeature.sdk.testutils.testProvider.TestProvider; import org.junit.jupiter.api.Test; class ClientProviderMappingTest { @@ -10,13 +11,19 @@ class ClientProviderMappingTest { void clientProviderTest() { OpenFeatureAPI api = new OpenFeatureAPI(); - api.setProviderAndWait("client1", new DoSomethingProvider()); - api.setProviderAndWait("client2", new NoOpProvider()); + var provider1 = TestProvider.builder().initsToReady(); + var provider2 = TestProvider.builder().initsToReady(); + + api.setProviderAndWait("client1", provider1); + api.setProviderAndWait("client2", provider2); Client c1 = api.getClient("client1"); Client c2 = api.getClient("client2"); - assertTrue(c1.getBooleanValue("test", false)); - assertFalse(c2.getBooleanValue("test", false)); + c1.getBooleanValue("test", false); + c2.getBooleanValue("test", false); + + assertEquals(1, provider1.getFlagEvaluations().size()); + assertEquals(1, provider2.getFlagEvaluations().size()); } } diff --git a/src/test/java/dev/openfeature/sdk/DeveloperExperienceTest.java b/src/test/java/dev/openfeature/sdk/DeveloperExperienceTest.java index c954c8b19..19108bde5 100644 --- a/src/test/java/dev/openfeature/sdk/DeveloperExperienceTest.java +++ b/src/test/java/dev/openfeature/sdk/DeveloperExperienceTest.java @@ -8,7 +8,7 @@ import static org.mockito.Mockito.verify; import dev.openfeature.sdk.fixtures.HookFixtures; -import dev.openfeature.sdk.testutils.TestEventsProvider; +import dev.openfeature.sdk.testutils.testProvider.TestProvider; import java.util.Arrays; import java.util.HashMap; import java.util.List; @@ -23,13 +23,13 @@ class DeveloperExperienceTest implements HookFixtures { private OpenFeatureAPI api; @BeforeEach - public void setUp() throws Exception { + void setUp() { api = new OpenFeatureAPI(); } @Test void simpleBooleanFlag() { - api.setProviderAndWait(new TestEventsProvider()); + api.setProviderAndWait(TestProvider.builder().initsToReady()); Client client = api.getClient(); Boolean retval = client.getBooleanValue(flagKey, false); assertFalse(retval); @@ -39,7 +39,7 @@ void simpleBooleanFlag() { void clientHooks() { Hook exampleHook = mockBooleanHook(); - api.setProviderAndWait(new TestEventsProvider()); + api.setProviderAndWait(TestProvider.builder().initsToReady()); Client client = api.getClient(); client.addHooks(exampleHook); Boolean retval = client.getBooleanValue(flagKey, false); @@ -52,7 +52,7 @@ void evalHooks() { Hook clientHook = mockBooleanHook(); Hook evalHook = mockBooleanHook(); - api.setProviderAndWait(new TestEventsProvider()); + api.setProviderAndWait(TestProvider.builder().initsToReady()); Client client = api.getClient(); client.addHooks(clientHook); Boolean retval = client.getBooleanValue( @@ -72,7 +72,7 @@ void evalHooks() { @Test void providingContext() { - api.setProviderAndWait(new TestEventsProvider()); + api.setProviderAndWait(TestProvider.builder().initsToReady()); Client client = api.getClient(); Map attributes = new HashMap<>(); List values = Arrays.asList(new Value(2), new Value(4)); @@ -88,7 +88,7 @@ void providingContext() { @Test void brokenProvider() { - api.setProviderAndWait(new AlwaysBrokenWithExceptionProvider()); + api.setProviderAndWait(TestProvider.builder().withExceptionOnFlagEvaluation()); Client client = api.getClient(); FlagEvaluationDetails retval = client.getBooleanDetails(flagKey, false); assertEquals(ErrorCode.FLAG_NOT_FOUND, retval.getErrorCode()); @@ -102,6 +102,8 @@ void providerLockedPerTransaction() { final String defaultValue = "string-value"; final OpenFeatureAPI api = new OpenFeatureAPI(); + var provider1 = TestProvider.builder().initsToReady(); + var provider2 = TestProvider.builder().initsToReady(); class MutatingHook implements Hook { @@ -110,31 +112,31 @@ class MutatingHook implements Hook { // change the provider during a before hook - this should not impact the evaluation in progress public Optional before(HookContext ctx, Map hints) { - api.setProviderAndWait(TestEventsProvider.newInitializedTestEventsProvider()); + api.setProviderAndWait(provider2); return Optional.empty(); } } final Client client = api.getClient(); - api.setProviderAndWait(new DoSomethingProvider()); + api.setProviderAndWait(provider1); api.addHooks(new MutatingHook()); // if provider is changed during an evaluation transaction it should proceed with the original provider - String doSomethingValue = client.getStringValue("val", defaultValue); - assertEquals(new StringBuilder(defaultValue).reverse().toString(), doSomethingValue); + client.getStringValue("val", defaultValue); + assertEquals(1, provider1.getFlagEvaluations().size()); api.clearHooks(); // subsequent evaluations should now use new provider set by hook - String noOpValue = client.getStringValue("val", defaultValue); - assertEquals(noOpValue, defaultValue); + client.getStringValue("val", defaultValue); + assertEquals(1, provider2.getFlagEvaluations().size()); } @Test void setProviderAndWaitShouldPutTheProviderInReadyState() { String domain = "domain"; - api.setProviderAndWait(domain, new TestEventsProvider()); + api.setProviderAndWait(domain, TestProvider.builder().initsToReady()); Client client = api.getClient(domain); assertThat(client.getProviderState()).isEqualTo(ProviderState.READY); } @@ -146,7 +148,7 @@ void setProviderAndWaitShouldPutTheProviderInReadyState() { @Test void shouldPutTheProviderInStateErrorAfterEmittingErrorEvent() { String domain = "domain"; - TestEventsProvider provider = new TestEventsProvider(); + var provider = TestProvider.builder().initsToReady(); api.setProviderAndWait(domain, provider); Client client = api.getClient(domain); assertThat(client.getProviderState()).isEqualTo(ProviderState.READY); @@ -161,7 +163,7 @@ void shouldPutTheProviderInStateErrorAfterEmittingErrorEvent() { @Test void shouldPutTheProviderInStateStaleAfterEmittingStaleEvent() { String domain = "domain"; - TestEventsProvider provider = new TestEventsProvider(); + var provider = TestProvider.builder().initsToReady(); api.setProviderAndWait(domain, provider); Client client = api.getClient(domain); assertThat(client.getProviderState()).isEqualTo(ProviderState.READY); @@ -176,7 +178,7 @@ void shouldPutTheProviderInStateStaleAfterEmittingStaleEvent() { @Test void shouldPutTheProviderInStateReadyAfterEmittingReadyEvent() { String domain = "domain"; - TestEventsProvider provider = new TestEventsProvider(); + var provider = TestProvider.builder().initsToReady(); api.setProviderAndWait(domain, provider); Client client = api.getClient(domain); assertThat(client.getProviderState()).isEqualTo(ProviderState.READY); diff --git a/src/test/java/dev/openfeature/sdk/DoSomethingProvider.java b/src/test/java/dev/openfeature/sdk/DoSomethingProvider.java deleted file mode 100644 index 0477a725b..000000000 --- a/src/test/java/dev/openfeature/sdk/DoSomethingProvider.java +++ /dev/null @@ -1,64 +0,0 @@ -package dev.openfeature.sdk; - -class DoSomethingProvider implements FeatureProvider { - - static final String name = "Something"; - // Flag evaluation metadata - static final ImmutableMetadata DEFAULT_METADATA = - ImmutableMetadata.builder().build(); - private ImmutableMetadata flagMetadata; - - public DoSomethingProvider() { - this.flagMetadata = DEFAULT_METADATA; - } - - public DoSomethingProvider(ImmutableMetadata flagMetadata) { - this.flagMetadata = flagMetadata; - } - - @Override - public Metadata getMetadata() { - return () -> name; - } - - @Override - public ProviderEvaluation getBooleanEvaluation(String key, Boolean defaultValue, EvaluationContext ctx) { - return ProviderEvaluation.builder() - .value(!defaultValue) - .flagMetadata(flagMetadata) - .build(); - } - - @Override - public ProviderEvaluation getStringEvaluation(String key, String defaultValue, EvaluationContext ctx) { - return ProviderEvaluation.builder() - .value(new StringBuilder(defaultValue).reverse().toString()) - .flagMetadata(flagMetadata) - .build(); - } - - @Override - public ProviderEvaluation getIntegerEvaluation(String key, Integer defaultValue, EvaluationContext ctx) { - return ProviderEvaluation.builder() - .value(defaultValue * 100) - .flagMetadata(flagMetadata) - .build(); - } - - @Override - public ProviderEvaluation getDoubleEvaluation(String key, Double defaultValue, EvaluationContext ctx) { - return ProviderEvaluation.builder() - .value(defaultValue * 100) - .flagMetadata(flagMetadata) - .build(); - } - - @Override - public ProviderEvaluation getObjectEvaluation( - String key, Value defaultValue, EvaluationContext invocationContext) { - return ProviderEvaluation.builder() - .value(null) - .flagMetadata(flagMetadata) - .build(); - } -} diff --git a/src/test/java/dev/openfeature/sdk/EventsTest.java b/src/test/java/dev/openfeature/sdk/EventsTest.java index b232f1177..b3cd2a05d 100644 --- a/src/test/java/dev/openfeature/sdk/EventsTest.java +++ b/src/test/java/dev/openfeature/sdk/EventsTest.java @@ -4,9 +4,14 @@ import static org.awaitility.Awaitility.await; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.argThat; -import static org.mockito.Mockito.*; - -import dev.openfeature.sdk.testutils.TestEventsProvider; +import static org.mockito.Mockito.after; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.timeout; +import static org.mockito.Mockito.verify; + +import dev.openfeature.sdk.testutils.testProvider.TestProvider; import java.util.Arrays; import java.util.List; import java.util.function.Consumer; @@ -49,7 +54,8 @@ void apiInitReady() { final Consumer handler = mockHandler(); final String name = "apiInitReady"; - TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); + var provider = + TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); api.onProviderReady(handler); api.setProviderAndWait(name, provider); verify(handler, timeout(TIMEOUT).atLeastOnce()).accept(any()); @@ -64,14 +70,15 @@ void apiInitReady() { void apiInitError() { final Consumer handler = mockHandler(); final String name = "apiInitError"; - final String errMessage = "oh no!"; - TestEventsProvider provider = new TestEventsProvider(INIT_DELAY, true, errMessage); + var provider = TestProvider.builder() + .withName(name) + .initWaitsFor(INIT_DELAY) + .initsToError(); api.onProviderError(handler); api.setProvider(name, provider); - verify(handler, timeout(TIMEOUT)).accept(argThat(details -> { - return errMessage.equals(details.getMessage()); - })); + verify(handler, timeout(TIMEOUT)) + .accept(argThat(details -> name.equals(details.getProviderName()))); } } @@ -89,11 +96,12 @@ void apiShouldPropagateEvents() { final Consumer handler = mockHandler(); final String name = "apiShouldPropagateEvents"; - TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); + var provider = + TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); api.setProviderAndWait(name, provider); api.onProviderConfigurationChanged(handler); - provider.mockEvent( + provider.emit( ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, EventDetails.builder().build()); verify(handler, timeout(TIMEOUT)).accept(any()); @@ -118,7 +126,8 @@ void apiShouldSupportAllEventTypes() { final Consumer handler3 = mockHandler(); final Consumer handler4 = mockHandler(); - TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); + var provider = + TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); api.setProviderAndWait(name, provider); api.onProviderReady(handler1); @@ -127,8 +136,7 @@ void apiShouldSupportAllEventTypes() { api.onProviderError(handler4); Arrays.asList(ProviderEvent.values()).stream().forEach(eventType -> { - provider.mockEvent( - eventType, ProviderEventDetails.builder().build()); + provider.emit(eventType, ProviderEventDetails.builder().build()); }); verify(handler1, timeout(TIMEOUT).atLeastOnce()).accept(any()); @@ -161,13 +169,14 @@ class ProviderEvents { void shouldPropagateDefaultAndAnon() { final Consumer handler = mockHandler(); - TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); + var provider = + TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); // set provider before getting a client api.setProviderAndWait(provider); Client client = api.getClient(); client.onProviderStale(handler); - provider.mockEvent( + provider.emit( ProviderEvent.PROVIDER_STALE, EventDetails.builder().build()); verify(handler, timeout(TIMEOUT)).accept(any()); } @@ -182,13 +191,14 @@ void shouldPropagateDefaultAndNamed() { final Consumer handler = mockHandler(); final String name = "shouldPropagateDefaultAndNamed"; - TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); + var provider = + TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); // set provider before getting a client api.setProviderAndWait(provider); Client client = api.getClient(name); client.onProviderStale(handler); - provider.mockEvent( + provider.emit( ProviderEvent.PROVIDER_STALE, EventDetails.builder().build()); verify(handler, timeout(TIMEOUT)).accept(any()); } @@ -213,7 +223,7 @@ void initReadyProviderBefore() { final Consumer handler = mockHandler(); final String name = "initReadyProviderBefore"; - TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); + var provider = TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); Client client = api.getClient(name); client.onProviderReady(handler); // set provider after getting a client @@ -232,7 +242,7 @@ void initReadyProviderAfter() { final Consumer handler = mockHandler(); final String name = "initReadyProviderAfter"; - TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); + var provider = TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); // set provider before getting a client api.setProviderAndWait(name, provider); Client client = api.getClient(name); @@ -250,16 +260,13 @@ void initReadyProviderAfter() { void initErrorProviderAfter() { final Consumer handler = mockHandler(); final String name = "initErrorProviderAfter"; - final String errMessage = "oh no!"; - TestEventsProvider provider = new TestEventsProvider(INIT_DELAY, true, errMessage); + var provider = TestProvider.builder().initWaitsFor(INIT_DELAY).initsToError(); Client client = api.getClient(name); client.onProviderError(handler); // set provider after getting a client api.setProvider(name, provider); - verify(handler, timeout(TIMEOUT)).accept(argThat(details -> { - return name.equals(details.getDomain()) && errMessage.equals(details.getMessage()); - })); + verify(handler, timeout(TIMEOUT)).accept(argThat(details -> name.equals(details.getDomain()))); } @Test @@ -271,15 +278,14 @@ void initErrorProviderAfter() { void initErrorProviderBefore() { final Consumer handler = mockHandler(); final String name = "initErrorProviderBefore"; - final String errMessage = "oh no!"; - TestEventsProvider provider = new TestEventsProvider(INIT_DELAY, true, errMessage); + var provider = TestProvider.builder().initWaitsFor(INIT_DELAY).initsToError(); // set provider after getting a client api.setProvider(name, provider); Client client = api.getClient(name); client.onProviderError(handler); verify(handler, timeout(TIMEOUT)).accept(argThat(details -> { - return name.equals(details.getDomain()) && errMessage.equals(details.getMessage()); + return name.equals(details.getDomain()); })); } } @@ -298,13 +304,13 @@ void shouldPropagateBefore() { final Consumer handler = mockHandler(); final String name = "shouldPropagateBefore"; - TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); + var provider = TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); // set provider before getting a client api.setProviderAndWait(name, provider); Client client = api.getClient(name); client.onProviderConfigurationChanged(handler); - provider.mockEvent( + provider.emit( ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, EventDetails.builder().build()); verify(handler, timeout(TIMEOUT)) @@ -322,13 +328,13 @@ void shouldPropagateAfter() { final Consumer handler = mockHandler(); final String name = "shouldPropagateAfter"; - TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); + var provider = TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); Client client = api.getClient(name); client.onProviderConfigurationChanged(handler); // set provider after getting a client api.setProviderAndWait(name, provider); - provider.mockEvent( + provider.emit( ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, EventDetails.builder().build()); verify(handler, timeout(TIMEOUT)) @@ -354,7 +360,7 @@ void shouldSupportAllEventTypes() { final Consumer handler3 = mockHandler(); final Consumer handler4 = mockHandler(); - TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); + var provider = TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); api.setProviderAndWait(name, provider); Client client = api.getClient(name); @@ -364,7 +370,7 @@ void shouldSupportAllEventTypes() { client.onProviderError(handler4); Arrays.asList(ProviderEvent.values()).stream().forEach(eventType -> { - provider.mockEvent(eventType, ProviderEventDetails.builder().build()); + provider.emit(eventType, ProviderEventDetails.builder().build()); }); ArgumentMatcher nameMatches = (EventDetails details) -> details.getDomain().equals(name); @@ -383,8 +389,8 @@ void shouldNotRunHandlers() { final Consumer handler2 = mockHandler(); final String name = "shouldNotRunHandlers"; - TestEventsProvider provider1 = new TestEventsProvider(INIT_DELAY); - TestEventsProvider provider2 = new TestEventsProvider(INIT_DELAY); + var provider1 = TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); + var provider2 = TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); api.setProviderAndWait(name, provider1); Client client = api.getClient(name); @@ -395,12 +401,17 @@ void shouldNotRunHandlers() { api.setProviderAndWait(name, provider2); // wait for the new provider to be ready and make sure things are cleaned up. - await().until(() -> provider1.isShutDown()); + await().until(provider1::isShutdown); // fire old event - provider1.mockEvent( - ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, - EventDetails.builder().build()); + try { + provider1.emit( + ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, + EventDetails.builder().build()); + } catch (Exception e) { + // ignore this exception. When the provider is shutdown, so is the underlying ExecutorService. If new tasks + // are scheduled, they will be rejected and an exception will be thrown. + } // a bit of waiting here, but we want to make sure these are indeed never // called. @@ -420,8 +431,9 @@ void otherClientHandlersShouldNotRun() { final Consumer handlerToRun = mockHandler(); final Consumer handlerNotToRun = mockHandler(); - TestEventsProvider provider1 = new TestEventsProvider(INIT_DELAY); - TestEventsProvider provider2 = new TestEventsProvider(INIT_DELAY); + var provider1 = TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); + var provider2 = TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); + api.setProviderAndWait(name1, provider1); api.setProviderAndWait(name2, provider2); @@ -431,7 +443,7 @@ void otherClientHandlersShouldNotRun() { client1.onProviderConfigurationChanged(handlerToRun); client2.onProviderConfigurationChanged(handlerNotToRun); - provider1.mockEvent( + provider1.emit( ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, ProviderEventDetails.builder().build()); @@ -449,8 +461,8 @@ void boundShouldNotRunWithDefault() { final String name = "boundShouldNotRunWithDefault"; final Consumer handlerNotToRun = mockHandler(); - TestEventsProvider namedProvider = new TestEventsProvider(INIT_DELAY); - TestEventsProvider defaultProvider = new TestEventsProvider(INIT_DELAY); + var namedProvider = TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); + var defaultProvider = TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); api.setProviderAndWait(defaultProvider); Client client = api.getClient(name); @@ -458,10 +470,10 @@ void boundShouldNotRunWithDefault() { api.setProviderAndWait(name, namedProvider); // await the new provider to make sure the old one is shut down - await().until(() -> namedProvider.getState().equals(ProviderState.READY)); + await().until(() -> ProviderState.READY.equals(client.getProviderState())); // fire event on default provider - defaultProvider.mockEvent( + defaultProvider.emit( ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, ProviderEventDetails.builder().build()); @@ -479,17 +491,17 @@ void unboundShouldRunWithDefault() { final String name = "unboundShouldRunWithDefault"; final Consumer handlerToRun = mockHandler(); - TestEventsProvider defaultProvider = new TestEventsProvider(INIT_DELAY); + var defaultProvider = TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); api.setProviderAndWait(defaultProvider); Client client = api.getClient(name); client.onProviderConfigurationChanged(handlerToRun); // await the new provider to make sure the old one is shut down - await().until(() -> defaultProvider.getState().equals(ProviderState.READY)); + await().until(() -> ProviderState.READY.equals(client.getProviderState())); // fire event on default provider - defaultProvider.mockEvent( + defaultProvider.emit( ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, ProviderEventDetails.builder().build()); @@ -509,7 +521,7 @@ void handlersRunIfOneThrows() { final Consumer nextHandler = mockHandler(); final Consumer lastHandler = mockHandler(); - TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); + var provider = TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); api.setProviderAndWait(name, provider); Client client1 = api.getClient(name); @@ -518,7 +530,7 @@ void handlersRunIfOneThrows() { client1.onProviderConfigurationChanged(nextHandler); client1.onProviderConfigurationChanged(lastHandler); - provider.mockEvent( + provider.emit( ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, ProviderEventDetails.builder().build()); verify(errorHandler, timeout(TIMEOUT)).accept(any()); @@ -537,7 +549,7 @@ void shouldHaveAllProperties() { final Consumer handler2 = mockHandler(); final String name = "shouldHaveAllProperties"; - TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); + var provider = TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); api.setProviderAndWait(name, provider); Client client = api.getClient(name); @@ -555,7 +567,7 @@ void shouldHaveAllProperties() { .message(message) .build(); - provider.mockEvent(ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, details); + provider.emit(ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, details); // both global and client handler should have all the fields. verify(handler1, timeout(TIMEOUT)).accept(argThat((EventDetails eventDetails) -> { @@ -582,7 +594,7 @@ void matchingReadyEventsMustRunImmediately() { final Consumer handler = mockHandler(); // provider which is already ready - TestEventsProvider provider = new TestEventsProvider(); + var provider = TestProvider.builder().initsToReady(); api.setProviderAndWait(name, provider); // should run even thought handler was added after ready @@ -601,7 +613,7 @@ void matchingStaleEventsMustRunImmediately() { final Consumer handler = mockHandler(); // provider which is already stale - TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); + var provider = TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); Client client = api.getClient(name); api.setProviderAndWait(name, provider); provider.emitProviderStale(ProviderEventDetails.builder().build()).await(); @@ -622,7 +634,7 @@ void matchingErrorEventsMustRunImmediately() { final Consumer handler = mockHandler(); // provider which is already in error - TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); + var provider = TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); Client client = api.getClient(name); api.setProviderAndWait(name, provider); provider.emitProviderError(ProviderEventDetails.builder().build()).await(); @@ -641,14 +653,14 @@ void mustPersistAcrossChanges() { final String name = "mustPersistAcrossChanges"; final Consumer handler = mockHandler(); - TestEventsProvider provider1 = new TestEventsProvider(INIT_DELAY); - TestEventsProvider provider2 = new TestEventsProvider(INIT_DELAY); + var provider1 = TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); + var provider2 = TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); api.setProviderAndWait(name, provider1); Client client = api.getClient(name); client.onProviderConfigurationChanged(handler); - provider1.mockEvent( + provider1.emit( ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, ProviderEventDetails.builder().build()); ArgumentMatcher nameMatches = @@ -661,7 +673,7 @@ void mustPersistAcrossChanges() { // verify that with the new provider under the same name, the handler is called // again. - provider2.mockEvent( + provider2.emit( ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, ProviderEventDetails.builder().build()); verify(handler, timeout(TIMEOUT).times(2)).accept(argThat(nameMatches)); @@ -680,7 +692,7 @@ void removedEventsShouldNotRun() { final Consumer handler1 = mockHandler(); final Consumer handler2 = mockHandler(); - TestEventsProvider provider = new TestEventsProvider(INIT_DELAY); + var provider = TestProvider.builder().initWaitsFor(INIT_DELAY).initsToReady(); api.setProviderAndWait(name, provider); Client client = api.getClient(name); @@ -692,7 +704,7 @@ void removedEventsShouldNotRun() { client.removeHandler(ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, handler2); // emit event - provider.mockEvent( + provider.emit( ProviderEvent.PROVIDER_CONFIGURATION_CHANGED, ProviderEventDetails.builder().build()); diff --git a/src/test/java/dev/openfeature/sdk/FatalErrorProvider.java b/src/test/java/dev/openfeature/sdk/FatalErrorProvider.java deleted file mode 100644 index 9ebd24758..000000000 --- a/src/test/java/dev/openfeature/sdk/FatalErrorProvider.java +++ /dev/null @@ -1,45 +0,0 @@ -package dev.openfeature.sdk; - -import dev.openfeature.sdk.exceptions.FatalError; -import dev.openfeature.sdk.exceptions.GeneralError; - -public class FatalErrorProvider implements FeatureProvider { - - private final String name = "fatal"; - - @Override - public Metadata getMetadata() { - return () -> name; - } - - @Override - public void initialize(EvaluationContext evaluationContext) throws Exception { - throw new FatalError(); // throw a fatal error on startup (this will cause the SDK to short circuit evaluations) - } - - @Override - public ProviderEvaluation getBooleanEvaluation(String key, Boolean defaultValue, EvaluationContext ctx) { - throw new GeneralError(TestConstants.BROKEN_MESSAGE); - } - - @Override - public ProviderEvaluation getStringEvaluation(String key, String defaultValue, EvaluationContext ctx) { - throw new GeneralError(TestConstants.BROKEN_MESSAGE); - } - - @Override - public ProviderEvaluation getIntegerEvaluation(String key, Integer defaultValue, EvaluationContext ctx) { - throw new GeneralError(TestConstants.BROKEN_MESSAGE); - } - - @Override - public ProviderEvaluation getDoubleEvaluation(String key, Double defaultValue, EvaluationContext ctx) { - throw new GeneralError(TestConstants.BROKEN_MESSAGE); - } - - @Override - public ProviderEvaluation getObjectEvaluation( - String key, Value defaultValue, EvaluationContext invocationContext) { - throw new GeneralError(TestConstants.BROKEN_MESSAGE); - } -} diff --git a/src/test/java/dev/openfeature/sdk/FlagEvaluationSpecTest.java b/src/test/java/dev/openfeature/sdk/FlagEvaluationSpecTest.java index 3b02b172d..82aa4e3cc 100644 --- a/src/test/java/dev/openfeature/sdk/FlagEvaluationSpecTest.java +++ b/src/test/java/dev/openfeature/sdk/FlagEvaluationSpecTest.java @@ -1,15 +1,24 @@ package dev.openfeature.sdk; -import static dev.openfeature.sdk.DoSomethingProvider.DEFAULT_METADATA; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.argThat; -import static org.mockito.Mockito.*; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import dev.openfeature.sdk.e2e.Flag; import dev.openfeature.sdk.exceptions.GeneralError; import dev.openfeature.sdk.fixtures.HookFixtures; -import dev.openfeature.sdk.testutils.TestEventsProvider; +import dev.openfeature.sdk.testutils.testProvider.TestProvider; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -34,7 +43,7 @@ private Client _client() { @SneakyThrows private Client _initializedClient() { - TestEventsProvider provider = new TestEventsProvider(); + var provider = TestProvider.builder().initsToReady(); provider.initialize(null); api.setProviderAndWait(provider); return api.getClient(); @@ -74,12 +83,12 @@ void provider() { "The API SHOULD provide functions to set a provider and wait for the initialize function to return or throw.") @Test void providerAndWait() { - FeatureProvider provider = new TestEventsProvider(500); + var provider = TestProvider.builder().initWaitsFor(500).initsToReady(); api.setProviderAndWait(provider); Client client = api.getClient(); assertThat(client.getProviderState()).isEqualTo(ProviderState.READY); - provider = new TestEventsProvider(500); + provider = TestProvider.builder().initWaitsFor(500).initsToReady(); String providerName = "providerAndWait"; api.setProviderAndWait(providerName, provider); Client client2 = api.getClient(providerName); @@ -93,10 +102,10 @@ void providerAndWait() { "The API SHOULD provide functions to set a provider and wait for the initialize function to return or throw.") @Test void providerAndWaitError() { - FeatureProvider provider1 = new TestEventsProvider(500, true, "fake error"); + var provider1 = TestProvider.builder().initWaitsFor(500).initsToError(); assertThrows(GeneralError.class, () -> api.setProviderAndWait(provider1)); - FeatureProvider provider2 = new TestEventsProvider(500, true, "fake error"); + var provider2 = TestProvider.builder().initWaitsFor(500).initsToError(); String providerName = "providerAndWaitError"; assertThrows(GeneralError.class, () -> api.setProviderAndWait(providerName, provider2)); } @@ -107,7 +116,7 @@ void providerAndWaitError() { "The provider SHOULD indicate an error if flag resolution is attempted before the provider is ready.") @Test void shouldReturnNotReadyIfNotInitialized() { - FeatureProvider provider = new TestEventsProvider(100); + var provider = TestProvider.builder().initWaitsFor(500).initsToReady(); String providerName = "shouldReturnNotReadyIfNotInitialized"; api.setProvider(providerName, provider); Client client = api.getClient(providerName); @@ -121,8 +130,9 @@ void shouldReturnNotReadyIfNotInitialized() { text = "The API MUST provide a function for retrieving the metadata field of the configured provider.") @Test void provider_metadata() { - api.setProviderAndWait(new DoSomethingProvider()); - assertThat(api.getProviderMetadata().getName()).isEqualTo(DoSomethingProvider.name); + var name = "name"; + api.setProviderAndWait(TestProvider.builder().withName(name).initsToReady()); + assertThat(api.getProviderMetadata().getName()).isEqualTo(name); } @Specification( @@ -183,57 +193,63 @@ void hookRegistration() { "The client SHOULD provide functions for floating-point numbers and integers, consistent with language idioms.") @Test void value_flags() { - api.setProviderAndWait(new DoSomethingProvider()); + api.setProviderAndWait(TestProvider.builder() + .withFlags( + new Flag(FlagValueType.BOOLEAN.name(), "boolean", true), + new Flag(FlagValueType.STRING.name(), "string", "default"), + new Flag(FlagValueType.INTEGER.name(), "int", 400), + new Flag(FlagValueType.DOUBLE.name(), "double", 40.0), + new Flag(FlagValueType.OBJECT.name(), "obj", new Value())) + .initsToReady()); Client c = api.getClient(); - String key = "key"; - assertEquals(true, c.getBooleanValue(key, false)); - assertEquals(true, c.getBooleanValue(key, false, new ImmutableContext())); + assertEquals(true, c.getBooleanValue("boolean", false)); + assertEquals(true, c.getBooleanValue("boolean", false, new ImmutableContext())); assertEquals( true, c.getBooleanValue( - key, + "boolean", false, new ImmutableContext(), FlagEvaluationOptions.builder().build())); - assertEquals("gnirts-ym", c.getStringValue(key, "my-string")); - assertEquals("gnirts-ym", c.getStringValue(key, "my-string", new ImmutableContext())); + assertEquals("default", c.getStringValue("string", "my-string")); + assertEquals("default", c.getStringValue("string", "my-string", new ImmutableContext())); assertEquals( - "gnirts-ym", + "default", c.getStringValue( - key, + "string", "my-string", new ImmutableContext(), FlagEvaluationOptions.builder().build())); - assertEquals(400, c.getIntegerValue(key, 4)); - assertEquals(400, c.getIntegerValue(key, 4, new ImmutableContext())); + assertEquals(400, c.getIntegerValue("int", 3)); + assertEquals(400, c.getIntegerValue("int", 3, new ImmutableContext())); assertEquals( 400, c.getIntegerValue( - key, + "int", 4, new ImmutableContext(), FlagEvaluationOptions.builder().build())); - assertEquals(40.0, c.getDoubleValue(key, .4)); - assertEquals(40.0, c.getDoubleValue(key, .4, new ImmutableContext())); + assertEquals(40.0, c.getDoubleValue("double", .4)); + assertEquals(40.0, c.getDoubleValue("double", .4, new ImmutableContext())); assertEquals( 40.0, c.getDoubleValue( - key, + "double", .4, new ImmutableContext(), FlagEvaluationOptions.builder().build())); - assertEquals(null, c.getObjectValue(key, new Value())); - assertEquals(null, c.getObjectValue(key, new Value(), new ImmutableContext())); + assertEquals(new Value(), c.getObjectValue("obj", new Value())); + assertEquals(new Value(), c.getObjectValue("obj", new Value(), new ImmutableContext())); assertEquals( - null, + new Value(), c.getObjectValue( - key, + "obj", new Value(), new ImmutableContext(), FlagEvaluationOptions.builder().build())); @@ -264,68 +280,80 @@ void value_flags() { "In cases of normal execution, the `evaluation details` structure's `reason` field MUST contain the value of the `reason` field in the `flag resolution` structure returned by the configured `provider`, if the field is set.") @Test void detail_flags() { - api.setProviderAndWait(new DoSomethingProvider()); + api.setProviderAndWait(TestProvider.builder() + .withFlags( + new Flag(FlagValueType.BOOLEAN.name(), "boolean", true), + new Flag(FlagValueType.STRING.name(), "string", "default"), + new Flag(FlagValueType.INTEGER.name(), "int", 400), + new Flag(FlagValueType.DOUBLE.name(), "double", 40.0), + new Flag(FlagValueType.OBJECT.name(), "obj", new Value())) + .initsToReady()); Client c = api.getClient(); - String key = "key"; FlagEvaluationDetails bd = FlagEvaluationDetails.builder() - .flagKey(key) - .value(false) - .variant(null) - .flagMetadata(DEFAULT_METADATA) + .flagKey("boolean") + .value(true) + .variant(TestProvider.DEFAULT_VARIANT) + .flagMetadata(ImmutableMetadata.EMPTY) + .reason(Reason.STATIC.name()) .build(); - assertEquals(bd, c.getBooleanDetails(key, true)); - assertEquals(bd, c.getBooleanDetails(key, true, new ImmutableContext())); + assertEquals(bd, c.getBooleanDetails("boolean", false)); + assertEquals(bd, c.getBooleanDetails("boolean", false, new ImmutableContext())); assertEquals( bd, c.getBooleanDetails( - key, - true, + "boolean", + false, new ImmutableContext(), FlagEvaluationOptions.builder().build())); FlagEvaluationDetails sd = FlagEvaluationDetails.builder() - .flagKey(key) - .value("tset") - .variant(null) - .flagMetadata(DEFAULT_METADATA) + .flagKey("string") + .value("default") + .variant(TestProvider.DEFAULT_VARIANT) + .flagMetadata(ImmutableMetadata.EMPTY) + .reason(Reason.STATIC.name()) .build(); - assertEquals(sd, c.getStringDetails(key, "test")); - assertEquals(sd, c.getStringDetails(key, "test", new ImmutableContext())); + assertEquals(sd, c.getStringDetails("string", "test")); + assertEquals(sd, c.getStringDetails("string", "test", new ImmutableContext())); assertEquals( sd, c.getStringDetails( - key, + "string", "test", new ImmutableContext(), FlagEvaluationOptions.builder().build())); FlagEvaluationDetails id = FlagEvaluationDetails.builder() - .flagKey(key) + .flagKey("int") .value(400) - .flagMetadata(DEFAULT_METADATA) + .flagMetadata(ImmutableMetadata.EMPTY) + .reason(Reason.STATIC.name()) + .variant(TestProvider.DEFAULT_VARIANT) .build(); - assertEquals(id, c.getIntegerDetails(key, 4)); - assertEquals(id, c.getIntegerDetails(key, 4, new ImmutableContext())); + assertEquals(id, c.getIntegerDetails("int", 4)); + assertEquals(id, c.getIntegerDetails("int", 4, new ImmutableContext())); assertEquals( id, c.getIntegerDetails( - key, + "int", 4, new ImmutableContext(), FlagEvaluationOptions.builder().build())); FlagEvaluationDetails dd = FlagEvaluationDetails.builder() - .flagKey(key) + .flagKey("double") .value(40.0) - .flagMetadata(DEFAULT_METADATA) + .flagMetadata(ImmutableMetadata.EMPTY) + .reason(Reason.STATIC.name()) + .variant(TestProvider.DEFAULT_VARIANT) .build(); - assertEquals(dd, c.getDoubleDetails(key, .4)); - assertEquals(dd, c.getDoubleDetails(key, .4, new ImmutableContext())); + assertEquals(dd, c.getDoubleDetails("double", .4)); + assertEquals(dd, c.getDoubleDetails("double", .4, new ImmutableContext())); assertEquals( dd, c.getDoubleDetails( - key, + "double", .4, new ImmutableContext(), FlagEvaluationOptions.builder().build())); @@ -371,7 +399,7 @@ void hooks() { "In cases of abnormal execution, the `evaluation details` structure's `error message` field **MAY** contain a string containing additional details about the nature of the error.") @Test void broken_provider() { - api.setProviderAndWait(new AlwaysBrokenWithExceptionProvider()); + api.setProviderAndWait(TestProvider.builder().withExceptionOnFlagEvaluation()); Client c = api.getClient(); boolean defaultValue = false; assertFalse(c.getBooleanValue("key", defaultValue)); @@ -400,7 +428,7 @@ void broken_provider() { "In cases of abnormal execution, the `evaluation details` structure's `error message` field **MAY** contain a string containing additional details about the nature of the error.") @Test void broken_provider_withDetails() throws InterruptedException { - api.setProviderAndWait(new AlwaysBrokenWithDetailsProvider()); + api.setProviderAndWait(TestProvider.builder().withExceptionOnFlagEvaluation()); Client c = api.getClient(); boolean defaultValue = false; assertFalse(c.getBooleanValue("key", defaultValue)); @@ -416,7 +444,7 @@ void broken_provider_withDetails() throws InterruptedException { text = "Methods, functions, or operations on the client SHOULD NOT write log messages.") @Test void log_on_error() throws NotImplementedException { - api.setProviderAndWait(new AlwaysBrokenWithExceptionProvider()); + api.setProviderAndWait(TestProvider.builder().withExceptionOnFlagEvaluation()); Client c = api.getClient(); FlagEvaluationDetails result = c.getBooleanDetails("test", false); @@ -435,7 +463,7 @@ void clientMetadata() { assertNull(c.getMetadata().getDomain()); String domainName = "test domain"; - api.setProviderAndWait(new AlwaysBrokenWithExceptionProvider()); + api.setProviderAndWait(TestProvider.builder().withExceptionOnFlagEvaluation()); Client c2 = api.getClient(domainName); assertEquals(domainName, c2.getMetadata().getName()); @@ -448,7 +476,7 @@ void clientMetadata() { "In cases of abnormal execution (network failure, unhandled error, etc) the reason field in the evaluation details SHOULD indicate an error.") @Test void reason_is_error_when_there_are_errors() { - api.setProviderAndWait(new AlwaysBrokenWithExceptionProvider()); + api.setProviderAndWait(TestProvider.builder().withExceptionOnFlagEvaluation()); Client c = api.getClient(); FlagEvaluationDetails result = c.getBooleanDetails("test", false); assertEquals(Reason.ERROR.toString(), result.getReason()); @@ -460,7 +488,7 @@ void reason_is_error_when_there_are_errors() { "If the flag metadata field in the flag resolution structure returned by the configured provider is set, the evaluation details structure's flag metadata field MUST contain that value. Otherwise, it MUST contain an empty record.") @Test void flag_metadata_passed() { - api.setProviderAndWait(new DoSomethingProvider(null)); + api.setProviderAndWait(TestProvider.builder().allowUnknownFlags().initsToReady()); Client c = api.getClient(); FlagEvaluationDetails result = c.getBooleanDetails("test", false); assertNotNull(result.getFlagMetadata()); @@ -471,7 +499,7 @@ void flag_metadata_passed() { void api_context() { String contextKey = "some-key"; String contextValue = "some-value"; - DoSomethingProvider provider = spy(new DoSomethingProvider()); + var provider = spy(TestProvider.builder().allowUnknownFlags().initsToReady()); api.setProviderAndWait(provider); Map attributes = new HashMap<>(); @@ -498,7 +526,7 @@ void api_context() { "Evaluation context MUST be merged in the order: API (global; lowest precedence) -> transaction -> client -> invocation -> before hooks (highest precedence), with duplicate values being overwritten.") @Test void multi_layer_context_merges_correctly() { - DoSomethingProvider provider = spy(new DoSomethingProvider()); + var provider = spy(TestProvider.builder().allowUnknownFlags().initsToReady()); api.setProviderAndWait(provider); TransactionContextPropagator transactionContextPropagator = new ThreadLocalTransactionContextPropagator(); api.setTransactionContextPropagator(transactionContextPropagator); @@ -686,7 +714,7 @@ public void after( text = "The API SHOULD have a method for setting a transaction context propagator.") @Test void setting_transaction_context_propagator() { - DoSomethingProvider provider = new DoSomethingProvider(); + var provider = spy(TestProvider.builder().initsToReady()); api.setProviderAndWait(provider); TransactionContextPropagator transactionContextPropagator = new ThreadLocalTransactionContextPropagator(); @@ -700,7 +728,7 @@ void setting_transaction_context_propagator() { "The API MUST have a method for setting the evaluation context of the transaction context propagator for the current transaction.") @Test void setting_transaction_context() { - DoSomethingProvider provider = new DoSomethingProvider(); + var provider = spy(TestProvider.builder().initsToReady()); api.setProviderAndWait(provider); TransactionContextPropagator transactionContextPropagator = new ThreadLocalTransactionContextPropagator(); diff --git a/src/test/java/dev/openfeature/sdk/HookSpecTest.java b/src/test/java/dev/openfeature/sdk/HookSpecTest.java index 56d88dfba..163007120 100644 --- a/src/test/java/dev/openfeature/sdk/HookSpecTest.java +++ b/src/test/java/dev/openfeature/sdk/HookSpecTest.java @@ -19,7 +19,7 @@ import dev.openfeature.sdk.exceptions.FlagNotFoundError; import dev.openfeature.sdk.fixtures.HookFixtures; -import dev.openfeature.sdk.testutils.TestEventsProvider; +import dev.openfeature.sdk.testutils.testProvider.TestProvider; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -176,7 +176,7 @@ void optional_properties() { @Test void before_runs_ahead_of_evaluation() { - api.setProviderAndWait(new AlwaysBrokenWithExceptionProvider()); + api.setProviderAndWait(TestProvider.builder().withExceptionOnFlagEvaluation()); Client client = api.getClient(); Hook evalHook = mockBooleanHook(); @@ -261,39 +261,41 @@ void error_hook_must_run_if_resolution_details_returns_an_error_code() { void hook_eval_order() { List evalOrder = new ArrayList<>(); - api.setProviderAndWait("evalOrder", new TestEventsProvider() { - public List getProviderHooks() { - return Collections.singletonList(new BooleanHook() { - - @Override - public Optional before(HookContext ctx, Map hints) { - evalOrder.add("provider before"); - return null; - } - - @Override - public void after( - HookContext ctx, - FlagEvaluationDetails details, - Map hints) { - evalOrder.add("provider after"); - } - - @Override - public void error(HookContext ctx, Exception error, Map hints) { - evalOrder.add("provider error"); - } - - @Override - public void finallyAfter( - HookContext ctx, - FlagEvaluationDetails details, - Map hints) { - evalOrder.add("provider finally"); - } - }); - } - }); + api.setProviderAndWait( + "evalOrder", + TestProvider.builder() + .withHook(new BooleanHook() { + + @Override + public Optional before( + HookContext ctx, Map hints) { + evalOrder.add("provider before"); + return null; + } + + @Override + public void after( + HookContext ctx, + FlagEvaluationDetails details, + Map hints) { + evalOrder.add("provider after"); + } + + @Override + public void error(HookContext ctx, Exception error, Map hints) { + evalOrder.add("provider error"); + } + + @Override + public void finallyAfter( + HookContext ctx, + FlagEvaluationDetails details, + Map hints) { + evalOrder.add("provider finally"); + } + }) + .allowUnknownFlags() + .initsToReady()); api.addHooks(new BooleanHook() { @Override public Optional before(HookContext ctx, Map hints) { @@ -412,7 +414,7 @@ void error_stops_before() { doThrow(RuntimeException.class).when(h).before(any(), any()); Hook h2 = mockBooleanHook(); - api.setProviderAndWait(new AlwaysBrokenWithExceptionProvider()); + api.setProviderAndWait(TestProvider.builder().withExceptionOnFlagEvaluation()); Client c = api.getClient(); c.getBooleanDetails( @@ -435,7 +437,7 @@ void error_stops_after() { doThrow(RuntimeException.class).when(h).after(any(), any(), any()); Hook h2 = mockBooleanHook(); - Client c = getClient(TestEventsProvider.newInitializedTestEventsProvider()); + Client c = getClient(TestProvider.builder().allowUnknownFlags().initsToReady()); c.getBooleanDetails( "key", @@ -540,7 +542,7 @@ void flag_eval_hook_order() { void error_hooks__before() { Hook hook = mockBooleanHook(); doThrow(RuntimeException.class).when(hook).before(any(), any()); - Client client = getClient(TestEventsProvider.newInitializedTestEventsProvider()); + Client client = getClient(TestProvider.builder().initsToReady()); Boolean value = client.getBooleanValue( "key", false, @@ -558,7 +560,7 @@ void error_hooks__before() { void error_hooks__after() { Hook hook = mockBooleanHook(); doThrow(RuntimeException.class).when(hook).after(any(), any(), any()); - Client client = getClient(TestEventsProvider.newInitializedTestEventsProvider()); + Client client = getClient(TestProvider.builder().allowUnknownFlags().initsToReady()); client.getBooleanValue( "key", false, @@ -573,7 +575,7 @@ void erroneous_flagResolution_setsAppropriateFieldsInFlagEvaluationDetails() { Hook hook = mockBooleanHook(); doThrow(RuntimeException.class).when(hook).after(any(), any(), any()); String flagKey = "test-flag-key"; - Client client = getClient(TestEventsProvider.newInitializedTestEventsProvider()); + Client client = getClient(TestProvider.builder().allowUnknownFlags().initsToReady()); client.getBooleanValue( flagKey, true, @@ -598,7 +600,7 @@ void erroneous_flagResolution_setsAppropriateFieldsInFlagEvaluationDetails() { @Test void shortCircuit_flagResolution_runsHooksWithAllFields() { String domain = "shortCircuit_flagResolution_setsAppropriateFieldsInFlagEvaluationDetails"; - api.setProvider(domain, new FatalErrorProvider()); + api.setProvider(domain, TestProvider.builder().initsToFatal()); Hook hook = mockBooleanHook(); String flagKey = "test-flag-key"; @@ -618,7 +620,7 @@ void shortCircuit_flagResolution_runsHooksWithAllFields() { void successful_flagResolution_setsAppropriateFieldsInFlagEvaluationDetails() { Hook hook = mockBooleanHook(); String flagKey = "test-flag-key"; - Client client = getClient(TestEventsProvider.newInitializedTestEventsProvider()); + Client client = getClient(TestProvider.builder().allowUnknownFlags().initsToReady()); client.getBooleanValue( flagKey, true, @@ -631,7 +633,7 @@ void successful_flagResolution_setsAppropriateFieldsInFlagEvaluationDetails() { FlagEvaluationDetails evaluationDetails = captor.getValue(); assertThat(evaluationDetails).isNotNull(); assertThat(evaluationDetails.getErrorCode()).isNull(); - assertThat(evaluationDetails.getReason()).isEqualTo("DEFAULT"); + assertThat(evaluationDetails.getReason()).isEqualTo(Reason.STATIC.name()); assertThat(evaluationDetails.getVariant()).isEqualTo("Passed in default"); assertThat(evaluationDetails.getFlagKey()).isEqualTo(flagKey); assertThat(evaluationDetails.getFlagMetadata()) @@ -779,7 +781,7 @@ void first_error_broken() { private Client getClient(FeatureProvider provider) { if (provider == null) { - api.setProviderAndWait(TestEventsProvider.newInitializedTestEventsProvider()); + api.setProviderAndWait(TestProvider.builder().initsToReady()); } else { api.setProviderAndWait(provider); } diff --git a/src/test/java/dev/openfeature/sdk/OpenFeatureAPITest.java b/src/test/java/dev/openfeature/sdk/OpenFeatureAPITest.java index 66fd06d55..2fdb4e3f0 100644 --- a/src/test/java/dev/openfeature/sdk/OpenFeatureAPITest.java +++ b/src/test/java/dev/openfeature/sdk/OpenFeatureAPITest.java @@ -8,9 +8,7 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -import dev.openfeature.sdk.providers.memory.InMemoryProvider; -import dev.openfeature.sdk.testutils.TestEventsProvider; -import java.util.Collections; +import dev.openfeature.sdk.testutils.testProvider.TestProvider; import java.util.HashMap; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -28,7 +26,7 @@ void setupTest() { @Test void namedProviderTest() { - FeatureProvider provider = new NoOpProvider(); + var provider = TestProvider.builder().initsToReady(); api.setProviderAndWait("namedProviderTest", provider); assertThat(provider.getMetadata().getName()) @@ -42,18 +40,19 @@ void namedProviderTest() { @Test void namedProviderOverwrittenTest() { String domain = "namedProviderOverwrittenTest"; - FeatureProvider provider1 = new NoOpProvider(); - FeatureProvider provider2 = new DoSomethingProvider(); + var provider1 = TestProvider.builder().withName("provider1").initsToReady(); + var provider2 = TestProvider.builder().withName("provider2").initsToReady(); api.setProviderAndWait(domain, provider1); api.setProviderAndWait(domain, provider2); - assertThat(api.getProvider(domain).getMetadata().getName()).isEqualTo(DoSomethingProvider.name); + assertThat(api.getProvider(domain).getMetadata().getName()) + .isEqualTo(provider2.getMetadata().getName()); } @Test void providerToMultipleNames() throws Exception { - FeatureProvider inMemAsEventingProvider = new InMemoryProvider(Collections.EMPTY_MAP); - FeatureProvider noOpAsNonEventingProvider = new NoOpProvider(); + var inMemAsEventingProvider = TestProvider.builder().initsToReady(); + var noOpAsNonEventingProvider = TestProvider.builder().initsToReady(); // register same provider for multiple names & as default provider api.setProviderAndWait(inMemAsEventingProvider); @@ -95,8 +94,8 @@ void setEvaluationContextShouldAllowChaining() { @Test void getStateReturnsTheStateOfTheAppropriateProvider() throws Exception { String domain = "namedProviderOverwrittenTest"; - FeatureProvider provider1 = new NoOpProvider(); - FeatureProvider provider2 = new TestEventsProvider(); + var provider1 = TestProvider.builder().initsToReady(); + var provider2 = TestProvider.builder().initsToReady(); api.setProviderAndWait(domain, provider1); api.setProviderAndWait(domain, provider2); diff --git a/src/test/java/dev/openfeature/sdk/OpenFeatureClientTest.java b/src/test/java/dev/openfeature/sdk/OpenFeatureClientTest.java index 88ebfaf9d..91509bd45 100644 --- a/src/test/java/dev/openfeature/sdk/OpenFeatureClientTest.java +++ b/src/test/java/dev/openfeature/sdk/OpenFeatureClientTest.java @@ -10,7 +10,7 @@ import dev.openfeature.sdk.exceptions.FatalError; import dev.openfeature.sdk.fixtures.HookFixtures; -import dev.openfeature.sdk.testutils.TestEventsProvider; +import dev.openfeature.sdk.testutils.testProvider.TestProvider; import java.util.HashMap; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -42,10 +42,11 @@ void reset_logs() { void shouldNotThrowExceptionIfHookHasDifferentTypeArgumentThanHookContext() { OpenFeatureAPI api = new OpenFeatureAPI(); api.setProviderAndWait( - "shouldNotThrowExceptionIfHookHasDifferentTypeArgumentThanHookContext", new DoSomethingProvider()); + "shouldNotThrowExceptionIfHookHasDifferentTypeArgumentThanHookContext", + TestProvider.builder().initsToReady()); Client client = api.getClient("shouldNotThrowExceptionIfHookHasDifferentTypeArgumentThanHookContext"); client.addHooks(mockBooleanHook(), mockStringHook()); - FlagEvaluationDetails actual = client.getBooleanDetails("feature key", Boolean.FALSE); + FlagEvaluationDetails actual = client.getBooleanDetails("feature key", Boolean.TRUE); assertThat(actual.getValue()).isTrue(); // I dislike this, but given the mocking tools available, there's no way that I know of to say "no errors were @@ -83,7 +84,7 @@ void setEvaluationContextShouldAllowChaining() { @Test @DisplayName("Should not call evaluation methods when the provider has state FATAL") void shouldNotCallEvaluationMethodsWhenProviderIsInFatalErrorState() { - FeatureProvider provider = new TestEventsProvider(100, true, "fake fatal", true); + var provider = TestProvider.builder().initWaitsFor(100).initsToFatal(); OpenFeatureAPI api = new OpenFeatureAPI(); Client client = api.getClient("shouldNotCallEvaluationMethodsWhenProviderIsInFatalErrorState"); @@ -98,13 +99,15 @@ void shouldNotCallEvaluationMethodsWhenProviderIsInFatalErrorState() { @Test @DisplayName("Should not call evaluation methods when the provider has state NOT_READY") void shouldNotCallEvaluationMethodsWhenProviderIsInNotReadyState() { - FeatureProvider provider = new TestEventsProvider(5000); + var awaitable = new Awaitable(); + var provider = TestProvider.builder().initWaitsFor(awaitable).initsToReady(); OpenFeatureAPI api = new OpenFeatureAPI(); api.setProvider("shouldNotCallEvaluationMethodsWhenProviderIsInNotReadyState", provider); Client client = api.getClient("shouldNotCallEvaluationMethodsWhenProviderIsInNotReadyState"); FlagEvaluationDetails details = client.getBooleanDetails("key", true); assertThat(details.getErrorCode()).isEqualTo(ErrorCode.PROVIDER_NOT_READY); + awaitable.wakeup(); } @ParameterizedTest @@ -112,13 +115,9 @@ void shouldNotCallEvaluationMethodsWhenProviderIsInNotReadyState() { @DisplayName("Should support usage of HookData with/without error") void shouldSupportUsageOfHookData(boolean isError) { OpenFeatureAPI api = new OpenFeatureAPI(); - FeatureProvider provider; - if (isError) { - provider = new AlwaysBrokenWithExceptionProvider(); - } else { - provider = new DoSomethingProvider(); - } - api.setProviderAndWait("shouldSupportUsageOfHookData", provider); + api.setProviderAndWait( + "shouldSupportUsageOfHookData", + TestProvider.builder().allowUnknownFlags(!isError).initsToReady()); var testHook = new TestHookWithData("test-data"); api.addHooks(testHook); diff --git a/src/test/java/dev/openfeature/sdk/e2e/Flag.java b/src/test/java/dev/openfeature/sdk/e2e/Flag.java index 2c4ffdb57..7e3a11c90 100644 --- a/src/test/java/dev/openfeature/sdk/e2e/Flag.java +++ b/src/test/java/dev/openfeature/sdk/e2e/Flag.java @@ -1,13 +1,21 @@ package dev.openfeature.sdk.e2e; +import dev.openfeature.sdk.ImmutableMetadata; + public class Flag { - public String name; - public Object defaultValue; - public String type; + public final String name; + public final Object defaultValue; + public final String type; + public final ImmutableMetadata flagMetadata; public Flag(String type, String name, Object defaultValue) { + this(type, name, defaultValue, ImmutableMetadata.EMPTY); + } + + public Flag(String type, String name, Object defaultValue, ImmutableMetadata flagMetadata) { this.name = name; this.defaultValue = defaultValue; this.type = type; + this.flagMetadata = flagMetadata; } } diff --git a/src/test/java/dev/openfeature/sdk/testutils/TestEventsProvider.java b/src/test/java/dev/openfeature/sdk/testutils/TestEventsProvider.java deleted file mode 100644 index 7cd2ea318..000000000 --- a/src/test/java/dev/openfeature/sdk/testutils/TestEventsProvider.java +++ /dev/null @@ -1,127 +0,0 @@ -package dev.openfeature.sdk.testutils; - -import dev.openfeature.sdk.EvaluationContext; -import dev.openfeature.sdk.EventProvider; -import dev.openfeature.sdk.Metadata; -import dev.openfeature.sdk.ProviderEvaluation; -import dev.openfeature.sdk.ProviderEvent; -import dev.openfeature.sdk.ProviderEventDetails; -import dev.openfeature.sdk.Reason; -import dev.openfeature.sdk.Value; -import dev.openfeature.sdk.exceptions.FatalError; -import dev.openfeature.sdk.exceptions.GeneralError; -import lombok.SneakyThrows; - -public class TestEventsProvider extends EventProvider { - public static final String PASSED_IN_DEFAULT = "Passed in default"; - - private boolean initError = false; - private String initErrorMessage; - private boolean shutDown = false; - private int initTimeoutMs = 0; - private String name = "test"; - private Metadata metadata = () -> name; - private boolean isFatalInitError = false; - - public TestEventsProvider() {} - - public TestEventsProvider(int initTimeoutMs) { - this.initTimeoutMs = initTimeoutMs; - } - - public TestEventsProvider(int initTimeoutMs, boolean initError, String initErrorMessage) { - this.initTimeoutMs = initTimeoutMs; - this.initError = initError; - this.initErrorMessage = initErrorMessage; - } - - public TestEventsProvider(int initTimeoutMs, boolean initError, String initErrorMessage, boolean fatal) { - this.initTimeoutMs = initTimeoutMs; - this.initError = initError; - this.initErrorMessage = initErrorMessage; - this.isFatalInitError = fatal; - } - - @SneakyThrows - public static TestEventsProvider newInitializedTestEventsProvider() { - TestEventsProvider provider = new TestEventsProvider(); - provider.initialize(null); - return provider; - } - - public void mockEvent(ProviderEvent event, ProviderEventDetails details) { - emit(event, details); - } - - public boolean isShutDown() { - return this.shutDown; - } - - @Override - public void shutdown() { - this.shutDown = true; - } - - @Override - public void initialize(EvaluationContext evaluationContext) throws Exception { - // wait half the TIMEOUT, otherwise some init/errors can be fired before we add handlers - Thread.sleep(initTimeoutMs); - if (this.initError) { - if (this.isFatalInitError) { - throw new FatalError(initErrorMessage); - } - throw new GeneralError(initErrorMessage); - } - } - - @Override - public Metadata getMetadata() { - return this.metadata; - } - - @Override - public ProviderEvaluation getBooleanEvaluation(String key, Boolean defaultValue, EvaluationContext ctx) { - return ProviderEvaluation.builder() - .value(defaultValue) - .variant(PASSED_IN_DEFAULT) - .reason(Reason.DEFAULT.toString()) - .build(); - } - - @Override - public ProviderEvaluation getStringEvaluation(String key, String defaultValue, EvaluationContext ctx) { - return ProviderEvaluation.builder() - .value(defaultValue) - .variant(PASSED_IN_DEFAULT) - .reason(Reason.DEFAULT.toString()) - .build(); - } - - @Override - public ProviderEvaluation getIntegerEvaluation(String key, Integer defaultValue, EvaluationContext ctx) { - return ProviderEvaluation.builder() - .value(defaultValue) - .variant(PASSED_IN_DEFAULT) - .reason(Reason.DEFAULT.toString()) - .build(); - } - - @Override - public ProviderEvaluation getDoubleEvaluation(String key, Double defaultValue, EvaluationContext ctx) { - return ProviderEvaluation.builder() - .value(defaultValue) - .variant(PASSED_IN_DEFAULT) - .reason(Reason.DEFAULT.toString()) - .build(); - } - - @Override - public ProviderEvaluation getObjectEvaluation( - String key, Value defaultValue, EvaluationContext invocationContext) { - return ProviderEvaluation.builder() - .value(defaultValue) - .variant(PASSED_IN_DEFAULT) - .reason(Reason.DEFAULT.toString()) - .build(); - } -} diff --git a/src/test/java/dev/openfeature/sdk/testutils/testProvider/FlagEvaluation.java b/src/test/java/dev/openfeature/sdk/testutils/testProvider/FlagEvaluation.java new file mode 100644 index 000000000..61860a050 --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/testutils/testProvider/FlagEvaluation.java @@ -0,0 +1,16 @@ +package dev.openfeature.sdk.testutils.testProvider; + +import dev.openfeature.sdk.EvaluationContext; +import dev.openfeature.sdk.FlagValueType; + +public class FlagEvaluation { + public final String flagKey; + public final FlagValueType flagType; + public final EvaluationContext evaluationContext; + + public FlagEvaluation(String flagKey, FlagValueType flagType, EvaluationContext evaluationContext) { + this.flagKey = flagKey; + this.flagType = flagType; + this.evaluationContext = evaluationContext; + } +} diff --git a/src/test/java/dev/openfeature/sdk/testutils/testProvider/TestProvider.java b/src/test/java/dev/openfeature/sdk/testutils/testProvider/TestProvider.java new file mode 100644 index 000000000..383ade483 --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/testutils/testProvider/TestProvider.java @@ -0,0 +1,396 @@ +package dev.openfeature.sdk.testutils.testProvider; + +import dev.openfeature.sdk.*; +import dev.openfeature.sdk.e2e.Flag; +import dev.openfeature.sdk.exceptions.FatalError; +import dev.openfeature.sdk.exceptions.FlagNotFoundError; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.atomic.AtomicBoolean; + +public class TestProvider extends EventProvider { + public static final String DEFAULT_VARIANT = "Passed in default"; + + private final String name; + private final List hooks; + private final int initDelay; + private final Awaitable initWaitsFor; + private final Map flags; + private final boolean fatalOnInit; + private final boolean errorOnInit; + private final boolean errorsOnFlagEvaluation; + private final ErrorCode errorCode; + private final String errorMessage; + private final RuntimeException throwable; + private final ConcurrentLinkedQueue flagEvaluations = new ConcurrentLinkedQueue<>(); + private final AtomicBoolean isShutdown = new AtomicBoolean(false); + private final boolean allowAnyFlag; + + private TestProvider( + String name, + List hooks, + int initDelay, + Awaitable initWaitsFor, + boolean allowAnyFlag, + Map flags, + boolean errorsOnFlagEvaluation, + boolean errorOnInit, + ErrorCode errorCode, + String errorMessage, + RuntimeException throwable, + boolean fatalOnInit) { + this.name = name == null ? "TestProvider" : name; + this.hooks = hooks; + this.initDelay = initDelay; + this.initWaitsFor = initWaitsFor; + this.allowAnyFlag = allowAnyFlag; + this.flags = flags; + this.errorsOnFlagEvaluation = errorsOnFlagEvaluation; + this.errorOnInit = errorOnInit; + this.errorCode = errorCode == null ? ErrorCode.GENERAL : errorCode; + this.errorMessage = errorMessage == null ? "Test error" : errorMessage; + this.throwable = throwable; + this.fatalOnInit = fatalOnInit; + } + + public List getFlagEvaluations() { + return new ArrayList<>(flagEvaluations); + } + + @Override + public List getProviderHooks() { + return hooks; + } + + @Override + public void initialize(EvaluationContext evaluationContext) throws Exception { + if (initWaitsFor != null) { + initWaitsFor.await(); + } else if (initDelay > 0) { + var end = System.currentTimeMillis() + initDelay; + long delta = initDelay; + while (delta > 0) { + try { + Thread.sleep(delta); + } catch (InterruptedException e) { + // ignore + } + delta = end - System.currentTimeMillis(); + } + } + + if (fatalOnInit) { + throw new FatalError("TestProvider is set to fatal state, thus will throw on init"); + } + if (errorOnInit) { + throw new RuntimeException("TestProvider is set to error state, thus will throw on init"); + } + } + + @Override + public void shutdown() { + super.shutdown(); + isShutdown.set(true); + } + + public boolean isShutdown() { + return isShutdown.get(); + } + + @Override + public Metadata getMetadata() { + return () -> name; + } + + private ProviderEvaluation getEvaluation( + String key, T defaultValue, FlagValueType flagType, Class clazz, EvaluationContext evaluationContext) { + flagEvaluations.add(new FlagEvaluation(key, flagType, evaluationContext)); + if (throwable != null) { + throw throwable; + } + var builder = ProviderEvaluation.builder(); + if (errorsOnFlagEvaluation) { + return builder.errorMessage(errorMessage).errorCode(errorCode).build(); + } + if (allowAnyFlag) { + return builder.reason(Reason.STATIC.name()) + .value(clazz.cast(defaultValue)) + .flagMetadata(ImmutableMetadata.EMPTY) + .variant(DEFAULT_VARIANT) + .build(); + } + var flag = flags.get(key); + if (flag == null) { + return builder.errorCode(ErrorCode.FLAG_NOT_FOUND) + .errorMessage("Flag not found") + .build(); + } + if (flagType.name().equals(flag.type)) { + return builder.reason(Reason.STATIC.name()) + .value(clazz.cast(flag.defaultValue)) + .flagMetadata(flag.flagMetadata) + .variant(DEFAULT_VARIANT) + .build(); + } + return builder.errorCode(ErrorCode.TYPE_MISMATCH) + .errorMessage("Flag type mismatch") + .flagMetadata(flag.flagMetadata) + .build(); + } + + @Override + public ProviderEvaluation getBooleanEvaluation(String key, Boolean defaultValue, EvaluationContext ctx) { + return getEvaluation(key, defaultValue, FlagValueType.BOOLEAN, Boolean.class, ctx); + } + + @Override + public ProviderEvaluation getStringEvaluation(String key, String defaultValue, EvaluationContext ctx) { + return getEvaluation(key, defaultValue, FlagValueType.STRING, String.class, ctx); + } + + @Override + public ProviderEvaluation getIntegerEvaluation(String key, Integer defaultValue, EvaluationContext ctx) { + return getEvaluation(key, defaultValue, FlagValueType.INTEGER, Integer.class, ctx); + } + + @Override + public ProviderEvaluation getDoubleEvaluation(String key, Double defaultValue, EvaluationContext ctx) { + return getEvaluation(key, defaultValue, FlagValueType.DOUBLE, Double.class, ctx); + } + + @Override + public ProviderEvaluation getObjectEvaluation(String key, Value defaultValue, EvaluationContext ctx) { + return getEvaluation(key, defaultValue, FlagValueType.OBJECT, Value.class, ctx); + } + + public interface PostInit { + TestProvider initsToReady(); + + TestProvider initsToError(boolean isError); + + default TestProvider initsToError() { + return initsToError(true); + } + + TestProvider initsToFatal(boolean isFatal); + + default TestProvider initsToFatal() { + return initsToFatal(true); + } + + TestProvider withExceptionOnFlagEvaluation(RuntimeException runtimeException); + + default TestProvider withExceptionOnFlagEvaluation() { + return withExceptionOnFlagEvaluation(new FlagNotFoundError(TestConstants.BROKEN_MESSAGE)); + } + } + + public interface InitConfig { + PostInit initWaitsFor(int millis); + + PostInit initWaitsFor(Awaitable awaitable); + } + + public interface WithFlags extends InitConfig, PostInit {} + + public interface FlagConfig { + FlagConfig withFlag(Flag flag); + + WithFlags withFlags(Flag... flags); + + WithFlags withFlags(Iterable flags); + + default WithFlags errorsOnFlagEvaluation() { + return errorsOnFlagEvaluation(true); + } + + WithFlags errorsOnFlagEvaluation(boolean error); + + WithFlags errorsOnFlagEvaluation(ErrorCode errorCode); + + WithFlags errorsOnFlagEvaluation(ErrorCode errorCode, String errorMessage); + + default WithFlags allowUnknownFlags() { + return allowUnknownFlags(true); + } + + WithFlags allowUnknownFlags(boolean allowEveryRequestedFlag); + } + + public interface WithHooks extends FlagConfig, WithFlags {} + + public interface HookConfig { + Builder withHook(Hook hook); + + WithHooks withHooks(Hook... hooks); + + WithHooks withHooks(Iterable hooks); + } + + public interface WithName extends WithHooks, HookConfig {} + + public interface NameConfig { + WithName withName(String name); + } + + public interface Builder extends WithName, NameConfig {} + + public static Builder builder() { + return new TestProviderBuilder(); + } + + public static class TestProviderBuilder implements Builder { + private final List hooks = new ArrayList<>(); + private final Map flags = new HashMap<>(); + private Awaitable initWaitsFor; + private int initDelay = 0; + private boolean errorsOnFlagEvaluation; + private ErrorCode errorCode; + private String errorMessage; + private RuntimeException runtimeException; + private boolean errorOnInit = false; + private boolean fatalOnInit = false; + private boolean allowAnyFlag = false; + private String name; + + @Override + public WithName withName(String name) { + this.name = name; + return this; + } + + @Override + public Builder withHook(Hook hook) { + this.hooks.add(hook); + return this; + } + + @Override + public WithHooks withHooks(Hook... hooks) { + for (int i = 0; i < hooks.length; i++) { + this.hooks.add(hooks[i]); + } + return this; + } + + @Override + public WithHooks withHooks(Iterable hooks) { + for (Hook hook : hooks) { + this.hooks.add(hook); + } + return this; + } + + @Override + public WithFlags errorsOnFlagEvaluation(boolean error) { + this.errorsOnFlagEvaluation = error; + return this; + } + + @Override + public WithFlags errorsOnFlagEvaluation(ErrorCode errorCode) { + this.errorsOnFlagEvaluation = true; + this.errorCode = errorCode; + return this; + } + + @Override + public WithFlags errorsOnFlagEvaluation(ErrorCode errorCode, String errorMessage) { + this.errorsOnFlagEvaluation = true; + this.errorCode = errorCode; + this.errorMessage = errorMessage; + return this; + } + + @Override + public WithFlags allowUnknownFlags(boolean allowEveryRequestedFlag) { + this.allowAnyFlag = allowEveryRequestedFlag; + return this; + } + + @Override + public FlagConfig withFlag(Flag flag) { + flags.put(flag.name, flag); + return this; + } + + @Override + public WithFlags withFlags(Flag... flags) { + for (Flag flag : flags) { + this.flags.put(flag.name, flag); + } + return this; + } + + @Override + public WithFlags withFlags(Iterable flags) { + for (Flag flag : flags) { + this.flags.put(flag.name, flag); + } + return this; + } + + @Override + public PostInit initWaitsFor(int millis) { + initDelay = millis; + initWaitsFor = null; + return this; + } + + @Override + public PostInit initWaitsFor(Awaitable awaitable) { + initDelay = 0; + initWaitsFor = awaitable; + return this; + } + + @Override + public TestProvider initsToReady() { + errorOnInit = false; + return build(); + } + + @Override + public TestProvider initsToError(boolean isError) { + this.errorOnInit = isError; + return build(); + } + + @Override + public TestProvider initsToError() { + errorOnInit = true; + return build(); + } + + @Override + public TestProvider initsToFatal(boolean isFatal) { + this.fatalOnInit = isFatal; + return build(); + } + + @Override + public TestProvider withExceptionOnFlagEvaluation(RuntimeException runtimeException) { + this.runtimeException = runtimeException; + return build(); + } + + private TestProvider build() { + return new TestProvider( + name, + hooks, + initDelay, + initWaitsFor, + allowAnyFlag, + flags, + errorsOnFlagEvaluation, + errorOnInit, + errorCode, + errorMessage, + runtimeException, + fatalOnInit); + } + } +} From ca9f1acb0c0a0a68a5cb49b5af3477c8f4abb1b7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 21 Oct 2025 01:56:21 +0000 Subject: [PATCH 339/391] chore(deps): update github/codeql-action digest to 9b0ac1c (#1681) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 8faba4042..90b7752f2 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@d88a5540c3fd916f4e15b7744d287a124278e065 + uses: github/codeql-action/init@9b0ac1cc3b2985145e276933b2b96f423f56e68b with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@d88a5540c3fd916f4e15b7744d287a124278e065 + uses: github/codeql-action/analyze@9b0ac1cc3b2985145e276933b2b96f423f56e68b diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index c65ca82a7..95c14288e 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@d88a5540c3fd916f4e15b7744d287a124278e065 + uses: github/codeql-action/init@9b0ac1cc3b2985145e276933b2b96f423f56e68b with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@d88a5540c3fd916f4e15b7744d287a124278e065 + uses: github/codeql-action/autobuild@9b0ac1cc3b2985145e276933b2b96f423f56e68b - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@d88a5540c3fd916f4e15b7744d287a124278e065 + uses: github/codeql-action/analyze@9b0ac1cc3b2985145e276933b2b96f423f56e68b From d16fe3d598fdcc0197532200e723e9abed63dcd6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 22 Oct 2025 08:28:09 +0200 Subject: [PATCH 340/391] chore(deps): update github/codeql-action digest to 0c5185d (#1683) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 90b7752f2..a6b3031a0 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@9b0ac1cc3b2985145e276933b2b96f423f56e68b + uses: github/codeql-action/init@0c5185d061ea8cb82b9c5cd84d2c51a7fc2d9d6b with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@9b0ac1cc3b2985145e276933b2b96f423f56e68b + uses: github/codeql-action/analyze@0c5185d061ea8cb82b9c5cd84d2c51a7fc2d9d6b diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 95c14288e..1f4b0465b 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@9b0ac1cc3b2985145e276933b2b96f423f56e68b + uses: github/codeql-action/init@0c5185d061ea8cb82b9c5cd84d2c51a7fc2d9d6b with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@9b0ac1cc3b2985145e276933b2b96f423f56e68b + uses: github/codeql-action/autobuild@0c5185d061ea8cb82b9c5cd84d2c51a7fc2d9d6b - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@9b0ac1cc3b2985145e276933b2b96f423f56e68b + uses: github/codeql-action/analyze@0c5185d061ea8cb82b9c5cd84d2c51a7fc2d9d6b From 9152b21599ccc07389d32c083dc9f2b99e5d130c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 22 Oct 2025 22:10:00 +0000 Subject: [PATCH 341/391] chore(deps): update github/codeql-action digest to 4264208 (#1684) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index a6b3031a0..5b0bb70c4 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@0c5185d061ea8cb82b9c5cd84d2c51a7fc2d9d6b + uses: github/codeql-action/init@42642085de2a94da10d5b87c0c7b9f51e147aa1f with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@0c5185d061ea8cb82b9c5cd84d2c51a7fc2d9d6b + uses: github/codeql-action/analyze@42642085de2a94da10d5b87c0c7b9f51e147aa1f diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 1f4b0465b..376f0bcb4 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@0c5185d061ea8cb82b9c5cd84d2c51a7fc2d9d6b + uses: github/codeql-action/init@42642085de2a94da10d5b87c0c7b9f51e147aa1f with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@0c5185d061ea8cb82b9c5cd84d2c51a7fc2d9d6b + uses: github/codeql-action/autobuild@42642085de2a94da10d5b87c0c7b9f51e147aa1f - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@0c5185d061ea8cb82b9c5cd84d2c51a7fc2d9d6b + uses: github/codeql-action/analyze@42642085de2a94da10d5b87c0c7b9f51e147aa1f From c57c8a5fb7e5384fbd5e7f34fe2bf65e36b40811 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 23 Oct 2025 20:46:35 +0000 Subject: [PATCH 342/391] chore(deps): update github/codeql-action digest to 9625890 (#1686) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 5b0bb70c4..33aa6f522 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@42642085de2a94da10d5b87c0c7b9f51e147aa1f + uses: github/codeql-action/init@9625890712c7f078b834b0cb549f00b374edb8ec with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@42642085de2a94da10d5b87c0c7b9f51e147aa1f + uses: github/codeql-action/analyze@9625890712c7f078b834b0cb549f00b374edb8ec diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 376f0bcb4..9be4d832d 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@42642085de2a94da10d5b87c0c7b9f51e147aa1f + uses: github/codeql-action/init@9625890712c7f078b834b0cb549f00b374edb8ec with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@42642085de2a94da10d5b87c0c7b9f51e147aa1f + uses: github/codeql-action/autobuild@9625890712c7f078b834b0cb549f00b374edb8ec - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@42642085de2a94da10d5b87c0c7b9f51e147aa1f + uses: github/codeql-action/analyze@9625890712c7f078b834b0cb549f00b374edb8ec From 9df27e42ce6472060467d4fdcbedb925a85457f5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 24 Oct 2025 17:18:23 +0200 Subject: [PATCH 343/391] chore(deps): update github/codeql-action digest to 956c567 (#1687) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 33aa6f522..aae959073 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@9625890712c7f078b834b0cb549f00b374edb8ec + uses: github/codeql-action/init@956c56734d31557279f2769a3368010c321bb452 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@9625890712c7f078b834b0cb549f00b374edb8ec + uses: github/codeql-action/analyze@956c56734d31557279f2769a3368010c321bb452 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 9be4d832d..e1799f1cf 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@9625890712c7f078b834b0cb549f00b374edb8ec + uses: github/codeql-action/init@956c56734d31557279f2769a3368010c321bb452 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@9625890712c7f078b834b0cb549f00b374edb8ec + uses: github/codeql-action/autobuild@956c56734d31557279f2769a3368010c321bb452 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@9625890712c7f078b834b0cb549f00b374edb8ec + uses: github/codeql-action/analyze@956c56734d31557279f2769a3368010c321bb452 From c948e9bd862b9180b7b84781bdf155587c0c3840 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 25 Oct 2025 01:29:04 +0000 Subject: [PATCH 344/391] chore(deps): update github/codeql-action digest to ae78991 (#1688) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index aae959073..f54c29fd6 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@956c56734d31557279f2769a3368010c321bb452 + uses: github/codeql-action/init@ae78991f558bb4195cb8a727cb6679c362b9cf24 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@956c56734d31557279f2769a3368010c321bb452 + uses: github/codeql-action/analyze@ae78991f558bb4195cb8a727cb6679c362b9cf24 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index e1799f1cf..d8af9e8ce 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@956c56734d31557279f2769a3368010c321bb452 + uses: github/codeql-action/init@ae78991f558bb4195cb8a727cb6679c362b9cf24 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@956c56734d31557279f2769a3368010c321bb452 + uses: github/codeql-action/autobuild@ae78991f558bb4195cb8a727cb6679c362b9cf24 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@956c56734d31557279f2769a3368010c321bb452 + uses: github/codeql-action/analyze@ae78991f558bb4195cb8a727cb6679c362b9cf24 From 3a58838b70b4c21312fcb182ac97f07a78d57dcd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 27 Oct 2025 02:08:03 +0000 Subject: [PATCH 345/391] chore(deps): update com.vmlens.version to v1.2.21 (#1689) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f16854c8c..950d0d36d 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ 11 ${maven.compiler.source} 5.20.0 - 1.2.20 + 1.2.21 **/e2e/*.java ${project.groupId}.${project.artifactId} From 61a59a15692bee0529242621ef0c15e2af1f6fdf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 27 Oct 2025 09:59:56 +0100 Subject: [PATCH 346/391] chore(deps): update dependency org.jacoco:jacoco-maven-plugin to v0.8.14 (#1669) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 950d0d36d..40cf7f7a0 100644 --- a/pom.xml +++ b/pom.xml @@ -402,7 +402,7 @@ org.jacoco jacoco-maven-plugin - 0.8.13 + 0.8.14 From a5dacf963ebc71024e22925ccc99d724681e98aa Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 27 Oct 2025 09:06:30 +0000 Subject: [PATCH 347/391] chore(deps): update dependency dev.cel:cel to v0.11.1 (#1682) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 40cf7f7a0..2e1d9f5b0 100644 --- a/pom.xml +++ b/pom.xml @@ -190,7 +190,7 @@ dev.cel cel - 0.11.0 + 0.11.1 test From cfcb20b06f17dd84ec532b96ab7fe647b93c7740 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 27 Oct 2025 23:12:29 +0000 Subject: [PATCH 348/391] chore(deps): update github/codeql-action digest to 8d77149 (#1690) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index f54c29fd6..7b6620ada 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@ae78991f558bb4195cb8a727cb6679c362b9cf24 + uses: github/codeql-action/init@8d77149e0c9e2199ac9cfc90c9e15116f5c69c48 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ae78991f558bb4195cb8a727cb6679c362b9cf24 + uses: github/codeql-action/analyze@8d77149e0c9e2199ac9cfc90c9e15116f5c69c48 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index d8af9e8ce..5d133a4d3 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@ae78991f558bb4195cb8a727cb6679c362b9cf24 + uses: github/codeql-action/init@8d77149e0c9e2199ac9cfc90c9e15116f5c69c48 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@ae78991f558bb4195cb8a727cb6679c362b9cf24 + uses: github/codeql-action/autobuild@8d77149e0c9e2199ac9cfc90c9e15116f5c69c48 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ae78991f558bb4195cb8a727cb6679c362b9cf24 + uses: github/codeql-action/analyze@8d77149e0c9e2199ac9cfc90c9e15116f5c69c48 From 46d71796611f080c29fdc3c954847c9160db718f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 28 Oct 2025 00:59:50 +0000 Subject: [PATCH 349/391] chore(deps): update actions/setup-java digest to de5a937 (#1691) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index d39980b71..93d176852 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -26,7 +26,7 @@ jobs: fetch-depth: 0 submodules: recursive - name: Set up JDK 17 - uses: actions/setup-java@ead9eaa3cfe0b0fc2fa749519ae09c3d4f4080b0 + uses: actions/setup-java@de5a937a1dc73fbc1a67d7d1aa4bebc1082f3190 with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 7b6620ada..0acc90492 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -25,7 +25,7 @@ jobs: submodules: recursive - name: Set up JDK ${{ matrix.build.java }} - uses: actions/setup-java@ead9eaa3cfe0b0fc2fa749519ae09c3d4f4080b0 + uses: actions/setup-java@de5a937a1dc73fbc1a67d7d1aa4bebc1082f3190 with: java-version: ${{ matrix.build.java }} distribution: 'temurin' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c07ff847e..901c9a529 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,7 +43,7 @@ jobs: submodules: recursive - name: Set up JDK 17 - uses: actions/setup-java@ead9eaa3cfe0b0fc2fa749519ae09c3d4f4080b0 + uses: actions/setup-java@de5a937a1dc73fbc1a67d7d1aa4bebc1082f3190 with: java-version: '17' distribution: 'temurin' From 08cc1ab561bd93528ba67e7113b40b0ae8c28cd0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 28 Oct 2025 06:47:42 +0000 Subject: [PATCH 350/391] fix(deps): update dependency io.cucumber:cucumber-bom to v7.31.0 (#1692) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2e1d9f5b0..4bc020f9a 100644 --- a/pom.xml +++ b/pom.xml @@ -235,7 +235,7 @@ io.cucumber cucumber-bom - 7.30.0 + 7.31.0 pom import From d2a2d6fc95e2fa8a3e6e9cc39545648faf6a0a08 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 29 Oct 2025 01:53:44 +0000 Subject: [PATCH 351/391] chore(deps): update github/codeql-action digest to ac9aeee (#1693) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 0acc90492..2d6d6e333 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@8d77149e0c9e2199ac9cfc90c9e15116f5c69c48 + uses: github/codeql-action/init@ac9aeee2261a2f9c74439210107de7657bd5ed42 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@8d77149e0c9e2199ac9cfc90c9e15116f5c69c48 + uses: github/codeql-action/analyze@ac9aeee2261a2f9c74439210107de7657bd5ed42 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 5d133a4d3..cbf642441 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@8d77149e0c9e2199ac9cfc90c9e15116f5c69c48 + uses: github/codeql-action/init@ac9aeee2261a2f9c74439210107de7657bd5ed42 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@8d77149e0c9e2199ac9cfc90c9e15116f5c69c48 + uses: github/codeql-action/autobuild@ac9aeee2261a2f9c74439210107de7657bd5ed42 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@8d77149e0c9e2199ac9cfc90c9e15116f5c69c48 + uses: github/codeql-action/analyze@ac9aeee2261a2f9c74439210107de7657bd5ed42 From 3df3d369f294925ee0b06823199279a2eacd64c3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Oct 2025 01:27:09 +0000 Subject: [PATCH 352/391] chore(deps): update github/codeql-action digest to 777daa0 (#1694) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 2d6d6e333..1c9b2d625 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@ac9aeee2261a2f9c74439210107de7657bd5ed42 + uses: github/codeql-action/init@777daa0c71818e7f377c8adc5415f74544c87142 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ac9aeee2261a2f9c74439210107de7657bd5ed42 + uses: github/codeql-action/analyze@777daa0c71818e7f377c8adc5415f74544c87142 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index cbf642441..043ea3d1c 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@ac9aeee2261a2f9c74439210107de7657bd5ed42 + uses: github/codeql-action/init@777daa0c71818e7f377c8adc5415f74544c87142 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@ac9aeee2261a2f9c74439210107de7657bd5ed42 + uses: github/codeql-action/autobuild@777daa0c71818e7f377c8adc5415f74544c87142 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ac9aeee2261a2f9c74439210107de7657bd5ed42 + uses: github/codeql-action/analyze@777daa0c71818e7f377c8adc5415f74544c87142 From f8eed4e9198692fa531cbe844cba3cb15eca7a9a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Oct 2025 12:20:53 +0100 Subject: [PATCH 353/391] chore(deps): update dependency com.puppycrawl.tools:checkstyle to v12 (#1665) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4bc020f9a..2c8773284 100644 --- a/pom.xml +++ b/pom.xml @@ -505,7 +505,7 @@ com.puppycrawl.tools checkstyle - 11.1.0 + 12.1.1 From 982bd99430f92182dfd8063df6e2587b80bebca4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 30 Oct 2025 12:31:40 +0100 Subject: [PATCH 354/391] chore(deps): update github/codeql-action digest to 514ff4d (#1695) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 1c9b2d625..6090b0c9e 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@777daa0c71818e7f377c8adc5415f74544c87142 + uses: github/codeql-action/init@514ff4d116ef04d9ffc8adb3da5abb07961cb990 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@777daa0c71818e7f377c8adc5415f74544c87142 + uses: github/codeql-action/analyze@514ff4d116ef04d9ffc8adb3da5abb07961cb990 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 043ea3d1c..9861715fc 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@777daa0c71818e7f377c8adc5415f74544c87142 + uses: github/codeql-action/init@514ff4d116ef04d9ffc8adb3da5abb07961cb990 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@777daa0c71818e7f377c8adc5415f74544c87142 + uses: github/codeql-action/autobuild@514ff4d116ef04d9ffc8adb3da5abb07961cb990 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@777daa0c71818e7f377c8adc5415f74544c87142 + uses: github/codeql-action/analyze@514ff4d116ef04d9ffc8adb3da5abb07961cb990 From a6943108ab26cb718bc8590d29fcbc34c2435350 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 31 Oct 2025 00:04:29 +0000 Subject: [PATCH 355/391] chore(deps): update github/codeql-action digest to 9bd8638 (#1696) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 6090b0c9e..47ed3e4ac 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@514ff4d116ef04d9ffc8adb3da5abb07961cb990 + uses: github/codeql-action/init@9bd86385763ccc9345d5b7648ea1b54401b24819 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@514ff4d116ef04d9ffc8adb3da5abb07961cb990 + uses: github/codeql-action/analyze@9bd86385763ccc9345d5b7648ea1b54401b24819 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 9861715fc..449b5bbd8 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@514ff4d116ef04d9ffc8adb3da5abb07961cb990 + uses: github/codeql-action/init@9bd86385763ccc9345d5b7648ea1b54401b24819 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@514ff4d116ef04d9ffc8adb3da5abb07961cb990 + uses: github/codeql-action/autobuild@9bd86385763ccc9345d5b7648ea1b54401b24819 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@514ff4d116ef04d9ffc8adb3da5abb07961cb990 + uses: github/codeql-action/analyze@9bd86385763ccc9345d5b7648ea1b54401b24819 From e473e9ebf0a8c341179d47ddc7c9dfbb01295e71 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 31 Oct 2025 02:58:16 +0000 Subject: [PATCH 356/391] fix(deps): update dependency com.fasterxml.jackson:jackson-bom to v2.20.1 (#1697) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2c8773284..5689d8307 100644 --- a/pom.xml +++ b/pom.xml @@ -227,7 +227,7 @@ com.fasterxml.jackson jackson-bom - 2.20.0 + 2.20.1 pom import From f6b4bb82e2b4e711175f06f52c857fa2ac72d9a4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 1 Nov 2025 03:31:25 +0000 Subject: [PATCH 357/391] chore(deps): update github/codeql-action digest to 338146c (#1698) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 47ed3e4ac..f50947421 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@9bd86385763ccc9345d5b7648ea1b54401b24819 + uses: github/codeql-action/init@338146ca93283a2901a142d408241096146019b5 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@9bd86385763ccc9345d5b7648ea1b54401b24819 + uses: github/codeql-action/analyze@338146ca93283a2901a142d408241096146019b5 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 449b5bbd8..babfcf39f 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@9bd86385763ccc9345d5b7648ea1b54401b24819 + uses: github/codeql-action/init@338146ca93283a2901a142d408241096146019b5 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@9bd86385763ccc9345d5b7648ea1b54401b24819 + uses: github/codeql-action/autobuild@338146ca93283a2901a142d408241096146019b5 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@9bd86385763ccc9345d5b7648ea1b54401b24819 + uses: github/codeql-action/analyze@338146ca93283a2901a142d408241096146019b5 From dcd037eba301e01f386e8f992c6a5d1cd1cda144 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 1 Nov 2025 05:09:41 +0000 Subject: [PATCH 358/391] fix(deps): update dependency org.junit:junit-bom to v6.0.1 (#1699) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5689d8307..9db61b5f3 100644 --- a/pom.xml +++ b/pom.xml @@ -243,7 +243,7 @@ org.junit junit-bom - 6.0.0 + 6.0.1 pom import From 53073a4870b10e50e545c14dd6082ee5becd4317 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 4 Nov 2025 01:26:37 +0000 Subject: [PATCH 359/391] chore(deps): update actions/checkout digest to 71cf226 (#1700) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/static-code-scanning.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 93d176852..549aadc84 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 + - uses: actions/checkout@71cf2267d89c5cb81562390fa70a37fa40b1305e with: fetch-depth: 0 submodules: recursive diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index f50947421..b05648219 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -19,7 +19,7 @@ jobs: runs-on: ${{ matrix.os}} steps: - name: Check out the code - uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 + uses: actions/checkout@71cf2267d89c5cb81562390fa70a37fa40b1305e with: fetch-depth: 0 submodules: recursive diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 901c9a529..a8ef20057 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,7 +37,7 @@ jobs: steps: - name: Checkout Repository - uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 + uses: actions/checkout@71cf2267d89c5cb81562390fa70a37fa40b1305e with: fetch-depth: 0 submodules: recursive diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index babfcf39f..dc1e49de2 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -29,7 +29,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 + uses: actions/checkout@71cf2267d89c5cb81562390fa70a37fa40b1305e # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL From 30c07d6ce30e9e6505b777ee34edd6541317a134 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 4 Nov 2025 05:48:31 +0000 Subject: [PATCH 360/391] chore(deps): update github/codeql-action digest to 97580d7 (#1701) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index b05648219..7487f45fe 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@338146ca93283a2901a142d408241096146019b5 + uses: github/codeql-action/init@97580d7533c1591e2e67e0a0d103da09b5c9b684 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@338146ca93283a2901a142d408241096146019b5 + uses: github/codeql-action/analyze@97580d7533c1591e2e67e0a0d103da09b5c9b684 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index dc1e49de2..c0dece840 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@338146ca93283a2901a142d408241096146019b5 + uses: github/codeql-action/init@97580d7533c1591e2e67e0a0d103da09b5c9b684 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@338146ca93283a2901a142d408241096146019b5 + uses: github/codeql-action/autobuild@97580d7533c1591e2e67e0a0d103da09b5c9b684 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@338146ca93283a2901a142d408241096146019b5 + uses: github/codeql-action/analyze@97580d7533c1591e2e67e0a0d103da09b5c9b684 From bb9a4ca8524b155e6a5091e288a3195a06d90a0a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 4 Nov 2025 17:18:33 +0100 Subject: [PATCH 361/391] chore(deps): update com.vmlens.version to v1.2.22 (#1703) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9db61b5f3..f92b0d255 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ 11 ${maven.compiler.source} 5.20.0 - 1.2.21 + 1.2.22 **/e2e/*.java ${project.groupId}.${project.artifactId} From 01a3669c2e050df54a3f51386d524968b3ef15d1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 4 Nov 2025 16:32:48 +0000 Subject: [PATCH 362/391] chore(deps): update github/codeql-action digest to 95b1867 (#1702) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 7487f45fe..44ab31930 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@97580d7533c1591e2e67e0a0d103da09b5c9b684 + uses: github/codeql-action/init@95b1867cf797beb28ce725a6f25268e2d3304672 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@97580d7533c1591e2e67e0a0d103da09b5c9b684 + uses: github/codeql-action/analyze@95b1867cf797beb28ce725a6f25268e2d3304672 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index c0dece840..23243984b 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@97580d7533c1591e2e67e0a0d103da09b5c9b684 + uses: github/codeql-action/init@95b1867cf797beb28ce725a6f25268e2d3304672 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@97580d7533c1591e2e67e0a0d103da09b5c9b684 + uses: github/codeql-action/autobuild@95b1867cf797beb28ce725a6f25268e2d3304672 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@97580d7533c1591e2e67e0a0d103da09b5c9b684 + uses: github/codeql-action/analyze@95b1867cf797beb28ce725a6f25268e2d3304672 From 3fda8b8f94c35c04433594463112df7348331f1c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 15:54:52 +0100 Subject: [PATCH 363/391] chore(deps): update github/codeql-action digest to e2ef519 (#1705) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 44ab31930..1c64239cb 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@95b1867cf797beb28ce725a6f25268e2d3304672 + uses: github/codeql-action/init@e2ef519c756a7fd93c8a8187d9539cab36eb5277 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@95b1867cf797beb28ce725a6f25268e2d3304672 + uses: github/codeql-action/analyze@e2ef519c756a7fd93c8a8187d9539cab36eb5277 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 23243984b..36ce0c67c 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@95b1867cf797beb28ce725a6f25268e2d3304672 + uses: github/codeql-action/init@e2ef519c756a7fd93c8a8187d9539cab36eb5277 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@95b1867cf797beb28ce725a6f25268e2d3304672 + uses: github/codeql-action/autobuild@e2ef519c756a7fd93c8a8187d9539cab36eb5277 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@95b1867cf797beb28ce725a6f25268e2d3304672 + uses: github/codeql-action/analyze@e2ef519c756a7fd93c8a8187d9539cab36eb5277 From e22eb0beef5ed87e143bac888ca66467c062ee1c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 22:01:19 +0000 Subject: [PATCH 364/391] chore(deps): update github/codeql-action digest to 320a6b6 (#1706) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 1c64239cb..e48fe685c 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@e2ef519c756a7fd93c8a8187d9539cab36eb5277 + uses: github/codeql-action/init@320a6b661b23adb447724a2e4805470acb076f83 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@e2ef519c756a7fd93c8a8187d9539cab36eb5277 + uses: github/codeql-action/analyze@320a6b661b23adb447724a2e4805470acb076f83 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 36ce0c67c..94deb613b 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@e2ef519c756a7fd93c8a8187d9539cab36eb5277 + uses: github/codeql-action/init@320a6b661b23adb447724a2e4805470acb076f83 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@e2ef519c756a7fd93c8a8187d9539cab36eb5277 + uses: github/codeql-action/autobuild@320a6b661b23adb447724a2e4805470acb076f83 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@e2ef519c756a7fd93c8a8187d9539cab36eb5277 + uses: github/codeql-action/analyze@320a6b661b23adb447724a2e4805470acb076f83 From 6a504689cd555747c5d005f4da3315b9a9ad0d50 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 16:00:00 +0100 Subject: [PATCH 365/391] chore(deps): update github/codeql-action digest to 71d0a56 (#1707) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index e48fe685c..2feb430d6 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@320a6b661b23adb447724a2e4805470acb076f83 + uses: github/codeql-action/init@71d0a56d4479a74c3dd8cf7a47d5661f11752db8 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@320a6b661b23adb447724a2e4805470acb076f83 + uses: github/codeql-action/analyze@71d0a56d4479a74c3dd8cf7a47d5661f11752db8 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 94deb613b..ca9539874 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@320a6b661b23adb447724a2e4805470acb076f83 + uses: github/codeql-action/init@71d0a56d4479a74c3dd8cf7a47d5661f11752db8 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@320a6b661b23adb447724a2e4805470acb076f83 + uses: github/codeql-action/autobuild@71d0a56d4479a74c3dd8cf7a47d5661f11752db8 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@320a6b661b23adb447724a2e4805470acb076f83 + uses: github/codeql-action/analyze@71d0a56d4479a74c3dd8cf7a47d5661f11752db8 From 9f43e800fd72b1b2037a9bbcb8f8c80af307bca1 Mon Sep 17 00:00:00 2001 From: jarebudev <23311805+jarebudev@users.noreply.github.com> Date: Fri, 7 Nov 2025 16:06:33 +0000 Subject: [PATCH 366/391] feat: use descriptive thread names (#1704) * added a configurable thread factory to allow naming of threads Signed-off-by: jarebudev <23311805+jarebudev@users.noreply.github.com> * tidy up Signed-off-by: jarebudev <23311805+jarebudev@users.noreply.github.com> --------- Signed-off-by: jarebudev <23311805+jarebudev@users.noreply.github.com> --- .../dev/openfeature/sdk/EventProvider.java | 4 +- .../dev/openfeature/sdk/EventSupport.java | 4 +- .../openfeature/sdk/ProviderRepository.java | 8 ++-- .../internal/ConfigurableThreadFactory.java | 43 +++++++++++++++++++ .../ConfigurableThreadFactoryTest.java | 42 ++++++++++++++++++ 5 files changed, 94 insertions(+), 7 deletions(-) create mode 100644 src/main/java/dev/openfeature/sdk/internal/ConfigurableThreadFactory.java create mode 100644 src/test/java/dev/openfeature/sdk/internal/ConfigurableThreadFactoryTest.java diff --git a/src/main/java/dev/openfeature/sdk/EventProvider.java b/src/main/java/dev/openfeature/sdk/EventProvider.java index 0d7e897c2..4ccac184e 100644 --- a/src/main/java/dev/openfeature/sdk/EventProvider.java +++ b/src/main/java/dev/openfeature/sdk/EventProvider.java @@ -1,5 +1,6 @@ package dev.openfeature.sdk; +import dev.openfeature.sdk.internal.ConfigurableThreadFactory; import dev.openfeature.sdk.internal.TriConsumer; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -21,7 +22,8 @@ @Slf4j public abstract class EventProvider implements FeatureProvider { private EventProviderListener eventProviderListener; - private final ExecutorService emitterExecutor = Executors.newCachedThreadPool(); + private final ExecutorService emitterExecutor = + Executors.newCachedThreadPool(new ConfigurableThreadFactory("openfeature-event-emitter-thread")); void setEventProviderListener(EventProviderListener eventProviderListener) { this.eventProviderListener = eventProviderListener; diff --git a/src/main/java/dev/openfeature/sdk/EventSupport.java b/src/main/java/dev/openfeature/sdk/EventSupport.java index 8396795bd..0b446c6b2 100644 --- a/src/main/java/dev/openfeature/sdk/EventSupport.java +++ b/src/main/java/dev/openfeature/sdk/EventSupport.java @@ -1,5 +1,6 @@ package dev.openfeature.sdk; +import dev.openfeature.sdk.internal.ConfigurableThreadFactory; import java.util.Collection; import java.util.Map; import java.util.Optional; @@ -26,7 +27,8 @@ class EventSupport { private static final String DEFAULT_CLIENT_UUID = UUID.randomUUID().toString(); private final Map handlerStores = new ConcurrentHashMap<>(); private final HandlerStore globalHandlerStore = new HandlerStore(); - private final ExecutorService taskExecutor = Executors.newCachedThreadPool(); + private final ExecutorService taskExecutor = + Executors.newCachedThreadPool(new ConfigurableThreadFactory("openfeature-event-handler-thread")); /** * Run all the event handlers associated with this domain. diff --git a/src/main/java/dev/openfeature/sdk/ProviderRepository.java b/src/main/java/dev/openfeature/sdk/ProviderRepository.java index ab024a750..147074a58 100644 --- a/src/main/java/dev/openfeature/sdk/ProviderRepository.java +++ b/src/main/java/dev/openfeature/sdk/ProviderRepository.java @@ -2,6 +2,7 @@ import dev.openfeature.sdk.exceptions.GeneralError; import dev.openfeature.sdk.exceptions.OpenFeatureError; +import dev.openfeature.sdk.internal.ConfigurableThreadFactory; import java.util.List; import java.util.Map; import java.util.Optional; @@ -22,11 +23,8 @@ class ProviderRepository { private final Map stateManagers = new ConcurrentHashMap<>(); private final AtomicReference defaultStateManger = new AtomicReference<>(new FeatureProviderStateManager(new NoOpProvider())); - private final ExecutorService taskExecutor = Executors.newCachedThreadPool(runnable -> { - final Thread thread = new Thread(runnable); - thread.setDaemon(true); - return thread; - }); + private final ExecutorService taskExecutor = + Executors.newCachedThreadPool(new ConfigurableThreadFactory("openfeature-provider-thread", true)); private final Object registerStateManagerLock = new Object(); private final OpenFeatureAPI openFeatureAPI; diff --git a/src/main/java/dev/openfeature/sdk/internal/ConfigurableThreadFactory.java b/src/main/java/dev/openfeature/sdk/internal/ConfigurableThreadFactory.java new file mode 100644 index 000000000..8d5e77db8 --- /dev/null +++ b/src/main/java/dev/openfeature/sdk/internal/ConfigurableThreadFactory.java @@ -0,0 +1,43 @@ +package dev.openfeature.sdk.internal; + +import java.util.concurrent.ThreadFactory; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * A configurable thread factory for internal use in the SDK. + * Allows daemon or non-daemon threads to be created with a custom name prefix. + */ +public final class ConfigurableThreadFactory implements ThreadFactory { + + private final AtomicInteger counter = new AtomicInteger(); + private final String namePrefix; + private final boolean daemon; + + /** + * {@link ConfigurableThreadFactory}'s constructor. + * + * @param namePrefix Prefix used for setting the new thread's name. + */ + public ConfigurableThreadFactory(String namePrefix) { + this(namePrefix, false); + } + + /** + * {@link ConfigurableThreadFactory}'s constructor. + * + * @param namePrefix Prefix used for setting the new thread's name. + * @param daemon Whether daemon or non-daemon threads will be created. + */ + public ConfigurableThreadFactory(String namePrefix, boolean daemon) { + this.namePrefix = namePrefix; + this.daemon = daemon; + } + + @Override + public Thread newThread(Runnable runnable) { + final Thread thread = new Thread(runnable); + thread.setDaemon(daemon); + thread.setName(namePrefix + "-" + counter.incrementAndGet()); + return thread; + } +} diff --git a/src/test/java/dev/openfeature/sdk/internal/ConfigurableThreadFactoryTest.java b/src/test/java/dev/openfeature/sdk/internal/ConfigurableThreadFactoryTest.java new file mode 100644 index 000000000..0de360ae6 --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/internal/ConfigurableThreadFactoryTest.java @@ -0,0 +1,42 @@ +package dev.openfeature.sdk.internal; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.jupiter.api.Test; + +class ConfigurableThreadFactoryTest { + + private static final String THREAD_NAME = "testthread"; + private final Runnable runnable = () -> {}; + + @Test + void verifyNewThreadHasNamePrefix() { + + var configurableThreadFactory = new ConfigurableThreadFactory(THREAD_NAME); + var thread = configurableThreadFactory.newThread(runnable); + + assertThat(thread.getName()).isEqualTo(THREAD_NAME + "-1"); + assertThat(thread.isDaemon()).isFalse(); + } + + @Test + void verifyNewThreadHasNamePrefixWithIncrement() { + + var configurableThreadFactory = new ConfigurableThreadFactory(THREAD_NAME); + var threadOne = configurableThreadFactory.newThread(runnable); + var threadTwo = configurableThreadFactory.newThread(runnable); + + assertThat(threadOne.getName()).isEqualTo(THREAD_NAME + "-1"); + assertThat(threadTwo.getName()).isEqualTo(THREAD_NAME + "-2"); + } + + @Test + void verifyNewDaemonThreadHasNamePrefix() { + + var configurableThreadFactory = new ConfigurableThreadFactory(THREAD_NAME, true); + var thread = configurableThreadFactory.newThread(runnable); + + assertThat(thread.getName()).isEqualTo(THREAD_NAME + "-1"); + assertThat(thread.isDaemon()).isTrue(); + } +} From 8c0eac6e968eda047b5348eb01233cdb7894d28c Mon Sep 17 00:00:00 2001 From: jarebudev <23311805+jarebudev@users.noreply.github.com> Date: Fri, 7 Nov 2025 16:34:36 +0000 Subject: [PATCH 367/391] chore: add additional unit tests to increase test coverage (#1708) * added missing unit tests to increase test coverage Signed-off-by: jarebudev <23311805+jarebudev@users.noreply.github.com> * applied gemini code review suggestion Signed-off-by: jarebudev <23311805+jarebudev@users.noreply.github.com> * Apply suggestion from @gemini-code-assist[bot] Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Todd Baert --------- Signed-off-by: jarebudev <23311805+jarebudev@users.noreply.github.com> Signed-off-by: Todd Baert Co-authored-by: Todd Baert Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- .../dev/openfeature/sdk/BooleanHookTest.java | 31 +++++++++++++++++++ .../dev/openfeature/sdk/DoubleHookTest.java | 31 +++++++++++++++++++ .../openfeature/sdk/ImmutableContextTest.java | 13 ++++++++ .../dev/openfeature/sdk/IntegerHookTest.java | 31 +++++++++++++++++++ .../dev/openfeature/sdk/ObjectHookTest.java | 31 +++++++++++++++++++ .../dev/openfeature/sdk/StringHookTest.java | 31 +++++++++++++++++++ .../sdk/fixtures/HookFixtures.java | 5 +++ 7 files changed, 173 insertions(+) create mode 100644 src/test/java/dev/openfeature/sdk/BooleanHookTest.java create mode 100644 src/test/java/dev/openfeature/sdk/DoubleHookTest.java create mode 100644 src/test/java/dev/openfeature/sdk/IntegerHookTest.java create mode 100644 src/test/java/dev/openfeature/sdk/ObjectHookTest.java create mode 100644 src/test/java/dev/openfeature/sdk/StringHookTest.java diff --git a/src/test/java/dev/openfeature/sdk/BooleanHookTest.java b/src/test/java/dev/openfeature/sdk/BooleanHookTest.java new file mode 100644 index 000000000..a38f3ff79 --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/BooleanHookTest.java @@ -0,0 +1,31 @@ +package dev.openfeature.sdk; + +import static org.assertj.core.api.Assertions.assertThat; + +import dev.openfeature.sdk.fixtures.HookFixtures; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +class BooleanHookTest implements HookFixtures { + + private Hook hook; + + @BeforeEach + void setupTest() { + hook = mockBooleanHook(); + } + + @Test + void verifyFlagValueTypeIsSupportedByHook() { + boolean hookSupported = hook.supportsFlagValueType(FlagValueType.BOOLEAN); + + assertThat(hookSupported).isTrue(); + } + + @Test + void verifyFlagValueTypeIsNotSupportedByHook() { + boolean hookSupported = hook.supportsFlagValueType(FlagValueType.INTEGER); + + assertThat(hookSupported).isFalse(); + } +} diff --git a/src/test/java/dev/openfeature/sdk/DoubleHookTest.java b/src/test/java/dev/openfeature/sdk/DoubleHookTest.java new file mode 100644 index 000000000..9b198ee83 --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/DoubleHookTest.java @@ -0,0 +1,31 @@ +package dev.openfeature.sdk; + +import static org.assertj.core.api.Assertions.assertThat; + +import dev.openfeature.sdk.fixtures.HookFixtures; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +class DoubleHookTest implements HookFixtures { + + private Hook hook; + + @BeforeEach + void setupTest() { + hook = mockDoubleHook(); + } + + @Test + void verifyFlagValueTypeIsSupportedByHook() { + boolean hookSupported = hook.supportsFlagValueType(FlagValueType.DOUBLE); + + assertThat(hookSupported).isTrue(); + } + + @Test + void verifyFlagValueTypeIsNotSupportedByHook() { + boolean hookSupported = hook.supportsFlagValueType(FlagValueType.STRING); + + assertThat(hookSupported).isFalse(); + } +} diff --git a/src/test/java/dev/openfeature/sdk/ImmutableContextTest.java b/src/test/java/dev/openfeature/sdk/ImmutableContextTest.java index 2b39be741..0b8a44d0d 100644 --- a/src/test/java/dev/openfeature/sdk/ImmutableContextTest.java +++ b/src/test/java/dev/openfeature/sdk/ImmutableContextTest.java @@ -135,6 +135,19 @@ void mergeShouldRetainItsSubkeysWhenOverridingContextHasNoTargetingKey() { assertArrayEquals(new Object[] {"key1_1"}, value.keySet().toArray()); } + @DisplayName("Merge should obtain keys from the overriding context when the existing context is empty") + @Test + void mergeShouldObtainKeysFromOverridingContextWhenExistingContextIsEmpty() { + HashMap attributes = new HashMap<>(); + attributes.put("key1", new Value("val1")); + attributes.put("key2", new Value("val2")); + + EvaluationContext ctx = new ImmutableContext(); + EvaluationContext overriding = new ImmutableContext(attributes); + EvaluationContext merge = ctx.merge(overriding); + assertEquals(new java.util.HashSet<>(java.util.Arrays.asList("key1", "key2")), merge.keySet()); + } + @DisplayName("Two different MutableContext objects with the different contents are not considered equal") @Test void unequalImmutableContextsAreNotEqual() { diff --git a/src/test/java/dev/openfeature/sdk/IntegerHookTest.java b/src/test/java/dev/openfeature/sdk/IntegerHookTest.java new file mode 100644 index 000000000..1dee4bd8f --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/IntegerHookTest.java @@ -0,0 +1,31 @@ +package dev.openfeature.sdk; + +import static org.assertj.core.api.Assertions.assertThat; + +import dev.openfeature.sdk.fixtures.HookFixtures; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +class IntegerHookTest implements HookFixtures { + + private Hook hook; + + @BeforeEach + void setupTest() { + hook = mockIntegerHook(); + } + + @Test + void verifyFlagValueTypeIsSupportedByHook() { + boolean hookSupported = hook.supportsFlagValueType(FlagValueType.INTEGER); + + assertThat(hookSupported).isTrue(); + } + + @Test + void verifyFlagValueTypeIsNotSupportedByHook() { + boolean hookSupported = hook.supportsFlagValueType(FlagValueType.STRING); + + assertThat(hookSupported).isFalse(); + } +} diff --git a/src/test/java/dev/openfeature/sdk/ObjectHookTest.java b/src/test/java/dev/openfeature/sdk/ObjectHookTest.java new file mode 100644 index 000000000..7e474c0bd --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/ObjectHookTest.java @@ -0,0 +1,31 @@ +package dev.openfeature.sdk; + +import static org.assertj.core.api.Assertions.assertThat; + +import dev.openfeature.sdk.fixtures.HookFixtures; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +class ObjectHookTest implements HookFixtures { + + private Hook hook; + + @BeforeEach + void setupTest() { + hook = mockObjectHook(); + } + + @Test + void verifyFlagValueTypeIsSupportedByHook() { + boolean hookSupported = hook.supportsFlagValueType(FlagValueType.OBJECT); + + assertThat(hookSupported).isTrue(); + } + + @Test + void verifyFlagValueTypeIsNotSupportedByHook() { + boolean hookSupported = hook.supportsFlagValueType(FlagValueType.INTEGER); + + assertThat(hookSupported).isFalse(); + } +} diff --git a/src/test/java/dev/openfeature/sdk/StringHookTest.java b/src/test/java/dev/openfeature/sdk/StringHookTest.java new file mode 100644 index 000000000..16c0cd41b --- /dev/null +++ b/src/test/java/dev/openfeature/sdk/StringHookTest.java @@ -0,0 +1,31 @@ +package dev.openfeature.sdk; + +import static org.assertj.core.api.Assertions.assertThat; + +import dev.openfeature.sdk.fixtures.HookFixtures; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +class StringHookTest implements HookFixtures { + + private Hook hook; + + @BeforeEach + void setupTest() { + hook = mockStringHook(); + } + + @Test + void verifyFlagValueTypeIsSupportedByHook() { + boolean hookSupported = hook.supportsFlagValueType(FlagValueType.STRING); + + assertThat(hookSupported).isTrue(); + } + + @Test + void verifyFlagValueTypeIsNotSupportedByHook() { + boolean hookSupported = hook.supportsFlagValueType(FlagValueType.INTEGER); + + assertThat(hookSupported).isFalse(); + } +} diff --git a/src/test/java/dev/openfeature/sdk/fixtures/HookFixtures.java b/src/test/java/dev/openfeature/sdk/fixtures/HookFixtures.java index b94e58a11..d2d51bac7 100644 --- a/src/test/java/dev/openfeature/sdk/fixtures/HookFixtures.java +++ b/src/test/java/dev/openfeature/sdk/fixtures/HookFixtures.java @@ -6,6 +6,7 @@ import dev.openfeature.sdk.DoubleHook; import dev.openfeature.sdk.Hook; import dev.openfeature.sdk.IntegerHook; +import dev.openfeature.sdk.ObjectHook; import dev.openfeature.sdk.StringHook; public interface HookFixtures { @@ -26,6 +27,10 @@ default Hook mockDoubleHook() { return spy(DoubleHook.class); } + default Hook mockObjectHook() { + return spy(ObjectHook.class); + } + default Hook mockGenericHook() { return spy(Hook.class); } From 480db81a98db4bb4384b1133a4d93653adc653cf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 02:01:07 +0000 Subject: [PATCH 368/391] chore(deps): update github/codeql-action digest to 04bd5c6 (#1709) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 2feb430d6..41956faa3 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@71d0a56d4479a74c3dd8cf7a47d5661f11752db8 + uses: github/codeql-action/init@04bd5c6aabdcaa5cccaf378a97ef5062b2061cd0 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@71d0a56d4479a74c3dd8cf7a47d5661f11752db8 + uses: github/codeql-action/analyze@04bd5c6aabdcaa5cccaf378a97ef5062b2061cd0 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index ca9539874..381792921 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@71d0a56d4479a74c3dd8cf7a47d5661f11752db8 + uses: github/codeql-action/init@04bd5c6aabdcaa5cccaf378a97ef5062b2061cd0 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@71d0a56d4479a74c3dd8cf7a47d5661f11752db8 + uses: github/codeql-action/autobuild@04bd5c6aabdcaa5cccaf378a97ef5062b2061cd0 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@71d0a56d4479a74c3dd8cf7a47d5661f11752db8 + uses: github/codeql-action/analyze@04bd5c6aabdcaa5cccaf378a97ef5062b2061cd0 From eefa5a772656568c2c5016b40ef66a4146d26e3f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 08:23:52 +0100 Subject: [PATCH 369/391] chore(deps): update amannn/action-semantic-pull-request digest to 069817c (#1710) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/lint-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml index 707faef76..a3c228ef4 100644 --- a/.github/workflows/lint-pr.yml +++ b/.github/workflows/lint-pr.yml @@ -18,6 +18,6 @@ jobs: name: Validate PR title runs-on: ubuntu-latest steps: - - uses: amannn/action-semantic-pull-request@e49f57ce06c1747542fce2243c7a98682384bc0e + - uses: amannn/action-semantic-pull-request@069817c298f23fab00a8f29a2e556a5eac0f6390 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 4f4a75ffe75b72fd9306ee8a983bb0a22e0198b4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 13:56:39 +0100 Subject: [PATCH 370/391] chore(deps): update dependency net.bytebuddy:byte-buddy to v1.18.0 (#1712) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f92b0d255..5d25dd926 100644 --- a/pom.xml +++ b/pom.xml @@ -212,7 +212,7 @@ net.bytebuddy byte-buddy - 1.17.8 + 1.18.0 test From ac22a7268fe824b47d9f7bb0d6ff0c38d4fd6a3b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 13:04:02 +0000 Subject: [PATCH 371/391] chore(deps): update github/codeql-action digest to 1d9f357 (#1711) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 41956faa3..71091995c 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@04bd5c6aabdcaa5cccaf378a97ef5062b2061cd0 + uses: github/codeql-action/init@1d9f357d018e5801d9d25e32220badc298aa1c17 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@04bd5c6aabdcaa5cccaf378a97ef5062b2061cd0 + uses: github/codeql-action/analyze@1d9f357d018e5801d9d25e32220badc298aa1c17 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 381792921..bdd83828c 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@04bd5c6aabdcaa5cccaf378a97ef5062b2061cd0 + uses: github/codeql-action/init@1d9f357d018e5801d9d25e32220badc298aa1c17 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@04bd5c6aabdcaa5cccaf378a97ef5062b2061cd0 + uses: github/codeql-action/autobuild@1d9f357d018e5801d9d25e32220badc298aa1c17 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@04bd5c6aabdcaa5cccaf378a97ef5062b2061cd0 + uses: github/codeql-action/analyze@1d9f357d018e5801d9d25e32220badc298aa1c17 From 82b169e505d4340344673fc77ceadff24fc5d534 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 15:20:55 +0100 Subject: [PATCH 372/391] chore(deps): update dependency net.bytebuddy:byte-buddy-agent to v1.18.0 (#1713) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5d25dd926..cb6622ce6 100644 --- a/pom.xml +++ b/pom.xml @@ -219,7 +219,7 @@ net.bytebuddy byte-buddy-agent - 1.17.8 + 1.18.0 test From 4880de05c6d45e4f0623cc97a9ef464be3342c23 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 13 Nov 2025 06:40:36 +0000 Subject: [PATCH 373/391] chore(deps): update github/codeql-action digest to ba454b8 (#1716) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 71091995c..4a1297c7d 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@1d9f357d018e5801d9d25e32220badc298aa1c17 + uses: github/codeql-action/init@ba454b8ab46733eb6145342877cd148270bb77ab with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@1d9f357d018e5801d9d25e32220badc298aa1c17 + uses: github/codeql-action/analyze@ba454b8ab46733eb6145342877cd148270bb77ab diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index bdd83828c..5e08f906a 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@1d9f357d018e5801d9d25e32220badc298aa1c17 + uses: github/codeql-action/init@ba454b8ab46733eb6145342877cd148270bb77ab with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@1d9f357d018e5801d9d25e32220badc298aa1c17 + uses: github/codeql-action/autobuild@ba454b8ab46733eb6145342877cd148270bb77ab - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@1d9f357d018e5801d9d25e32220badc298aa1c17 + uses: github/codeql-action/analyze@ba454b8ab46733eb6145342877cd148270bb77ab From 26b6132ef8d60c4f0245da94300bbdfe29748646 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 13 Nov 2025 21:39:04 +0000 Subject: [PATCH 374/391] chore(deps): update dependency com.puppycrawl.tools:checkstyle to v12.1.2 (#1714) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cb6622ce6..36b73204a 100644 --- a/pom.xml +++ b/pom.xml @@ -505,7 +505,7 @@ com.puppycrawl.tools checkstyle - 12.1.1 + 12.1.2 From 8850d4a87edf25c1fdb1f3ca20c8164a8a8a310f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 14 Nov 2025 05:41:45 +0000 Subject: [PATCH 375/391] chore(deps): update actions/setup-java digest to 6ba5449 (#1721) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 549aadc84..bd32c3c03 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -26,7 +26,7 @@ jobs: fetch-depth: 0 submodules: recursive - name: Set up JDK 17 - uses: actions/setup-java@de5a937a1dc73fbc1a67d7d1aa4bebc1082f3190 + uses: actions/setup-java@6ba5449b7dcda52941806a19f0cf626b6420191e with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 4a1297c7d..2c79dc56d 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -25,7 +25,7 @@ jobs: submodules: recursive - name: Set up JDK ${{ matrix.build.java }} - uses: actions/setup-java@de5a937a1dc73fbc1a67d7d1aa4bebc1082f3190 + uses: actions/setup-java@6ba5449b7dcda52941806a19f0cf626b6420191e with: java-version: ${{ matrix.build.java }} distribution: 'temurin' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a8ef20057..88cd73374 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,7 +43,7 @@ jobs: submodules: recursive - name: Set up JDK 17 - uses: actions/setup-java@de5a937a1dc73fbc1a67d7d1aa4bebc1082f3190 + uses: actions/setup-java@6ba5449b7dcda52941806a19f0cf626b6420191e with: java-version: '17' distribution: 'temurin' From 4e99dc53b58865f070c8af6b1c83c0091c14c812 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 14 Nov 2025 09:37:28 +0000 Subject: [PATCH 376/391] chore(deps): update dependency net.bytebuddy:byte-buddy to v1.18.1 (#1719) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 36b73204a..92ee42d0d 100644 --- a/pom.xml +++ b/pom.xml @@ -212,7 +212,7 @@ net.bytebuddy byte-buddy - 1.18.0 + 1.18.1 test From 34f7f234c7911ff16548f9fd0ad38c8d3319c668 Mon Sep 17 00:00:00 2001 From: Philipp Fehre Date: Fri, 14 Nov 2025 11:42:30 +0100 Subject: [PATCH 377/391] chore: remove fork configuration (#1685) * fix: remove fork configuration - Added previously to get around test issues, reuseForks false and forkCount 1 are no longer needed. - configure mockito as a javaagent to remove warning on newer Java versions Signed-off-by: Philipp Fehre * fix: move mockito argLine to all test plugins surefire, failsafe, vmlens all need mockito argline to work with Java 21+ to avoid deprecated dynamic java agent loading. Signed-off-by: Philipp Fehre --------- Signed-off-by: Philipp Fehre Co-authored-by: Michael Beemer Co-authored-by: Simon Schrottner --- pom.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 92ee42d0d..fc5d7abd6 100644 --- a/pom.xml +++ b/pom.xml @@ -20,6 +20,8 @@ false 11 + ${settings.localRepository}/org/mockito/mockito-core/${org.mockito.version}/mockito-core-${org.mockito.version}.jar + -javaagent:${org.mockito.jar} OpenFeature Java SDK @@ -300,10 +302,9 @@ maven-surefire-plugin 3.5.4 - 1 - false ${surefireArgLine} + ${org.mockito.agent.argline} --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED @@ -321,6 +322,7 @@ ${surefireArgLine} + ${org.mockito.agent.argline} @@ -364,6 +366,7 @@ **/*CT.java true + ${org.mockito.agent.argline} @@ -740,6 +743,7 @@ 3.5.4 + ${org.mockito.agent.argline} ${surefireArgLine} From 3e5977a7f67349e67790db786d018bdf91eee1a2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 14 Nov 2025 19:11:54 +0000 Subject: [PATCH 378/391] chore(deps): update github/codeql-action digest to 85f1517 (#1722) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 2c79dc56d..06a88361d 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@ba454b8ab46733eb6145342877cd148270bb77ab + uses: github/codeql-action/init@85f1517bb46a9e4d5e1ad15a6ef251b3124ba42b with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ba454b8ab46733eb6145342877cd148270bb77ab + uses: github/codeql-action/analyze@85f1517bb46a9e4d5e1ad15a6ef251b3124ba42b diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 5e08f906a..873321f54 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@ba454b8ab46733eb6145342877cd148270bb77ab + uses: github/codeql-action/init@85f1517bb46a9e4d5e1ad15a6ef251b3124ba42b with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@ba454b8ab46733eb6145342877cd148270bb77ab + uses: github/codeql-action/autobuild@85f1517bb46a9e4d5e1ad15a6ef251b3124ba42b - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ba454b8ab46733eb6145342877cd148270bb77ab + uses: github/codeql-action/analyze@85f1517bb46a9e4d5e1ad15a6ef251b3124ba42b From 43d926656d042b5fddb8d386fa603fbfa61ef42d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 15 Nov 2025 00:32:42 +0000 Subject: [PATCH 379/391] chore(deps): update dependency net.bytebuddy:byte-buddy-agent to v1.18.1 (#1720) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fc5d7abd6..1644709ce 100644 --- a/pom.xml +++ b/pom.xml @@ -221,7 +221,7 @@ net.bytebuddy byte-buddy-agent - 1.18.0 + 1.18.1 test From 6cdd8d062cfcb58204c4037c679b1da08b520589 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 15 Nov 2025 12:31:20 +0000 Subject: [PATCH 380/391] chore(deps): update dependency org.apache.maven.plugins:maven-jar-plugin to v3.5.0 (#1724) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1644709ce..5d643a938 100644 --- a/pom.xml +++ b/pom.xml @@ -331,7 +331,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.2 + 3.5.0 From 6ba620c6728c2daa6652ac791de0cc72a38393f5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 16 Nov 2025 21:38:36 +0000 Subject: [PATCH 381/391] chore(deps): update github/codeql-action digest to c1a2b73 (#1725) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 06a88361d..f0fbf5e62 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@85f1517bb46a9e4d5e1ad15a6ef251b3124ba42b + uses: github/codeql-action/init@c1a2b73420f0c02efb863cc6921c531bc1a54f4f with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@85f1517bb46a9e4d5e1ad15a6ef251b3124ba42b + uses: github/codeql-action/analyze@c1a2b73420f0c02efb863cc6921c531bc1a54f4f diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 873321f54..fee69ee36 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@85f1517bb46a9e4d5e1ad15a6ef251b3124ba42b + uses: github/codeql-action/init@c1a2b73420f0c02efb863cc6921c531bc1a54f4f with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@85f1517bb46a9e4d5e1ad15a6ef251b3124ba42b + uses: github/codeql-action/autobuild@c1a2b73420f0c02efb863cc6921c531bc1a54f4f - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@85f1517bb46a9e4d5e1ad15a6ef251b3124ba42b + uses: github/codeql-action/analyze@c1a2b73420f0c02efb863cc6921c531bc1a54f4f From 8621f39baf267c1092ab3ec9e8ad781898e59cdb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 18 Nov 2025 09:08:40 +0100 Subject: [PATCH 382/391] chore(deps): update github/codeql-action digest to ffa63f0 (#1727) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index f0fbf5e62..69618f9eb 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@c1a2b73420f0c02efb863cc6921c531bc1a54f4f + uses: github/codeql-action/init@ffa63f0dac7bf42e00061d972fa89c8c81288540 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@c1a2b73420f0c02efb863cc6921c531bc1a54f4f + uses: github/codeql-action/analyze@ffa63f0dac7bf42e00061d972fa89c8c81288540 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index fee69ee36..ff793f6d6 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@c1a2b73420f0c02efb863cc6921c531bc1a54f4f + uses: github/codeql-action/init@ffa63f0dac7bf42e00061d972fa89c8c81288540 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@c1a2b73420f0c02efb863cc6921c531bc1a54f4f + uses: github/codeql-action/autobuild@ffa63f0dac7bf42e00061d972fa89c8c81288540 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@c1a2b73420f0c02efb863cc6921c531bc1a54f4f + uses: github/codeql-action/analyze@ffa63f0dac7bf42e00061d972fa89c8c81288540 From bd70a3a147b25d17a7326a945475101f2c586a16 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 18 Nov 2025 08:13:36 +0000 Subject: [PATCH 383/391] chore(deps): update actions/setup-java digest to 66b9457 (#1726) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index bd32c3c03..0526844ee 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -26,7 +26,7 @@ jobs: fetch-depth: 0 submodules: recursive - name: Set up JDK 17 - uses: actions/setup-java@6ba5449b7dcda52941806a19f0cf626b6420191e + uses: actions/setup-java@66b945764b75604b3cfd644c3ada5232cf6c90c6 with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 69618f9eb..a025ed10c 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -25,7 +25,7 @@ jobs: submodules: recursive - name: Set up JDK ${{ matrix.build.java }} - uses: actions/setup-java@6ba5449b7dcda52941806a19f0cf626b6420191e + uses: actions/setup-java@66b945764b75604b3cfd644c3ada5232cf6c90c6 with: java-version: ${{ matrix.build.java }} distribution: 'temurin' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 88cd73374..6f8894a99 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,7 +43,7 @@ jobs: submodules: recursive - name: Set up JDK 17 - uses: actions/setup-java@6ba5449b7dcda52941806a19f0cf626b6420191e + uses: actions/setup-java@66b945764b75604b3cfd644c3ada5232cf6c90c6 with: java-version: '17' distribution: 'temurin' From c8c4426f50ea77d77630e2e3bff707a1332126f4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 19 Nov 2025 05:30:11 +0000 Subject: [PATCH 384/391] chore(deps): update actions/setup-java digest to 46c56d6 (#1729) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 0526844ee..2df4c2838 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -26,7 +26,7 @@ jobs: fetch-depth: 0 submodules: recursive - name: Set up JDK 17 - uses: actions/setup-java@66b945764b75604b3cfd644c3ada5232cf6c90c6 + uses: actions/setup-java@46c56d6f92c88cf540acf95a12a4a41197499222 with: java-version: '17' distribution: 'temurin' diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index a025ed10c..8e7d1975f 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -25,7 +25,7 @@ jobs: submodules: recursive - name: Set up JDK ${{ matrix.build.java }} - uses: actions/setup-java@66b945764b75604b3cfd644c3ada5232cf6c90c6 + uses: actions/setup-java@46c56d6f92c88cf540acf95a12a4a41197499222 with: java-version: ${{ matrix.build.java }} distribution: 'temurin' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6f8894a99..e6ffa117f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,7 +43,7 @@ jobs: submodules: recursive - name: Set up JDK 17 - uses: actions/setup-java@66b945764b75604b3cfd644c3ada5232cf6c90c6 + uses: actions/setup-java@46c56d6f92c88cf540acf95a12a4a41197499222 with: java-version: '17' distribution: 'temurin' From 71e4b2fd04f13fd5f6a1aaee9899177d963b2346 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 19 Nov 2025 08:31:45 +0100 Subject: [PATCH 385/391] chore(deps): update dependency com.diffplug.spotless:spotless-maven-plugin to v3.1.0 (#1730) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5d643a938..07e78eb42 100644 --- a/pom.xml +++ b/pom.xml @@ -524,7 +524,7 @@ com.diffplug.spotless spotless-maven-plugin - 3.0.0 + 3.1.0 From 63cd1ef568137e75a4ada7d7da097ad3d5e79a03 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 19 Nov 2025 07:36:20 +0000 Subject: [PATCH 386/391] chore(deps): update github/codeql-action digest to 378219c (#1728) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 8e7d1975f..c13efce38 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@ffa63f0dac7bf42e00061d972fa89c8c81288540 + uses: github/codeql-action/init@378219ced27d0034fb5243e6fb8495a1f0afefe7 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ffa63f0dac7bf42e00061d972fa89c8c81288540 + uses: github/codeql-action/analyze@378219ced27d0034fb5243e6fb8495a1f0afefe7 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index ff793f6d6..c589d7fdc 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@ffa63f0dac7bf42e00061d972fa89c8c81288540 + uses: github/codeql-action/init@378219ced27d0034fb5243e6fb8495a1f0afefe7 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@ffa63f0dac7bf42e00061d972fa89c8c81288540 + uses: github/codeql-action/autobuild@378219ced27d0034fb5243e6fb8495a1f0afefe7 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ffa63f0dac7bf42e00061d972fa89c8c81288540 + uses: github/codeql-action/analyze@378219ced27d0034fb5243e6fb8495a1f0afefe7 From 1c7728d4d6d220c2285fe633d73ce1442d430999 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 19 Nov 2025 14:52:34 +0100 Subject: [PATCH 387/391] chore(deps): update github/codeql-action digest to ce07e7d (#1731) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index c13efce38..72f5eaa79 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@378219ced27d0034fb5243e6fb8495a1f0afefe7 + uses: github/codeql-action/init@ce07e7d196a4955bc4cd530d1d854faa5818e5e4 with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@378219ced27d0034fb5243e6fb8495a1f0afefe7 + uses: github/codeql-action/analyze@ce07e7d196a4955bc4cd530d1d854faa5818e5e4 diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index c589d7fdc..977fc8099 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@378219ced27d0034fb5243e6fb8495a1f0afefe7 + uses: github/codeql-action/init@ce07e7d196a4955bc4cd530d1d854faa5818e5e4 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@378219ced27d0034fb5243e6fb8495a1f0afefe7 + uses: github/codeql-action/autobuild@ce07e7d196a4955bc4cd530d1d854faa5818e5e4 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@378219ced27d0034fb5243e6fb8495a1f0afefe7 + uses: github/codeql-action/analyze@ce07e7d196a4955bc4cd530d1d854faa5818e5e4 From 1897a5bba3c3021ab17be3749e9fd3db0dc341a3 Mon Sep 17 00:00:00 2001 From: Jonathan Norris Date: Wed, 19 Nov 2025 10:11:14 -0500 Subject: [PATCH 388/391] chore: update LICENSE copyright notice (#1723) * chore: update LICENSE copyright notice Signed-off-by: Jonathan Norris * chore: add .cursor to .gitignore Signed-off-by: Jonathan Norris * chore: remove year from copyright Signed-off-by: Jonathan Norris --------- Signed-off-by: Jonathan Norris --- .gitignore | 1 + LICENSE | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a7575d545..dfc5642e5 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ target # vscode stuff - we may want to use a more specific pattern later if we'd like to suggest editor configurations .vscode/ +.cursor # used for spec compliance tooling java-report.json diff --git a/LICENSE b/LICENSE index 261eeb9e9..96b3dc8fc 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright OpenFeature Maintainers Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From ea5899776a924106de99ed7d993216b1c3140281 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 19 Nov 2025 16:46:21 +0100 Subject: [PATCH 389/391] chore(deps): update github/codeql-action digest to 0b43179 (#1732) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 72f5eaa79..d650f9e70 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@ce07e7d196a4955bc4cd530d1d854faa5818e5e4 + uses: github/codeql-action/init@0b4317954f4f86bf5df18ed38d9987fb1d2ec4ad with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ce07e7d196a4955bc4cd530d1d854faa5818e5e4 + uses: github/codeql-action/analyze@0b4317954f4f86bf5df18ed38d9987fb1d2ec4ad diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 977fc8099..b8dd599a4 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@ce07e7d196a4955bc4cd530d1d854faa5818e5e4 + uses: github/codeql-action/init@0b4317954f4f86bf5df18ed38d9987fb1d2ec4ad with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@ce07e7d196a4955bc4cd530d1d854faa5818e5e4 + uses: github/codeql-action/autobuild@0b4317954f4f86bf5df18ed38d9987fb1d2ec4ad - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ce07e7d196a4955bc4cd530d1d854faa5818e5e4 + uses: github/codeql-action/analyze@0b4317954f4f86bf5df18ed38d9987fb1d2ec4ad From 2bc3d4f7c1284105cdf9cdc1c736ab23d26380b6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 19 Nov 2025 16:50:51 +0000 Subject: [PATCH 390/391] chore(deps): update github/codeql-action digest to ce729e4 (#1733) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pullrequest.yml | 4 ++-- .github/workflows/static-code-scanning.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index d650f9e70..ff3c98f8c 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: cache: maven - name: Initialize CodeQL - uses: github/codeql-action/init@0b4317954f4f86bf5df18ed38d9987fb1d2ec4ad + uses: github/codeql-action/init@ce729e4d353d580e6cacd6a8cf2921b72e5e310a with: languages: java @@ -58,4 +58,4 @@ jobs: verbose: true # optional (default = false) - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@0b4317954f4f86bf5df18ed38d9987fb1d2ec4ad + uses: github/codeql-action/analyze@ce729e4d353d580e6cacd6a8cf2921b72e5e310a diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index b8dd599a4..04068c3ae 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -33,12 +33,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@0b4317954f4f86bf5df18ed38d9987fb1d2ec4ad + uses: github/codeql-action/init@ce729e4d353d580e6cacd6a8cf2921b72e5e310a with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@0b4317954f4f86bf5df18ed38d9987fb1d2ec4ad + uses: github/codeql-action/autobuild@ce729e4d353d580e6cacd6a8cf2921b72e5e310a - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@0b4317954f4f86bf5df18ed38d9987fb1d2ec4ad + uses: github/codeql-action/analyze@ce729e4d353d580e6cacd6a8cf2921b72e5e310a From d4c7907e3f3f056b8800387241e4be5e8bbdaea4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Nov 2025 21:44:38 +0000 Subject: [PATCH 391/391] chore(deps): update actions/checkout digest to 1af3b93 (#1735) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/merge.yml | 2 +- .github/workflows/pullrequest.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/static-code-scanning.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 2df4c2838..8c978f625 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@71cf2267d89c5cb81562390fa70a37fa40b1305e + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 with: fetch-depth: 0 submodules: recursive diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index ff3c98f8c..7e815801d 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -19,7 +19,7 @@ jobs: runs-on: ${{ matrix.os}} steps: - name: Check out the code - uses: actions/checkout@71cf2267d89c5cb81562390fa70a37fa40b1305e + uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 with: fetch-depth: 0 submodules: recursive diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e6ffa117f..841441307 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,7 +37,7 @@ jobs: steps: - name: Checkout Repository - uses: actions/checkout@71cf2267d89c5cb81562390fa70a37fa40b1305e + uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 with: fetch-depth: 0 submodules: recursive diff --git a/.github/workflows/static-code-scanning.yaml b/.github/workflows/static-code-scanning.yaml index 04068c3ae..c2de02806 100644 --- a/.github/workflows/static-code-scanning.yaml +++ b/.github/workflows/static-code-scanning.yaml @@ -29,7 +29,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@71cf2267d89c5cb81562390fa70a37fa40b1305e + uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL