From a6e756482f3591f998d9dd18fa6b1b88d50f2784 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 28 Jul 2026 19:57:27 +0000 Subject: [PATCH 1/3] release: prepare openfeature 0.2.0 --- openfeature-provider/CHANGELOG.md | 4 ++++ openfeature-provider/README.md | 6 +++--- openfeature-provider/pom.xml | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) 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..dd5756d 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 From 1a473fe22259e4ce66ea5c28dc04c55e2be8b35d Mon Sep 17 00:00:00 2001 From: Tyler Roach Date: Tue, 28 Jul 2026 15:59:21 -0400 Subject: [PATCH 2/3] Bump base mixpanel-java dep to 1.10.0 for FallbackReason MixpanelProvider now dispatches on Source.Fallback.Reason (added in 1.10.0 / SDK-79). Installing 0.2.0 alongside any pre-1.10.0 mixpanel-java would crash at runtime because that class doesn't exist. Co-Authored-By: Claude Opus 4.7 --- openfeature-provider/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openfeature-provider/pom.xml b/openfeature-provider/pom.xml index dd5756d..4f040c0 100644 --- a/openfeature-provider/pom.xml +++ b/openfeature-provider/pom.xml @@ -126,7 +126,7 @@ com.mixpanel mixpanel-java - 1.8.0 + 1.10.0 From 66e656bd4dbacbd16465f7a44619e52f3f2614a1 Mon Sep 17 00:00:00 2001 From: Tyler Roach Date: Tue, 28 Jul 2026 16:04:22 -0400 Subject: [PATCH 3/3] Update null-key fallback tests to use Source.fallback explicitly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The two null-variant-key tests were written against the pre-SDK-79 detection where `isFallback()` returned `variantKey == null`. Under 1.10.0 (SDK-79 + SDK-130 wrapper dispatch), `isFallback()` is now `source instanceof Source.Fallback`, and the 5-arg SelectedVariant constructor defaults source to Source.local() — so a null-key variant with no explicit source is a "real" local variant, not a fallback. Construct the test variants with an explicit Source.fallback(Source.Fallback.Reason.FLAG_NOT_FOUND) instead. This exercises the same fallback-dispatch path the tests originally targeted, using the new detection mechanism. Renamed to `testFallbackSourceTreatedAsFallback...` since the null key is no longer the signal — the fallback source is. Local: mvn test in openfeature-provider → 35/35 pass. Co-Authored-By: Claude Opus 4.7 --- .../openfeature/MixpanelProviderTest.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) 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);