Skip to content

fix(storage): add PinnableSnapshot interface for atomic evaluation#5771

Open
erka wants to merge 3 commits into
mainfrom
rd/v1/evals
Open

fix(storage): add PinnableSnapshot interface for atomic evaluation#5771
erka wants to merge 3 commits into
mainfrom
rd/v1/evals

Conversation

@erka
Copy link
Copy Markdown
Contributor

@erka erka commented Apr 22, 2026

Introduces a PinnableSnapshot interface that captures a snapshot at the start
of a gRPC request and pins it in the context. Subsequent storage reads
during the same evaluation request reuse the pinned snapshot, ensuring
consistent atomic evaluation without acquiring locks on every read.
Also, ignore mocks in codecov

@erka erka requested a review from a team as a code owner April 22, 2026 15:07
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Apr 22, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

❌ Patch coverage is 9.37500% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.18%. Comparing base (935d619) to head (1a20119).
⚠️ Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
internal/storage/fs/local/store.go 14.28% 5 Missing and 1 partial ⚠️
internal/storage/fs/object/store.go 14.28% 5 Missing and 1 partial ⚠️
internal/storage/fs/oci/store.go 14.28% 5 Missing and 1 partial ⚠️
internal/server/middleware/grpc/middleware.go 0.00% 4 Missing ⚠️
internal/cmd/grpc.go 0.00% 2 Missing ⚠️
internal/storage/fs/git/store.go 0.00% 2 Missing ⚠️
internal/storage/fs/store.go 0.00% 2 Missing ⚠️
internal/server/evaluator.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5771      +/-   ##
==========================================
+ Coverage   58.09%   65.18%   +7.08%     
==========================================
  Files         177      169       -8     
  Lines       16773    14177    -2596     
==========================================
- Hits         9745     9241     -504     
+ Misses       6022     4257    -1765     
+ Partials     1006      679     -327     
Flag Coverage Δ
unittests 65.18% <9.37%> (+7.08%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@erka erka added the v1 Flipt v1 label Apr 22, 2026
@erka erka requested a review from markphelps April 22, 2026 20:02
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Apr 23, 2026
@erka erka changed the title fix(storage/object): add RunningContext for atomic evaluation fix(storage): add PinnableSnapshot interface for atomic evaluation Apr 23, 2026
@erka erka marked this pull request as draft April 23, 2026 11:45
Introduces a PinnableSnapshot interface that captures a snapshot at the start
of a gRPC request and pins it in the context. Subsequent storage reads
during the same evaluation request reuse the pinned snapshot, ensuring
consistent atomic evaluation without acquiring locks on every read.
Also, ignore mocks in codecov

Signed-off-by: Roman Dmytrenko <rdmytrenko@gmail.com>
@erka erka marked this pull request as ready for review April 23, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files. v1 Flipt v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants