[sql-58] Add sessions kvdb->SQL migration itest#1211
[sql-58] Add sessions kvdb->SQL migration itest#1211ViktorT-11 wants to merge 1 commit intolightninglabs:migration-itest-accountsfrom
Conversation
Summary of ChangesHello @ViktorT-11, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the robustness of the database migration process by introducing a dedicated integration test for transitioning from KVDB to SQL. It centralizes and standardizes SQL migration management using Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces comprehensive integration test coverage for the sessions store migration from a bbolt backend to an SQL database. The changes involve significant additions to itest/litd_migration_test.go to set up, assert, and verify session data both before and after the migration, using direct database access and litcli commands. The test suite covers various session configurations, including privacy flags, feature configurations, macaroon recipes, linked accounts (including removed ones), and linked session groups, as well as handling legacy duplicate session IDs. The implementation is thorough and well-structured, ensuring robust validation of the migration process. No critical, high, or medium severity issues were identified.
Implement itest coverage for migrating session data from kvdb to sql. The itest coverage mimics the unit tests in sessions/sql_migration_test.go, except for the randomized migration tests. This coverage ensures that the full kvdb->SQL migration flow for litd works as expected for the sessions store.
f9bb301 to
c452449
Compare
|
@ViktorT-11, remember to re-request review from reviewers when ready |
Based on #1207
Implements part of step 6. of "Phase 3" in #917.
This PR implements itest coverage for the migration of the sessions store.
The benefit of adding migration coverage through itests compared to just unit tests, is that this will test the full migration flow in litd, as it would be executed in production for a user who switches from a bbolt database backend to an SQL database backend.
Additionally, as itests have access to the full litcli, we can also assert parts of the migration through litcli commands, as the end user would experience it.