-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[PM-28555] Add idempotent sproc to create My Items collections #6801
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
base: main
Are you sure you want to change the base?
Conversation
- DRY up collection arrangement - DRY up tests because bulk and non-bulk share same behavior - use EF native AddRange instead of bulk insert, because we expect smaller data sizes on self-host
|
Claude finished @eliykat's task in 3m 45s —— View job Overall Assessment: APPROVE This PR successfully adds an idempotent stored procedure to create My Items collections and refactors the collection creation logic into a centralized utility. The implementation properly handles SQL injection through parameterized queries, includes comprehensive integration tests, and follows established codebase patterns. The TOCTOU race condition mentioned in the PR description is an explicitly accepted architectural risk per the team's decision not to enforce uniqueness constraints at the database level. Code Review DetailsSecurity: ✅ All queries properly parameterized - no SQL injection risks Key Implementation Points Verified:
No findings to report - code meets security, correctness, and quality standards. 🚢 Ready to merge after required approvals. |
|
Great job! No new security vulnerabilities introduced in this pull request |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6801 +/- ##
==========================================
+ Coverage 54.93% 58.96% +4.02%
==========================================
Files 1927 1935 +8
Lines 85457 85578 +121
Branches 7648 7657 +9
==========================================
+ Hits 46949 50463 +3514
+ Misses 36723 33244 -3479
- Partials 1785 1871 +86 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|

🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-28555
📔 Objective
Add a sproc to:
After some iteration in #6791 , we are accepting some time-of-check time-of-use risk here. Architecture did not want to enforce uniqueness at the database level so we will keep it simple, filter out existing My Items collections in the sproc, and we can increase the isolation level later if it proves to be a problem.
📸 Screenshots
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:) or similar for great changes:memo:) or ℹ️ (:information_source:) for notes or general info:question:) for questions:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:) for suggestions / improvements:x:) or:warning:) for more significant problems or concerns needing attention:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt:pick:) for minor or nitpick changes