feat: Report provider name and version to LaunchDarkly - #51
Draft
kinyoklion wants to merge 2 commits into
Draft
Conversation
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
3 tasks
Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The provider now identifies itself as the wrapper, so requests it makes are attributed to the OpenFeature provider rather than to the Python SDK.
wrapper_nametoopen-feature-python-serverandwrapper_versionto the provider versionConfig.with_wrapper_information, added in python-server-sdk#501 — blocked until that is released>=9.17.0, the release expected to contain that methodld_openfeature/version.py, kept current by release-pleaseRequirements
Implementation details
Describe the solution you've provided
This matches the Java and .NET providers, which derive a config from the application-supplied one:
The provider version comes from a new
ld_openfeature/version.py, added toextra-filesinrelease-please-config.jsonso the constant is bumped with each release the same waydocs/conf.pyalready is.Describe alternatives you've considered
An earlier revision of this PR copied the
Configand assigned its name-mangled private wrapper fields, because wrapper information could only be supplied to the constructor. That depends on SDK internals, hence the SDK change instead.Additional context
The floor of
>=9.17.0is a guess at the version that will carrywith_wrapper_information(current release is 9.16.1, and the SDK change is afeat:). It needs confirming once that release goes out, and CI here will fail until then since no published SDK has the method.Testing
test_provider_identifies_itself_as_the_wrapperasserts the client's config carries the provider's name and version, and that the config passed in by the caller is unchanged. Verified locally against the SDK branch installed from source (67 tests pass, mypy clean).Link to Devin session: https://app.devin.ai/sessions/0c452d209ec54b068ba120b4c92b8f6c
Requested by: @kinyoklion