Skip to content

Conversation

@sreejith-kulamgarath
Copy link
Contributor

@sreejith-kulamgarath sreejith-kulamgarath commented Oct 27, 2025

✅ OpenFeature 2.x Upgrade Complete

What was updated:

  1. Package References: Updated OpenFeature from version 1.5.1 to 2.9.0 in both the main library and test project
  2. SchematicProvider Implementation:
    • Updated all abstract method signatures to use Task instead of ValueTask (as required by OpenFeature 2.x)
    • Added Async suffix to all method names (ResolveBooleanValueAsync, ResolveStringValueAsync, etc.)
    • Added CancellationToken parameters to all methods
    • Made EvaluationContext nullable (EvaluationContext?) to align with OpenFeature 2.x nullable reference types
    • Updated InitializeAsync and ShutdownAsync method signatures
  3. Test Files: Updated all test method calls to use the new async method names with Async suffix
  4. Example Code: Updated the OpenFeature example to demonstrate OpenFeature 2.x usage patterns, including:
    • Using the new async methods (GetBooleanValueAsync, GetBooleanDetailsAsync)
    • Updated shutdown call to ShutdownAsync()
  5. ValueExtensions: The existing code was already compatible with OpenFeature 2.x Value types

Key Changes in OpenFeature 2.x:

  • Async Method Names: All resolve methods now have Async suffix
  • CancellationTokens: All async methods now accept cancellation tokens
  • Nullable Reference Types: OpenFeature 2.x enables nullable reference types
  • API Consistency: Better naming conventions and consistent async patterns

Testing Results:

  • ✅ All 15 OpenFeature-specific tests pass
  • ✅ 280 out of 281 total tests pass (1 unrelated test failure in MetricsTests)
  • ✅ Build succeeds with only nullable reference type warnings (expected with OpenFeature 2.x)

The upgrade is complete and SchematicHQ now supports OpenFeature 2.x! Users can now upgrade their projects to use OpenFeature 2.x without being limited to SchematicHQ version 1.1.2.

@sreejith-kulamgarath sreejith-kulamgarath requested a review from a team as a code owner October 27, 2025 18:58
@cbrady cbrady merged commit 3c5e677 into SchematicHQ:main Oct 28, 2025
2 checks passed
@sreejith-kulamgarath sreejith-kulamgarath deleted the chore/upgrade-OpenFeature branch October 28, 2025 18:09
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.

2 participants