Skip to content

Emit provider lifecycle events from the provider now that the OpenFeature Ruby SDK supports opting in #39

Open

Description

@devin-ai-integration

The OpenFeature spec v0.9.0 moved lifecycle event ownership to the provider: a provider emits its own PROVIDER_READY/PROVIDER_ERROR, and the SDK derives provider status from that event stream, but only for providers that opt in with an SDK-defined marker. Providers without the marker keep the legacy path, where the SDK emits synthetic lifecycle events after init returns. See spec appendix E and provider status 2.8.

The OpenFeature Ruby SDK shipped the marker in 0.7.0 (open-feature/ruby-sdk#353): a provider defines emits_lifecycle_events? returning true. In 0.7.0 and later the legacy path is deprecated, and the SDK logs a deprecation warning once per provider class when a logger is configured. This provider defines init without the marker, so it takes the deprecated path.

Today the gemspec allows openfeature-sdk ~> 0.6.1, which excludes 0.7. #38 widens the range to < 0.9. Once it merges, applications that upgrade will see the deprecation warning.

Work, once the supported range includes 0.7 or later:

  • Define emits_lifecycle_events? returning true.
  • Emit PROVIDER_READY from the provider when initialization succeeds, and PROVIDER_ERROR before init raises.
  • Invert the initialization suppression that feat: Support waiting indefinitely for initialization #36 adds (OFP 4.2.5). That suppression exists only because the SDK emits its own event for the initialization outcome. With the marker the SDK emits nothing, so the provider has to.
  • Decide how to handle openfeature-sdk 0.6.x if it stays in the supported range: the SDK ignores the marker there, so emitting from init would duplicate the SDK's event. The options are raising the floor to 0.7 or branching on the SDK version.
  • Confirm consumers see no duplicate ready or error events, and that provider status still follows later stale, error, and valid transitions.

Blocked on:

  • fix: Allow openfeature-sdk 0.7 and 0.8 #38, which allows openfeature-sdk 0.7 and later.
  • feat: Support waiting indefinitely for initialization #36, which adds the status tracking this work builds on.
  • The Bundler cooldown: 7 in Gemfile, which keeps CI from resolving 0.7.0 (released 2026-10-23) until 2026-10-30.
  • OFP 4.2.5 in launchdarkly/sdk-specs, which says the provider MUST NOT emit the event that completes initialization. Its rationale assumes the SDK emits that event, which no longer holds once a provider opts in. The spec needs an update for SDKs with the marker.

The Java provider has the same item, still waiting on the Java SDK: launchdarkly/openfeature-java-server#64.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions