Skip to content

fix!: raise error if the flag wasn't found using the in-memory provider#228

Merged
beeme1mr merged 4 commits into
mainfrom
update-inmem-provider
Nov 1, 2023
Merged

fix!: raise error if the flag wasn't found using the in-memory provider#228
beeme1mr merged 4 commits into
mainfrom
update-inmem-provider

Conversation

@beeme1mr

@beeme1mr beeme1mr commented Nov 1, 2023

Copy link
Copy Markdown
Member

This PR

  • Updated the in-memory provider to throw if the flag isn't found
  • Removed duplicate flag keys from the in-memory provider flag config

Notes

I marked this as a breaking fix because it changes the method signature of the in-memory provider. Since we're sub-1.0, this will be treated as a minor version change, but highlight the change more predominately in the change log.

I originally intended to only remove the duplicate keys in this PR. If you would prefer that I split these into two separate PRs, please let me know.

Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
@toddbaert

Copy link
Copy Markdown
Member

@beeme1mr writes Python now 😎

@toddbaert toddbaert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Makes sense to me conceptually.

@federicobond federicobond left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@federicobond

Copy link
Copy Markdown
Member

Looks like some of the gherkin tests are failing due to the InMemoryFlag change, could you update those so it's ready to merge?

@beeme1mr

beeme1mr commented Nov 1, 2023

Copy link
Copy Markdown
Member Author

@federicobond I'll try 😟

Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
@beeme1mr

beeme1mr commented Nov 1, 2023

Copy link
Copy Markdown
Member Author

It was easier than I thought... perhaps I am a Python developer now 😄

@codecov

codecov Bot commented Nov 1, 2023

Copy link
Copy Markdown

Codecov Report

Merging #228 (a7a33ac) into main (f74eda0) will increase coverage by 0.21%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #228      +/-   ##
==========================================
+ Coverage   93.63%   93.84%   +0.21%     
==========================================
  Files          16       16              
  Lines         440      439       -1     
==========================================
  Hits          412      412              
+ Misses         28       27       -1     
Flag Coverage Δ
unittests 93.84% <100.00%> (+0.21%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
openfeature/provider/in_memory_provider.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@beeme1mr beeme1mr merged commit 0c314ab into main Nov 1, 2023
@beeme1mr beeme1mr deleted the update-inmem-provider branch November 1, 2023 18:56
kikihakiem pushed a commit to ResalApps/openfeature-python-sdk that referenced this pull request Aug 28, 2025
…1.5 (open-feature#228)

Co-authored-by: renovate[bot] <29139614+renovate[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.

3 participants