Skip to content

feat: add update flag methods to in-memory provider - #622

Merged
gruebel merged 1 commit into
mainfrom
add-update-flag
Aug 30, 2026
Merged

feat: add update flag methods to in-memory provider#622
gruebel merged 1 commit into
mainfrom
add-update-flag

Conversation

@gruebel

@gruebel gruebel commented Aug 30, 2026

Copy link
Copy Markdown
Member

This PR

  • it is very close to @aepfli implementation, just slightly aligned to the current code style

Related Issues

Fixes #620

Signed-off-by: gruebel <anton.gruebel@gmail.com>
@gruebel
gruebel requested review from a team as code owners August 30, 2026 14:45
@gruebel
gruebel requested a review from aepfli August 30, 2026 14:45
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6720de68-fc36-4eaf-914b-f8547086462d

📥 Commits

Reviewing files that changed from the base of the PR and between 371aca1 and adaa01f.

📒 Files selected for processing (2)
  • openfeature/provider/in_memory_provider.py
  • tests/provider/test_in_memory_provider.py

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

InMemoryProvider now supports complete and individual flag updates, flag lookup, and provider configuration-change events. Tests verify flag replacement and event details for added, replaced, and removed keys.

Changes

In-memory provider updates

Layer / File(s) Summary
Flag management API
openfeature/provider/in_memory_provider.py
Adds APIs to replace all flags, replace one flag, retrieve a flag, and emit configuration-change events with affected keys.
Flag update and event tests
tests/provider/test_in_memory_provider.py
Tests complete flag replacement, individual flag updates, flag lookup, changed-key reporting, and event messages.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to adaa0

This localized change adds update-flag methods to the in-memory provider, and no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: aepfli

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the addition of flag update methods to the in-memory provider.
Description check ✅ Passed The description identifies the implementation approach and links the change to issue #620, which matches the changeset.
Linked Issues check ✅ Passed The implementation adds flag-set replacement, single-flag updates, flag retrieval, and provider configuration-change events. Full replacement reports the union of previous and new keys, satisfying iss…
Out of Scope Changes check ✅ Passed All reported code changes support in-memory provider flag updates or their event behavior. No unrelated changes are present.
Full details: Linked Issues check

Explanation

The implementation adds flag-set replacement, single-flag updates, flag retrieval, and provider configuration-change events. Full replacement reports the union of previous and new keys, satisfying issue #620.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.39%. Comparing base (371aca1) to head (adaa01f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #622      +/-   ##
==========================================
+ Coverage   98.36%   98.39%   +0.02%     
==========================================
  Files          45       45              
  Lines        2514     2561      +47     
==========================================
+ Hits         2473     2520      +47     
  Misses         41       41              
Flag Coverage Δ
unittests 98.39% <100.00%> (+0.02%) ⬆️

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gruebel
gruebel merged commit 93296c6 into main Aug 30, 2026
15 checks passed
@gruebel
gruebel deleted the add-update-flag branch August 30, 2026 14:58
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.

in-memory provider cannot update its flag set or emit PROVIDER_CONFIGURATION_CHANGED

2 participants