diff --git a/openfeature-provider/CHANGELOG.md b/openfeature-provider/CHANGELOG.md index 2e27bba..d236d3f 100644 --- a/openfeature-provider/CHANGELOG.md +++ b/openfeature-provider/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [openfeature/v0.2.0](https://github.com/mixpanel/mixpanel-java/tree/openfeature/v0.2.0) (2026-07-28) + +[Full Changelog](https://github.com/mixpanel/mixpanel-java/compare/openfeature/v0.1.1...openfeature/v0.2.0) + ## [openfeature/v0.1.1](https://github.com/mixpanel/mixpanel-java/tree/openfeature/v0.1.1) (2026-04-22) ### Fixes diff --git a/openfeature-provider/README.md b/openfeature-provider/README.md index e0441eb..81e86db 100644 --- a/openfeature-provider/README.md +++ b/openfeature-provider/README.md @@ -4,7 +4,7 @@ [![OpenFeature](https://img.shields.io/badge/OpenFeature-compatible-green)](https://openfeature.dev/) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/mixpanel/mixpanel-java/blob/master/LICENSE) -##### _April 22, 2026_ - [openfeature/v0.1.1](https://github.com/mixpanel/mixpanel-java/releases/tag/openfeature/v0.1.1) +##### _July 28, 2026_ - [openfeature/v0.2.0](https://github.com/mixpanel/mixpanel-java/releases/tag/openfeature/v0.2.0) An [OpenFeature](https://openfeature.dev/) provider that integrates Mixpanel's feature flags with the OpenFeature Java SDK. This allows you to use Mixpanel's feature flagging capabilities through OpenFeature's standardized, vendor-agnostic API. @@ -25,7 +25,7 @@ This package provides a bridge between Mixpanel's native feature flags implement com.mixpanel mixpanel-java-openfeature - 0.1.0 + 0.2.0 ``` @@ -41,7 +41,7 @@ You will also need the OpenFeature Java SDK: dev.openfeature sdk - 1.20.1 + 0.2.0 ``` diff --git a/openfeature-provider/pom.xml b/openfeature-provider/pom.xml index 924aa3c..4f040c0 100644 --- a/openfeature-provider/pom.xml +++ b/openfeature-provider/pom.xml @@ -4,7 +4,7 @@ com.mixpanel mixpanel-java-openfeature - 0.1.1 + 0.2.0 jar Mixpanel Java SDK - OpenFeature Provider @@ -126,7 +126,7 @@ com.mixpanel mixpanel-java - 1.8.0 + 1.10.0 diff --git a/openfeature-provider/src/test/java/com/mixpanel/openfeature/MixpanelProviderTest.java b/openfeature-provider/src/test/java/com/mixpanel/openfeature/MixpanelProviderTest.java index c5870bd..0a35ab0 100644 --- a/openfeature-provider/src/test/java/com/mixpanel/openfeature/MixpanelProviderTest.java +++ b/openfeature-provider/src/test/java/com/mixpanel/openfeature/MixpanelProviderTest.java @@ -1,6 +1,7 @@ package com.mixpanel.openfeature; import com.mixpanel.mixpanelapi.featureflags.model.SelectedVariant; +import com.mixpanel.mixpanelapi.featureflags.model.Source; import com.mixpanel.mixpanelapi.featureflags.provider.BaseFlagsProvider; import com.mixpanel.mixpanelapi.featureflags.provider.LocalFlagsProvider; import dev.openfeature.sdk.*; @@ -521,8 +522,14 @@ public void testVariantKeyPassedThroughOnObjectEvaluation() { @SuppressWarnings("unchecked") @Test - public void testNullVariantKeyTreatedAsFallbackOnBooleanEvaluation() { - SelectedVariant variant = new SelectedVariant<>(null, true, null, null, null); + public void testFallbackSourceTreatedAsFallbackOnBooleanEvaluation() { + // Pre-SDK-79 the fallback signal was `variantKey == null`. After SDK-79 + // (base 1.10.0) it is `source instanceof Source.Fallback`. Construct + // the variant with an explicit Fallback source to exercise the same + // dispatch path the tests were originally written for. + SelectedVariant variant = new SelectedVariant<>( + null, true, null, null, null, + Source.fallback(Source.Fallback.Reason.FLAG_NOT_FOUND)); when(mockFlagsProvider.getVariant(eq("flag"), any(SelectedVariant.class), anyMap(), eq(true))) .thenReturn(variant); @@ -535,8 +542,10 @@ public void testNullVariantKeyTreatedAsFallbackOnBooleanEvaluation() { @SuppressWarnings("unchecked") @Test - public void testNullVariantKeyTreatedAsFallbackOnObjectEvaluation() { - SelectedVariant variant = new SelectedVariant<>(null, "some-value", null, null, null); + public void testFallbackSourceTreatedAsFallbackOnObjectEvaluation() { + SelectedVariant variant = new SelectedVariant<>( + null, "some-value", null, null, null, + Source.fallback(Source.Fallback.Reason.FLAG_NOT_FOUND)); when(mockFlagsProvider.getVariant(eq("flag"), any(SelectedVariant.class), anyMap(), eq(true))) .thenReturn(variant);