Skip to content

feat: integrate eppo module with android-sdk-framework (v3 → v4 migration)#249

Draft
typotter wants to merge 5 commits intopr1-add-framework-modulefrom
pr2-integrate-eppo-with-framework
Draft

feat: integrate eppo module with android-sdk-framework (v3 → v4 migration)#249
typotter wants to merge 5 commits intopr1-add-framework-modulefrom
pr2-integrate-eppo-with-framework

Conversation

@typotter
Copy link
Collaborator

Summary

Migrates the eppo module from v3 SDK to v4 framework, completing the integration started in #248.

Dependencies

Depends on: #248 (must be merged first)

Major Changes

EppoClient Migration (v3 → v4)

  • Extends AndroidBaseClient from framework instead of v3 BaseEppoClient
  • Removes v3 dependencies:
  • Adds framework dependency: module
  • Removes old storage classes: ConfigurationStore, ConfigCacheFile, BaseCacheFile (now in framework)

New v4 Components

  • OkHttpEppoClient: HTTP client implementation with Android logging
  • JacksonConfigurationParser: JSON parsing for v4 FlagConfigResponse format
  • Jackson adapters: Custom serializers/deserializers for EppoValue, FlagConfigResponse, dates

Test Infrastructure Fixes (Critical for 46/46 tests passing)

  1. TestConfigCacheFile.cacheFileName(): Fixed to match framework format
    • Was: eppo-sdk-flags-cloud.eppo.api.Configuration-{suffix}.bin
    • Now: eppo-sdk-flags-{suffix}.ser
  2. waitForPopulatedCache(): Removed redundant .ser suffix
  3. Unclosed OutputStreams: Added try-with-resources (3 locations)
  4. testDifferentCacheFilesPerKey: Simplified to copy actual cache instead of custom JSON

Example App Enhancements

  • CustomClientActivity: Demonstrates custom HTTP client injection
  • GsonConfigurationParser: Example alternative to Jackson parser
  • HeaderInjectingEppoClient: Example custom HTTP headers

Test Results

  • 46/46 instrumentation tests passing locally
  • ✅ Framework module builds independently
  • ✅ Eppo module builds with v4 dependencies
  • ✅ No breaking API changes for SDK users

Migration Notes

  • Cache files use .ser extension (Java serialization)
  • Configuration format changed from v3 to v4 JSON structure
  • All existing tests adapted and passing

…ation)

Migrate EppoClient from v3 SDK to v4 framework, resolving all test failures.

## Major Changes

### EppoClient Migration
- Extend AndroidBaseClient from framework instead of BaseEppoClient
- Remove old ConfigurationStore, ConfigCacheFile, BaseCacheFile (now in framework)
- Add dependency on android-sdk-framework module
- Remove v3 sdk-common-jvm dependency

### New Components
- OkHttpEppoClient: HTTP client implementation with logging
- JacksonConfigurationParser: JSON parsing for v4 format
- Jackson adapters for EppoValue, FlagConfigResponse, dates, etc.

### Test Infrastructure Fixes
- TestConfigCacheFile: Fix filename to match framework (eppo-sdk-flags-{suffix}.ser)
- Fix waitForPopulatedCache(): Remove incorrect .ser suffix (already in filename)
- Fix unclosed OutputStreams: Add try-with-resources (3 locations)
- Simplify testDifferentCacheFilesPerKey: Copy actual cache instead of custom JSON
- Add OutputStream import

### Example App Updates
- Add CustomClientActivity demonstrating custom HTTP client
- Add GsonConfigurationParser and HeaderInjectingEppoClient examples

## Test Results
- All 46 instrumentation tests passing locally
- Framework module builds independently
- Eppo module builds with v4 dependencies
- Fix TestConfigCacheFile.cacheFileName() to use correct format (eppo-sdk-flags-{suffix}.ser)
- Simplify testDifferentCacheFilesPerKey to copy actual cache instead of custom JSON
- Fix unclosed OutputStreams with try-with-resources (3 locations)

These fixes resolve all test failures and ensure 46/46 tests pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant