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: implement in-memory provider #232

Merged
merged 16 commits into from
Feb 10, 2024
Merged

feat: implement in-memory provider #232

merged 16 commits into from
Feb 10, 2024

Conversation

toddbaert
Copy link
Member

@toddbaert toddbaert commented Feb 8, 2024

Implements in-memory provider as per spec, updates gherkin to use spec version, removes flagd deps.

Thanks to @CommCody

I could have added more unit tests for the in-memory provider, but the e2e suite tests most of it. I'll create a "good first issue" for others to add more unit tests, but I'd like to get this merged sooner than later because I believe it's blocking this and this

Resolves: #165

@toddbaert toddbaert requested a review from a team as a code owner February 8, 2024 21:47
@toddbaert toddbaert force-pushed the add-in-memory-provider branch 2 times, most recently from bd66a77 to f1e5048 Compare February 8, 2024 21:50
Copy link

codecov bot commented Feb 8, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (1d523cf) 93.60% compared to head (70b7240) 94.16%.

Files Patch % Lines
src/OpenFeature/Providers/Memory/Flag.cs 96.96% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #232      +/-   ##
==========================================
+ Coverage   93.60%   94.16%   +0.56%     
==========================================
  Files          23       25       +2     
  Lines         954     1046      +92     
  Branches      104      112       +8     
==========================================
+ Hits          893      985      +92     
+ Misses         38       37       -1     
- Partials       23       24       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

toddbaert and others added 2 commits February 8, 2024 16:51
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: Joris Goovaerts <1333336+CommCody@users.noreply.github.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Copy link
Member

@askpt askpt left a comment

Choose a reason for hiding this comment

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

Added a few minor comments. It seems the unit test coverage is failing due to the lack of testing when exceptions happen.

src/OpenFeature/Providers/Memory/Flag.cs Outdated Show resolved Hide resolved
src/OpenFeature/Providers/Memory/Flag.cs Outdated Show resolved Hide resolved
src/OpenFeature/Providers/Memory/Flag.cs Outdated Show resolved Hide resolved
src/OpenFeature/Providers/Memory/Flag.cs Show resolved Hide resolved
toddbaert and others added 4 commits February 9, 2024 09:25
Co-authored-by: André Silva <2493377+askpt@users.noreply.github.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: André Silva <2493377+askpt@users.noreply.github.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: André Silva <2493377+askpt@users.noreply.github.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: André Silva <2493377+askpt@users.noreply.github.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
@toddbaert toddbaert requested a review from askpt February 9, 2024 15:28
@toddbaert
Copy link
Member Author

@askpt Thanks for the review. Please check again when you have time: I added tests and applied all but one of your suggestions.

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
@askpt
Copy link
Member

askpt commented Feb 9, 2024

@askpt Thanks for the review. Please check again when you have time: I added tests and applied all but one of your suggestions.

@toddbaert LGTM! There are some checks still failing

@toddbaert
Copy link
Member Author

@askpt Thanks for the review. Please check again when you have time: I added tests and applied all but one of your suggestions.

@toddbaert LGTM! There are some checks still failing

Ya I still have to up the coverage a bit.

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
@toddbaert toddbaert merged commit 1082094 into main Feb 10, 2024
15 checks passed
@toddbaert toddbaert deleted the add-in-memory-provider branch February 10, 2024 19:49
beeme1mr pushed a commit that referenced this pull request Mar 12, 2024
🤖 I have created a release *beep* *boop*
---


##
[1.5.0](v1.4.1...v1.5.0)
(2024-03-12)


### 🐛 Bug Fixes

* Add targeting key
([#231](#231))
([d792b32](d792b32))
* Fix NU1009 reference assembly warning
([#222](#222))
([7eebcdd](7eebcdd))
* invalid editorconfig
([#244](#244))
([3c00757](3c00757))


### ✨ New Features

* Flag metadata
([#223](#223))
([fd0a541](fd0a541))
* implement in-memory provider
([#232](#232))
([1082094](1082094))


### 🧹 Chore

* bump spec version badge
([#246](#246))
([ebf5552](ebf5552))
* cleanup unused usings 🧹
([#240](#240))
([cdc1bee](cdc1bee))
* **deps:** update actions/upload-artifact action to v4.3.0
([#203](#203))
([0a7e98d](0a7e98d))
* **deps:** update actions/upload-artifact action to v4.3.1
([#233](#233))
([cfaf1c8](cfaf1c8))
* **deps:** update codecov/codecov-action action to v3.1.5
([#209](#209))
([a509b1f](a509b1f))
* **deps:** update codecov/codecov-action action to v3.1.6
([#226](#226))
([a577a80](a577a80))
* **deps:** update dependency coverlet.collector to v6.0.1
([#238](#238))
([f2cb67b](f2cb67b))
* **deps:** update dependency fluentassertions to v6.12.0
([#215](#215))
([2c237df](2c237df))
* **deps:** update dependency microsoft.net.test.sdk to v17.8.0
([#216](#216))
([4cb3ae0](4cb3ae0))
* **deps:** update dependency nsubstitute to v5.1.0
([#217](#217))
([3be76cd](3be76cd))
* **deps:** update dependency openfeature.contrib.providers.flagd to
v0.1.8 ([#211](#211))
([c1aece3](c1aece3))
* **deps:** update xunit-dotnet monorepo
([#236](#236))
([fa25ece](fa25ece))
* Enable Central Package Management (CPM)
([#178](#178))
([249a0a8](249a0a8))
* Enforce coding styles on build
([#242](#242))
([64699c8](64699c8))
* More sln cleanup
([#206](#206))
([bac3d94](bac3d94))
* SourceLink is built-in for .NET SDK 8.0.100+
([#198](#198))
([45e2c86](45e2c86))
* Sync ci.yml with contrib repo
([#196](#196))
([130654b](130654b))
* Sync release.yml with ci.yml following
[#173](#173)
([#195](#195))
([eba8848](eba8848))


### 📚 Documentation

* fix hook ecosystem link
([#229](#229))
([cc6c404](cc6c404))
* update the feature table key
([f8724cd](f8724cd))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

[FEATURE] add in-memory provider to SDK
3 participants