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

feat: Add Flagsmith provider #89

Merged
merged 13 commits into from
Oct 24, 2023
Merged

Conversation

vpetrusevici
Copy link
Contributor

@vpetrusevici vpetrusevici commented Oct 18, 2023

This PR

Adds a library project for Flagsmith provider with implementation and tests

Related Issues

#90
Flagsmith/flagsmith-dotnet-client#78

Notes

We are going to use OpenFeature and Flagsmith in our projects. Unfortunately dotnet-sdk-contrib doesn't have Flagsmith provider, so i implemented it.

Follow-up Tasks

  • Implement
  • Add unit tests for general funcations
  • Add unit tests for using OpenFeature evaluation context
  • Review from Flagsmith team

How to test

Just create FlagsmithProvider using FlagsmithClient or FlagsmithConfiguration according to https://github.com/Flagsmith/flagsmith-dotnet-client/tree/main/Example

@vpetrusevici vpetrusevici requested a review from a team as a code owner October 18, 2023 13:05
@vpetrusevici vpetrusevici changed the title Add Flagsmith provider feat: Add Flagsmith provider Oct 18, 2023
@beeme1mr
Copy link
Member

Hey @dabeeeenster, could someone from the Flagsmith team please take a look when you have a moment?

@toddbaert toddbaert self-requested a review October 18, 2023 18:42
Copy link
Member

@toddbaert toddbaert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this addition! I made a few comments, but this looks like a great addition!

I'm marking as "request changes" for now, primarily because I'd like an approval from a representative from Flagsmith first.

Once we have identified a Flagsmith representative, I will add you and them to https://github.com/open-feature/dotnet-sdk-contrib/blob/main/.github/component_owners.yml as part of this PR.

vpetrusevici and others added 4 commits October 23, 2023 14:22
Co-authored-by: Matthew Elwell <mjelwell89@gmail.com>
Signed-off-by: vpetrusevici <vladimir.petrusevici@outlook.com>
Signed-off-by: Vladimir Petrusevici <vladimir.petrusevici@outlook.com>
Signed-off-by: Vladimir Petrusevici <vladimir.petrusevici@outlook.com>
Signed-off-by: Vladimir Petrusevici <vladimir.petrusevici@outlook.com>
Signed-off-by: Vladimir Petrusevici <vladimir.petrusevici@outlook.com>
@vpetrusevici
Copy link
Contributor Author

Hi @beeme1mr,
Do we need anything else?

Copy link
Member

@matthewelwell matthewelwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from a Flagsmith perspective.

Copy link
Member

@beeme1mr beeme1mr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just had one question about the icon, but the rest looks good. @toddbaert, did you have any other concerns?

Before we merge, could you lease update the component_owners.yml to include @matthewelwell, novakzaballa, and yourself?

Signed-off-by: Vladimir Petrusevici <vladimir.petrusevici@outlook.com>
@vpetrusevici
Copy link
Contributor Author

I just had one question about the icon, but the rest looks good. @toddbaert, did you have any other concerns?

Before we merge, could you lease update the component_owners.yml to include @matthewelwell, novakzaballa, and yourself?

done

@beeme1mr
Copy link
Member

Could you please also add a readme under src/OpenFeature.Contrib.Providers.Flagsmith/? It should have installation instructions and usage examples. Sorry, I didn't notice that it was missing in my last review!

Signed-off-by: Vladimir Petrusevici <vladimir.petrusevici@outlook.com>
@vpetrusevici
Copy link
Contributor Author

Could you please also add a readme under src/OpenFeature.Contrib.Providers.Flagsmith/? It should have installation instructions and usage examples. Sorry, I didn't notice that it was missing in my last review!

I just copied readme form flagd provider and adapted to Flagsmith provider.

src/OpenFeature.Contrib.Providers.Flagsmith/README.md Outdated Show resolved Hide resolved
src/OpenFeature.Contrib.Providers.Flagsmith/README.md Outdated Show resolved Hide resolved
src/OpenFeature.Contrib.Providers.Flagsmith/README.md Outdated Show resolved Hide resolved
vpetrusevici and others added 3 commits October 24, 2023 09:06
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Signed-off-by: vpetrusevici <vladimir.petrusevici@outlook.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Signed-off-by: vpetrusevici <vladimir.petrusevici@outlook.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Signed-off-by: vpetrusevici <vladimir.petrusevici@outlook.com>
@vpetrusevici
Copy link
Contributor Author

@toddbaert can we complete the PR? :)

@toddbaert toddbaert self-requested a review October 24, 2023 18:21
Copy link
Member

@toddbaert toddbaert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vpetrusevici very nice! I like the delegate implementation. This is a great addition!

I'm approving but you have some minor formatting issues (you should be able to test your fixes with dotnet-format --folder --check). I'll keep an eye on the PR and re-run the checks / merge as soon as they pass.

Signed-off-by: Vladimir Petrusevici <vladimir.petrusevici@outlook.com>
@vpetrusevici
Copy link
Contributor Author

vpetrusevici commented Oct 24, 2023

@vpetrusevici very nice! I like the delegate implementation. This is a great addition!

I'm approving but you have some minor formatting issues (you should be able to test your fixes with dotnet-format --folder --check). I'll keep an eye on the PR and re-run the checks / merge as soon as they pass.

I added #pragma warning disable format for json in tests. it's strange but dotnet-format tries to fix this string...

@toddbaert toddbaert merged commit b7ba62e into open-feature:main Oct 24, 2023
9 checks passed
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.

6 participants