Open
Conversation
Implements an OpenFeature FeatureProvider that wraps BaseFlagsProvider, enabling Mixpanel feature flags to be used via the OpenFeature standard. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The OpenFeature SDK merges all context layers before calling the provider. The provider was ignoring this merged context and using a stored global context from initialize(). Now uses convertContext(ctx) in evaluate() and getObjectEvaluation(). Also adds variant key passthrough and null variant key tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- shutdown() now delegates to underlying flags provider via shutdown() - Add shutdown() to BaseFlagsProvider (no-op) and LocalFlagsProvider (calls close()) - Reject non-whole decimals in integer coercion (42.5 → TYPE_MISMATCH) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract fetchVariant, errorResult, and successResult helpers to eliminate 6 duplicated builder patterns. Add proper imports for Arrays and ArrayList. Extract buildResult in LocalFlagsProvider to consolidate variant construction and exposure tracking. Simplify isQaTester tracking and collapse nested runtime condition checks. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ants Extract targetingKey from EvaluationContext.getTargetingKey() explicitly in convertContext. Add Object[] array handling in objectToValue. Replace string literal reasons with Reason.STATIC and Reason.ERROR constants. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rename artifact from mixpanel-java-openfeature-provider to mixpanel-java-openfeature, give it its own version (0.1.0) independent of the main SDK, and add Maven Central publishing plugins (source, javadoc, GPG signing, central-publishing). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Org policy requires actions pinned to full-length commit SHAs instead of version tags. Also skip GPG signing when installing the core library locally in the OpenFeature provider job. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
OpenFeature SDK 1.20.1 requires Java 11+ (class version 55.0), so the provider cannot compile under Java 8. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fixes CodeQL actions/missing-workflow-permissions alert by declaring explicit read-only contents permission. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Deduplicate getObjectEvaluation and evaluate by extracting shared logic into a common evaluate method that accepts a mapper function. Also log exceptions during shutdown instead of silently ignoring them. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MixpanelProvider) as a separate Maven subproject (openfeature-provider/) that wraps the Mixpanel Java SDK'sBaseFlagsProviderdev.openfeature:sdk:1.20.1Design Decisions
BaseFlagsProvider: Accepts any flags provider (local or remote) via the constructorinitialize(): Context is set once through the OpenFeatureinitialize(EvaluationContext)lifecycle method and stored in a field. Per-evaluation context parameters are ignored.PROVIDER_NOT_READYfor local providers: When wrapping aLocalFlagsProvider, checksareFlagsReady()before each evaluation. Skipped for remote providers (always ready).STATICreason: All successful resolutions use reasonSTATIC; all failures useERRORtargetingKeynot special: Treated as a regular context property — no mapping todistinct_idFLAG_NOT_FOUND(fallback returned),TYPE_MISMATCH(wrong type),PROVIDER_NOT_READY(local flags not loaded),GENERAL(exceptions)shutdown()is a no-opTest Coverage
29 tests covering:
Test plan
mvn testinopenfeature-provider/— 29/29 passing🤖 Generated with Claude Code