Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions openfeature-provider/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions openfeature-provider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -25,7 +25,7 @@ This package provides a bridge between Mixpanel's native feature flags implement
<dependency>
<groupId>com.mixpanel</groupId>
<artifactId>mixpanel-java-openfeature</artifactId>
<version>0.1.0</version>
<version>0.2.0</version>
</dependency>
```

Expand All @@ -41,7 +41,7 @@ You will also need the OpenFeature Java SDK:
<dependency>
<groupId>dev.openfeature</groupId>
<artifactId>sdk</artifactId>
<version>1.20.1</version>
<version>0.2.0</version>
</dependency>
```

Expand Down
4 changes: 2 additions & 2 deletions openfeature-provider/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.mixpanel</groupId>
<artifactId>mixpanel-java-openfeature</artifactId>
<version>0.1.1</version>
<version>0.2.0</version>
<packaging>jar</packaging>
<name>Mixpanel Java SDK - OpenFeature Provider</name>
<description>
Expand Down Expand Up @@ -126,7 +126,7 @@
<dependency>
<groupId>com.mixpanel</groupId>
<artifactId>mixpanel-java</artifactId>
<version>1.8.0</version>
<version>1.10.0</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -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.*;
Expand Down Expand Up @@ -521,8 +522,14 @@ public void testVariantKeyPassedThroughOnObjectEvaluation() {

@SuppressWarnings("unchecked")
@Test
public void testNullVariantKeyTreatedAsFallbackOnBooleanEvaluation() {
SelectedVariant<Object> 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<Object> 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);

Expand All @@ -535,8 +542,10 @@ public void testNullVariantKeyTreatedAsFallbackOnBooleanEvaluation() {

@SuppressWarnings("unchecked")
@Test
public void testNullVariantKeyTreatedAsFallbackOnObjectEvaluation() {
SelectedVariant<Object> variant = new SelectedVariant<>(null, "some-value", null, null, null);
public void testFallbackSourceTreatedAsFallbackOnObjectEvaluation() {
SelectedVariant<Object> 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);

Expand Down
Loading