Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.x] Allow external drivers to retrieve defined features for the given scope #127

Merged
merged 3 commits into from
Nov 12, 2024

Conversation

timacdonald
Copy link
Member

This PR introduces a new interface that allows 3rd party drivers that define features in their own platform to provide a list of features for the given scope.

One of the nice things about Pennant is it has support for 3rd party drivers, such as LaunchDarkly. When using an external driver where the features are defined in a different system, it is not currently possible to retrieve the features for a given user with the recent improvements made to the Feature::all() functionality.

This PR introduces a new interface allowing them to provide a feature list if they wish.

@tomirons
Copy link

Just tested this and it works perfectly!

@taylorotwell taylorotwell merged commit 1a3a06e into 1.x Nov 12, 2024
9 checks passed
@taylorotwell taylorotwell deleted the external-drivers branch November 12, 2024 14:58
@cosmastech
Copy link
Contributor

cosmastech commented Nov 12, 2024

@tomirons what are you using for LaunchDarkly+Pennant? Is there a composer package, or did you roll your own?

edit: my team is about to implement LD in a new app 😅

@tomirons
Copy link

@cosmastech there are a couple of drivers already for LaunchDarkly but the SDK versions are outdated. We're currently implementing our own driver.

One of the last hurdles is finding a way to efficiently cache the results from LD. The response from LD can take anywhere from ~150ms to ~1000ms and we don't want that to impact users.

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.

4 participants