Repository navigation
multi: switch on graph SQL migration - #10163
Conversation
There was a problem hiding this comment.
Summary of Changes
Hello @ellemouton, 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 integrates the graph SQL migration into the main production build of the application. Previously, this migration logic might have been confined to test or development environments. By moving it into the production build, the system is prepared to transition the graph data from a key-value store to a native SQL schema, enabling a more robust and scalable data management approach for graph-related information. This change is part of a broader effort to modernize the database backend.
Highlights
- Production-ready Graph Migration: The core logic for migrating graph data from the key-value store to a native SQL schema (version 10) has been moved into the production build configuration, enabling the system to transition graph data in a production environment.
- Unified Database Builder: The "DefaultDatabaseBuilder" now directly handles the attachment of the graph migration function and the initialization of the SQL-backed graph store, centralizing database setup and streamlining the build process.
- Refactored Migration Definitions: Graph migration entries (versions 9 and 10) have been moved from development-specific migration lists to the main "sqldb/migrations.go" file, signifying their official inclusion and broader applicability.
- Streamlined Test Configuration: Configuration files related to testing native SQL have been simplified by removing redundant graph migration logic, as this is now part of the production build, reducing complexity and potential for discrepancies.
- Test Adaptations: The "lnd_graph_migration_test.go" test no longer requires a specific build tag to run, reflecting that the graph migration is now a standard part of the production build process and its associated tests should run by default.
Using Gemini Code Assist
The 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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.
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
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
3ce9233 to
7ceeba7
Compare
7ceeba7 to
27d44da
Compare
27d44da to
dafaad9
Compare
bhandras
left a comment
There was a problem hiding this comment.
LGTM, great to see this finally happening! 🎉
| // getSQLMigration returns a migration function for the given version. | ||
| func (d *DefaultDatabaseBuilder) getSQLMigration(ctx context.Context, | ||
| version int, kvBackend kvdb.Backend) (func(tx *sqlc.Queries) error, | ||
| func (d *DefaultDatabaseBuilder) getSQLMigration(_ context.Context, |
There was a problem hiding this comment.
Do we still need the test_native_sql tag?
There was a problem hiding this comment.
yeah - it is being used for the payments SQL work
In this commit, the graph SQL migration is added to the production build.
dafaad9 to
318f4aa
Compare
ziggie1984
left a comment
There was a problem hiding this comment.
LGTM, Congratulations finishing this huge milestone and leading the way in the overall SQL development in LND 🎉💪🤝
This PR moves the graph SQL migration into the prod build.
With this, the graph SQL migration work is complete.
Fixes #9795