Skip to content

Conversation

@ziggie1984
Copy link
Collaborator

@ziggie1984 ziggie1984 commented Oct 21, 2025

Builds on top of the latest payment SQL changes and threads the context through payment functions.

This is part 1 threads the context up to the Router Level. We can even further thread the context up to the rpc level, however we need to be careful which functions we allow to be canceled by the RPC level. But this is tackled in Part 2.

@ziggie1984 ziggie1984 changed the base branch from master to elle-payment-sql-series-new October 21, 2025 08:37
@ziggie1984 ziggie1984 force-pushed the introduce-sql-schema-payments-part-5 branch from 283469a to bc81c3a Compare October 21, 2025 08:43
@ziggie1984 ziggie1984 added payments Related to invoices/payments refactoring labels Oct 21, 2025
@ziggie1984 ziggie1984 added this to the v0.21.0 milestone Oct 21, 2025
@ziggie1984 ziggie1984 added this to v0.21 Oct 21, 2025
@ziggie1984 ziggie1984 self-assigned this Oct 21, 2025
@saubyk saubyk moved this to In progress in v0.21 Oct 23, 2025
@ziggie1984 ziggie1984 force-pushed the introduce-sql-schema-payments-part-5 branch from bc81c3a to 7e6cabd Compare November 11, 2025 17:51
@ziggie1984 ziggie1984 marked this pull request as ready for review November 11, 2025 17:59
@ziggie1984 ziggie1984 force-pushed the elle-payment-sql-series-new branch 4 times, most recently from e991cd0 to 6860702 Compare November 13, 2025 06:45
We wrap the fetchPayment db call and catch the case where no errors
are found in the db, where we now return the ErrPaymentNotInitiated
error.
Now that every method of the interface was implemented we can
remove the embedded reference we put into place for the sql store
implementation so that the interface would succeed. This is now
removed.
Since now the sql backend is more strict in using the same
session key we refactor the helper so that we can easily change
the session key for every new attempt.
We make the QueryPayments test db agnostic and also keep a small
test for querying the duplicate payments case in the kv world.
In commit adds the harness which will be used to run db agnostic
tests against the kv and sql backend. We have adopted all the
unit tests so far so that with this commit all the payment tests
not specifically put into the kv_store_test.go should all pass
for all backends.
The design of the sql and kv db are a bit different. A harness
interface is introduced which allows us to unit most of the test
and keep the backend specific tests at a minimum.
@ziggie1984 ziggie1984 force-pushed the introduce-sql-schema-payments-part-5 branch from 7e6cabd to a5be3ed Compare November 16, 2025 07:33
@ziggie1984 ziggie1984 force-pushed the introduce-sql-schema-payments-part-5 branch from a5be3ed to d76ffcd Compare November 16, 2025 14:51
@ziggie1984 ziggie1984 moved this from In progress to In review in v0.21 Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

payments Related to invoices/payments refactoring

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

1 participant