-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[14] graph/db: implement more SQLStore methods #9938
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
Conversation
Important Review skippedAuto reviews are limited to specific labels. 🏷️ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@bhandras: review reminder |
966e56d
to
f909068
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, these PRs are really easy to get through 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice work, LGTM 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ✨
ctx, db, dbPol1, dbPol2, edge.ChannelID, node1, node2, | ||
) | ||
if err != nil { | ||
return fmt.Errorf("unable to build channel "+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should we standardize these errors so we wouldn't need to duplicate the strings (and makes it easier to match against them if needed). (ofc if you agree can come in a later PR).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool yes, can do - will do in follow up 👍
by standardise, do you mean just letting the function itself return the string in question and then just doing return err
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just meant that it could be useful to create predefined errors for those that we reuse across functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool - made a note here to track: #9795
And run `TestEdgeInsertionDeletion` against our SQL backends.
And run `TestEdgeInfoUpdates` against our SQL backends.
Which lets us then run `TestFilterKnownChanIDsZombieRevival` and `TestFilterKnownChanIDs` against our SQL backends.
Which lets us run `TestFilterChannelRange` against our SQL backends.
Which lets us run `TestNodeIsPublic` against our SQL DB backends. Note that we need to tweak the tests a little bit so that `AddLightningNode` for the same node is always called with a newer LastUpdate time else it will fail the SQL constraint that only allows the upsert if the update is newer than the persisted one.
Which lets us run `TestDisabledChannelIDs` against our SQL DB backends.
cc @guggero for override merge 🙏 - check-commits is getting stuck for some reason - but it does pass locally. |
Here, we implement:
Part of #9795
See #9932 for the full picture that we are aiming at