fix(virtualmodels): persist session_affinity in the MongoDB store - #734
fix(virtualmodels): persist session_affinity in the MongoDB store#734SantiagoDePolonia wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughMongoDB virtual model persistence now stores and restores the optional ChangesVirtual model persistence
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change preserves the session-affinity setting in MongoDB-backed virtual models, including an explicit false value, while leaving other backends unchanged. No actionable merge-blocking risk remains after normal checks and review. Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Confidence Score: 5/5Safe to merge based on successful MongoDB integration coverage of the changed persistence behavior. The reviewed change has no remaining findings. The executed test covered all three session-affinity states and both transitions that clear a previously stored explicit value. Files Needing Attention: No files need changes.
What T-Rex did
Reviews (1): Last reviewed commit: "fix(virtualmodels): persist session_affi..." | Re-trigger Greptile |
The MongoDB virtual-models store never wrote or read `session_affinity`: the document struct had no field for it, `Upsert` did not `$set` it, and the decoder dropped it. On MongoDB, setting `session_affinity: false` on a load-balanced redirect silently reverted to the default (sticky sessions enabled) on the next refresh. The SQL stores were unaffected.
This adds the field to the Mongo document, writes it on upsert, reads it back, and extends the cross-backend store round-trip test so an explicit `false` survives and an unset value stays `nil`. The test fails on `main` against MongoDB and passes with the fix; SQLite and PostgreSQL pass before and after.
Summary by CodeRabbit