Skip to content

v2.0.0: Split Go SDK v6, OpenFeature Go SDK v1, lifecycle rewrite#8

Open
lzrf0cuz wants to merge 1 commit intosplitio:mainfrom
lzrf0cuz:v2
Open

v2.0.0: Split Go SDK v6, OpenFeature Go SDK v1, lifecycle rewrite#8
lzrf0cuz wants to merge 1 commit intosplitio:mainfrom
lzrf0cuz:v2

Conversation

@lzrf0cuz
Copy link

@lzrf0cuz lzrf0cuz commented Mar 2, 2026

Rewrites the provider for Split Go SDK v6 and OpenFeature Go SDK v1.

Init and Shutdown now take a context for timeouts and cancellation. ObjectEvaluation returns FlagSetResult with per-flag treatment and config. Cloud mode evaluates flag sets by default; localhost mode always evaluates individual flags. Adds WithEvaluationMode and WithoutMetricValue context options for per-request control.

Monitoring goroutine detects configuration changes by polling manager.Splits(). Logging uses slog with source attribution (split-provider, split-sdk). Includes a SlogToSplitAdapter so the Split SDK logs through the same logger.

Branding updated to reference Harness FME where appropriate.

Breaking changes

  • Module path: github.com/splitio/split-openfeature-provider-go/v2
  • New() parameter renamed from apiKey to sdkKey
  • ObjectEvaluation returns FlagSetResult instead of raw map[string]interface{}
  • Provider instances cannot be reused after Shutdown

See MIGRATION.md for the full v1 to v2 guide.

Testing

Unit tests pass with race detector at >70% coverage. Integration suite covers 85 tests in localhost mode, 94 in cloud mode.

- Upgrade Split Go SDK to v6, OpenFeature Go SDK to v1
- Context-aware Init/Shutdown with timeout and cancellation
- Singleflight initialization, atomic shutdown state
- ObjectEvaluation returns FlagSetResult with per-flag configs
- Flag set evaluation (cloud mode) and individual mode
- Per-request evaluation and track options via context
- Configuration change detection via background monitoring
- Structured logging via slog with source attribution
- Split SDK log adapter (SlogToSplitAdapter)
- Update branding to Harness FME
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