Split OpenFeature Java SDK into API and Implementation Artifacts
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- java
Línea de trabajo
Comienza comparando los repositorios separados propuestos con la estructura del monorepo y revisando el pom.xml existente y la configuración de releases. Mapea las interfaces, los tipos de datos, las anotaciones y las clases de implementación descritas en la issue, y después revisa README.md y .github/workflows/release-please.yml. Se considera terminado cuando exista una estructura acordada y un plan de implementación que cubran la extracción, las pruebas de compatibilidad, los releases y la documentación de migración.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem Statement
Currently, the OpenFeature Java SDK provides a single artifact that includes both the API interfaces and the implementation. This creates challenges as we expand the ecosystem:
- Gherkin Test Steps Dependencies: The upcoming Gherkin test steps implementation needs to reference the OpenFeature API but shouldn't depend on a specific implementation
- java-sdk-contrib Integration: Contributors working on
java-sdk-contribneed access to the API without pulling in unnecessary implementation dependencies - Release Coupling: API changes (which should be infrequent and stable) are coupled with implementation changes (which may be more frequent)
- Dependency Bloat: Consumers who only need the API surface (like test frameworks or alternative implementations) currently must pull in the full SDK
Proposed Solution
Split the current single artifact into two separate artifacts:
1. openfeature-api (New)
- Contains only interfaces, annotations, and core data types
- Defines the stable API contract
- Minimal dependencies
- Follows strict semantic versioning
- Infrequent releases (only when API changes)
2. openfeature-sdk (Refactored)
- Contains the current implementation
- Depends on
openfeature-api - More frequent releases for implementation improvements
- Backward compatible implementation changes don't require API updates
3. openfeature-test-harness (Future)
- Contains Gherkin test steps
- Depends only on
openfeature-api - Can be used by any OpenFeature implementation
- Implementation-agnostic testing utilities
Benefits
- Cleaner Dependencies: Test frameworks and alternative implementations only pull what they need
- Independent Release Cycles: API stability doesn't block implementation improvements
- Better SemVer Compliance: Clear separation of API breaking changes vs implementation changes
- Ecosystem Growth: Easier for
java-sdk-contriband other implementations to integrate - Provider Implementation Flexibility: Feature flag providers (LaunchDarkly, Flagsmith, Split, etc.) can bind to the stable API instead of the full SDK, enabling:
- Multiple provider versions compatible with the same API version
- Users can mix and match provider versions independently from SDK versions
- Providers don't need to release new versions for every SDK implementation change
- Reduced version conflicts in user applications with multiple providers
- Reduced Coupling: Following established patterns from SLF4J, JAX-RS, etc.
Provider Implementation Benefits
This split is particularly valuable for the OpenFeature provider ecosystem:
Current State:
<!-- Provider must depend on full SDK -->
<dependency>
<groupId>dev.openfeature</groupId>
<artifactId>sdk</artifactId>
<version>1.5.0</version>
</dependency>
After API Split:
<!-- Provider only needs API contract -->
<dependency>
<groupId>dev.openfeature</groupId>
<artifactId>openfeature-api</artifactId>
<version>1.2.0</version>
</dependency>
Real-world scenario:
- LaunchDarkly provider v2.1.0 targets API v1.2.0
- Flagsmith provider v1.8.0 also targets API v1.2.0
- User can use both providers with SDK v2.5.0 (which implements API v1.2.0)
- No version conflicts, no forced provider upgrades when SDK implementation improves
This mirrors successful patterns like:
- JDBC drivers targeting JDBC API versions
- SLF4J logging implementations targeting SLF4J API
- JAX-RS providers targeting JAX-RS API
Phase 1: Repository Structure Decision
Decision needed: Separate repositories vs monorepo with manifest
Option A: Separate Repositories (Recommended)
openfeature-java-api/ (API only)
openfeature-java-sdk/ (Implementation)
openfeature-java-test-harness/ (Future - Gherkin steps)
Pros with release-please:
- Clean release lifecycle per artifact
- Independent conventional commit history
- Focused issues/PRs per component
- Simpler CI/CD pipelines
Option B: Monorepo with Release-Please Manifest
/api/ (API artifact)
/sdk/ (SDK artifact)
/test-harness/ (Future - Test artifact)
/pom.xml (Parent aggregator)
Phase 2: API Extraction
-
Create
openfeature-apimodule/repo- Move all interfaces (
FeatureProvider,Client,EvaluationContext, etc.) - Move core data types (
FlagEvaluationDetails,ProviderMetadata, etc.) - Move annotations and exceptions
- Create minimal
pom.xmlwith only essential dependencies
- Move all interfaces (
-
Update
openfeature-sdkmodule/repo- Add dependency on
openfeature-api - Remove duplicated interfaces/types
- Keep all implementation classes
- Update imports to reference API artifact
- Add dependency on
-
Version Strategy
- Start API at
1.0.0(stable baseline) - SDK continues current versioning or resets to align with API major version
- Use version ranges:
<version>[1.0.0,2.0.0)</version>
- Start API at
Phase 3: Release-Please Configuration
For Separate Repositories:
Each repo gets standard release-please setup:
# .github/workflows/release-please.yml
- uses: google-github-actions/release-please-action@v3
with:
release-type: maven
package-name: openfeature-api # or openfeature-sdk
token: ${{ secrets.GITHUB_TOKEN }}
For Monorepo:
// .release-please-manifest.json
{
"api": "1.0.0",
"sdk": "2.0.0"
}
Phase 4: Documentation & Communication
-
Update README.md with new artifact structure
-
Create migration guide for existing users
-
Document version compatibility matrix:
SDK Version Compatible API Versions Notes 2.x.x 1.x.x Current -
Update build badges and Maven Central links
Phase 5: Testing & Validation
- Compatibility testing between API and SDK versions
- Integration testing with existing OpenFeature providers
- Validate Gherkin steps work with API-only dependency
- Test java-sdk-contrib integration
Migration Path for Users
Current Usage:
<dependency>
<groupId>dev.openfeature</groupId>
<artifactId>sdk</artifactId>
<version>1.x.x</version>
</dependency>
After Split:
<!-- Most users still just need the full SDK -->
<dependency>
<groupId>dev.openfeature</groupId>
<artifactId>openfeature-sdk</artifactId>
<version>2.x.x</version>
</dependency>
<!-- API-only consumers (test frameworks, alternative implementations) -->
<dependency>
<groupId>dev.openfeature</groupId>
<artifactId>openfeature-api</artifactId>
<version>1.x.x</version>
</dependency>
Risks & Mitigations
-
Increased Complexity: Multiple artifacts to maintain
- Mitigation: Clear documentation and automated testing
-
Version Alignment Challenges: API/SDK compatibility matrix
- Mitigation: Automated compatibility testing in CI
-
User Confusion: Which artifact to use?
- Mitigation: Clear documentation with usage examples
-
Release Coordination: Breaking changes spanning API + SDK
- Mitigation: Careful planning of breaking changes, deprecation periods
Success Criteria
- ✅ Gherkin test steps can depend only on
openfeature-api - ✅
java-sdk-contribimplementations work with API-only dependency - ✅ Existing users can migrate with minimal changes
- ✅ Independent release cycles for API vs implementation
- ✅ Clear version compatibility documentation
Next Steps
- Decision: Choose repository structure (separate repos vs monorepo)
- Create implementation plan with detailed timeline
- Set up new repositories/modules
- Begin API extraction following the implementation plan
- Update CI/CD pipelines for new artifact structure
- Lenguaje dominante
- Java
- Estrellas
- 128
- Forks
- 61
- Merge medio
- 11 h 36 min
- PR fusionados (30 d)
- 22
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de open-feature/java-sdk
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
open-feature/java-sdk#2019 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
open-feature/java-sdk#2014 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Spec v0.9.0 compliance Abiertov0.9.0
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
open-feature/java-sdk#1999 ·
Los mantenedores suelen responder en 1 día
-
on setProvider call, shutting down the previous provider should happen before creating the new one Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 50/100
open-feature/java-sdk#1934 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
multi-provider
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
open-feature/java-sdk#1882 ·
Los mantenedores suelen responder en 1 día
Todos los issues de open-feature/java-sdk
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
ci-failure-cause test-failure
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
nextcloud/notes-android#3367 ·
Los mantenedores suelen responder en 1 día
-
Feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
MuntashirAkon/AppManager#2058 ·
-
SarifLogger: artifactLocation.uri is not properly encoded for file names containing '#', '?', or '%' Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
checkstyle/checkstyle#21721 ·
Los mantenedores suelen responder en 1 día