launchdarkly-openfeature-server-sdk 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +15 -0
- data/CONTRIBUTING.md +2 -0
- data/Gemfile +7 -1
- data/PROVENANCE.md +1 -1
- data/README.md +5 -4
- data/launchdarkly-openfeature-server-sdk.gemspec +2 -2
- data/lib/ldclient-openfeature/impl/details_converter.rb +4 -2
- data/lib/ldclient-openfeature/version.rb +1 -1
- metadata +11 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7a284ca0226f8e24674e9c42a6d21ee59a502dc30c8b70555dcb84b1ad3c8004
|
|
4
|
+
data.tar.gz: def9bcd36327042ca9b27e4100efe1eeda7797d40f56f2300c43461a4c6a9377
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 12da758f3e11d4844e60d110a2712bbe80be7fe2f0a9fc87266c75dd796df25353aa86f7db9655eee0dc004b743a4cf750d1df35c5a9c4e3382b04888f14bcf8
|
|
7
|
+
data.tar.gz: d0b8757068807d68c6e49d9316db164825fee830c89ab9dc68359da2b0a3ab44708f0de632ce9ee9c519dbf2b51783b45da3d14ed263b2c25d3327d382c2618f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.4.0](https://github.com/launchdarkly/openfeature-ruby-server/compare/0.3.1...0.4.0) (2026-11-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add overrideAffected to flag metadata ([#45](https://github.com/launchdarkly/openfeature-ruby-server/issues/45)) ([8ae500c](https://github.com/launchdarkly/openfeature-ruby-server/commit/8ae500c2c11c46a8284368e19869679b91ec70ad))
|
|
9
|
+
|
|
10
|
+
## [0.3.1](https://github.com/launchdarkly/openfeature-ruby-server/compare/0.3.0...0.3.1) (2026-10-29)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* Allow openfeature-sdk 0.7 and 0.8 ([#38](https://github.com/launchdarkly/openfeature-ruby-server/issues/38)) ([4040bce](https://github.com/launchdarkly/openfeature-ruby-server/commit/4040bce73a10f49ec1c21f31987fd20d4299646a))
|
|
16
|
+
* Require launchdarkly-server-sdk 8.19 so data source failures stay recoverable ([#42](https://github.com/launchdarkly/openfeature-ruby-server/issues/42)) ([53f8e8b](https://github.com/launchdarkly/openfeature-ruby-server/commit/53f8e8b66c977726b5e82ced53b4732300b7dd11))
|
|
17
|
+
|
|
3
18
|
## [0.3.0](https://github.com/launchdarkly/openfeature-ruby-server/compare/0.2.0...0.3.0) (2026-08-25)
|
|
4
19
|
|
|
5
20
|
|
data/CONTRIBUTING.md
CHANGED
|
@@ -16,6 +16,8 @@ We encourage pull requests and other contributions from the community. Before su
|
|
|
16
16
|
|
|
17
17
|
This SDK is built with [Bundler](https://bundler.io/). To install Bundler, run `gem install bundler`. You might need `sudo` to execute the command successfully.
|
|
18
18
|
|
|
19
|
+
The `Gemfile` declares a [cooldown](https://blog.rubygems.org/2026/06/03/cooldown-let-new-gems-be-vetted.html), so dependencies only resolve to versions that have been published for at least seven days. `launchdarkly-server-sdk` is exempt, because we publish it ourselves and generally want to build against a release immediately. Cooldown requires Bundler 4.0.13 or later; older versions ignore the setting and resolve to the newest matching version. Pass `--cooldown 0` to reach a version inside the window, for instance when a security fix has just been released.
|
|
20
|
+
|
|
19
21
|
To install the runtime dependencies:
|
|
20
22
|
|
|
21
23
|
```
|
data/Gemfile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
source "https://rubygems.org"
|
|
3
|
+
source "https://rubygems.org", cooldown: 7
|
|
4
4
|
|
|
5
5
|
# Specify your gem's dependencies in launchdarkly-openfeature-server-sdk.gemspec
|
|
6
6
|
gemspec
|
|
@@ -13,3 +13,9 @@ gem "rubocop", "~> 1.76"
|
|
|
13
13
|
gem "rubocop-performance", "~> 1.25"
|
|
14
14
|
gem "rubocop-rake", "~> 0.6"
|
|
15
15
|
gem "rubocop-rspec", "~> 3.9"
|
|
16
|
+
|
|
17
|
+
# Cooldown is configured per source, so exempting our own SDK from it requires a
|
|
18
|
+
# second remote for the same registry.
|
|
19
|
+
source "https://index.rubygems.org", cooldown: 0 do
|
|
20
|
+
gem "launchdarkly-server-sdk"
|
|
21
|
+
end
|
data/PROVENANCE.md
CHANGED
data/README.md
CHANGED
|
@@ -36,14 +36,14 @@ This matrix mirrors the [feature matrix of the OpenFeature SDK for Ruby](https:/
|
|
|
36
36
|
| ✅ | Targeting | The `EvaluationContext` is converted to a LaunchDarkly single or multi-context. See [OpenFeature Specific Considerations](#openfeature-specific-considerations). |
|
|
37
37
|
| ✅ | Hooks | Hooks are registered on the OpenFeature API and client; the provider requires no additional support and its results are visible to hooks, including [flag metadata](#flag-metadata). |
|
|
38
38
|
| ✅ | Logging | The provider logs through the logger of the `LaunchDarkly::Config` it is given. |
|
|
39
|
-
| ✅ | Domains | Domains bind clients to providers in the OpenFeature SDK; a separate provider instance may be registered per domain.
|
|
40
|
-
|
|
|
41
|
-
| ✅ | Initialization | `init` reports whether the LaunchDarkly client became ready within the configured wait time; a failure results in the `ERROR` state so that cached or fallback flag data is still evaluated.
|
|
39
|
+
| ✅ | Domains | Domains bind clients to providers in the OpenFeature SDK; a separate provider instance may be registered per domain. The provider is not domain-scoped, so one instance may also be bound to several domains, which then share its LaunchDarkly client. |
|
|
40
|
+
| ⚠️ | Eventing | LaunchDarkly data source status changes are emitted as `PROVIDER_READY`, `PROVIDER_STALE`, and `PROVIDER_ERROR`. Flag changes are emitted as `PROVIDER_CONFIGURATION_CHANGED` with the changed flag key. Provider gaps: a data source update that does not change the provider status, such as a new error while interrupted, is emitted again ([#36](https://github.com/launchdarkly/openfeature-ruby-server/pull/36)); and the provider relies on the OpenFeature SDK to emit `PROVIDER_READY` or `PROVIDER_ERROR` when `init` completes, which OpenFeature Ruby SDK 0.7.0 deprecates in favor of provider-emitted lifecycle events ([#39](https://github.com/launchdarkly/openfeature-ruby-server/issues/39)). |
|
|
41
|
+
| ✅ | Initialization | `init` reports whether the LaunchDarkly client became ready within the configured wait time; a failure results in the `ERROR` state so that cached or fallback flag data is still evaluated. Since LaunchDarkly Ruby SDK 8.19.0 a rejected SDK key is retried rather than failing permanently, so the client constructor waits the full wait time before initialization fails. |
|
|
42
42
|
| ✅ | Shutdown | `shutdown` closes the LaunchDarkly client. A closed client cannot be restarted, so a new provider instance is required afterward. |
|
|
43
43
|
| ✅ | Tracking | `track` sends a LaunchDarkly custom event for the evaluation context, with the tracking event value and remaining details attached. |
|
|
44
44
|
| ✅ | Transaction Context Propagation | Provided by the OpenFeature SDK, which merges the transaction context into the evaluation context before the provider is called; no provider support is required. |
|
|
45
45
|
| ✅ | Extending | This provider is itself an extension of the OpenFeature SDK. The underlying LaunchDarkly client is available through `provider.client` for functionality with no OpenFeature equivalent. |
|
|
46
|
-
| ✅ | Flag metadata | LaunchDarkly evaluation reason details are returned as OpenFeature flag metadata. See [Flag Metadata](#flag-metadata).
|
|
46
|
+
| ✅ | Flag metadata | LaunchDarkly evaluation reason details, including `overrideAffected`, are returned as OpenFeature flag metadata. See [Flag Metadata](#flag-metadata). |
|
|
47
47
|
|
|
48
48
|
<sub>Supported: ✅ | Partially supported: ⚠️ | Not supported: ❌</sub>
|
|
49
49
|
|
|
@@ -176,6 +176,7 @@ Evaluations include flag metadata for the LaunchDarkly specific parts of the eva
|
|
|
176
176
|
|---------------------|---------|--------------------------------------------------------------------|
|
|
177
177
|
| `variationIndex` | integer | The index of the returned variation. Absent for default values. |
|
|
178
178
|
| `inExperiment` | boolean | Present, and `true`, when the evaluation was part of an experiment. |
|
|
179
|
+
| `overrideAffected` | boolean | Present, and `true`, when a flag override affected the evaluation. |
|
|
179
180
|
| `ruleIndex` | integer | The index of the rule that matched. |
|
|
180
181
|
| `ruleId` | string | The identifier of the rule that matched. |
|
|
181
182
|
| `prerequisiteKey` | string | The key of the prerequisite flag that failed. |
|
|
@@ -28,8 +28,8 @@ Gem::Specification.new do |spec|
|
|
|
28
28
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
29
29
|
spec.require_paths = ["lib"]
|
|
30
30
|
|
|
31
|
-
spec.add_runtime_dependency "launchdarkly-server-sdk", "~> 8.
|
|
32
|
-
spec.add_runtime_dependency "openfeature-sdk", "
|
|
31
|
+
spec.add_runtime_dependency "launchdarkly-server-sdk", "~> 8.20"
|
|
32
|
+
spec.add_runtime_dependency "openfeature-sdk", ">= 0.6.1", "< 0.9"
|
|
33
33
|
|
|
34
34
|
# For more information and examples about making a new gem, check out our
|
|
35
35
|
# guide at: https://bundler.io/guides/creating_gem.html
|
|
@@ -9,13 +9,14 @@ module LaunchDarkly
|
|
|
9
9
|
class ResolutionDetailsConverter
|
|
10
10
|
VARIATION_INDEX_KEY = 'variationIndex'
|
|
11
11
|
IN_EXPERIMENT_KEY = 'inExperiment'
|
|
12
|
+
OVERRIDE_AFFECTED_KEY = 'overrideAffected'
|
|
12
13
|
RULE_INDEX_KEY = 'ruleIndex'
|
|
13
14
|
RULE_ID_KEY = 'ruleId'
|
|
14
15
|
PREREQUISITE_KEY_KEY = 'prerequisiteKey'
|
|
15
16
|
BIG_SEGMENTS_STATUS_KEY = 'bigSegmentsStatus'
|
|
16
17
|
|
|
17
|
-
private_constant :VARIATION_INDEX_KEY, :IN_EXPERIMENT_KEY, :
|
|
18
|
-
:PREREQUISITE_KEY_KEY, :BIG_SEGMENTS_STATUS_KEY
|
|
18
|
+
private_constant :VARIATION_INDEX_KEY, :IN_EXPERIMENT_KEY, :OVERRIDE_AFFECTED_KEY, :RULE_INDEX_KEY,
|
|
19
|
+
:RULE_ID_KEY, :PREREQUISITE_KEY_KEY, :BIG_SEGMENTS_STATUS_KEY
|
|
19
20
|
|
|
20
21
|
#
|
|
21
22
|
# @param detail [LaunchDarkly::EvaluationDetail]
|
|
@@ -61,6 +62,7 @@ module LaunchDarkly
|
|
|
61
62
|
|
|
62
63
|
metadata[VARIATION_INDEX_KEY] = variation_index unless variation_index.nil?
|
|
63
64
|
metadata[IN_EXPERIMENT_KEY] = true if reason.in_experiment
|
|
65
|
+
metadata[OVERRIDE_AFFECTED_KEY] = true if reason.override_affected
|
|
64
66
|
metadata[RULE_INDEX_KEY] = reason.rule_index unless reason.rule_index.nil?
|
|
65
67
|
metadata[RULE_ID_KEY] = reason.rule_id unless reason.rule_id.nil?
|
|
66
68
|
metadata[PREREQUISITE_KEY_KEY] = reason.prerequisite_key unless reason.prerequisite_key.nil?
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: launchdarkly-openfeature-server-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- LaunchDarkly
|
|
@@ -15,28 +15,34 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: '8.
|
|
18
|
+
version: '8.20'
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - "~>"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: '8.
|
|
25
|
+
version: '8.20'
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: openfeature-sdk
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
29
29
|
requirements:
|
|
30
|
-
- - "
|
|
30
|
+
- - ">="
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
32
|
version: 0.6.1
|
|
33
|
+
- - "<"
|
|
34
|
+
- !ruby/object:Gem::Version
|
|
35
|
+
version: '0.9'
|
|
33
36
|
type: :runtime
|
|
34
37
|
prerelease: false
|
|
35
38
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
39
|
requirements:
|
|
37
|
-
- - "
|
|
40
|
+
- - ">="
|
|
38
41
|
- !ruby/object:Gem::Version
|
|
39
42
|
version: 0.6.1
|
|
43
|
+
- - "<"
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: '0.9'
|
|
40
46
|
description: A LaunchDarkly provider for use with the OpenFeature SDK
|
|
41
47
|
email:
|
|
42
48
|
- team@launchdarkly.com
|