Skip to content
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

[sql-8]: run itests against all DB types #955

Merged
merged 4 commits into from
Feb 24, 2025

Conversation

ellemouton
Copy link
Member

@ellemouton ellemouton commented Jan 23, 2025

This completes the final step of the accounts section in phase 1 of #917

Here we run our CI itests against all DB types. As of this PR, that means that the accounts store is spun up with different DB backends for the various iterations.

(more detailed description to follow)

@ellemouton ellemouton self-assigned this Jan 23, 2025
@ellemouton ellemouton added database Postgres and sql related issues no-changelog This PR is does not require a release notes entry tests sql-ize labels Jan 23, 2025
@ellemouton ellemouton force-pushed the sql8Accounts8 branch 4 times, most recently from 9e1bae0 to dd41868 Compare January 29, 2025 15:01
In this commit, we introduce a DevConfig struct which is embedded in the
main lit Config struct. It is defined in two separate files that are
made mutually exclusive using the `dev` build tag. The idea of this
struct is that it allows us to expose additional config options to LiT
if we build in a development environment such as our itests. In other
words, we will be able to start developing features and testing them
before making them available to users via the production build.

As of this commit, both implementations of the struct are the same.
In this commit, we expand the dev build's DevConfig options struct with
Postgres and SQL backend options that can be used to initialise the
account store.
Add the ability to specify the db backend to run use for accounts when
running itests.

With this commit, you can run something like: `make itest
dbbackend=sqlite`.
In this commit, we ensure that our CI runs our itests against all
available DB backends. Currently, this will only affect the accounts
store.
Copy link
Contributor

@ViktorTigerstrom ViktorTigerstrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Niiiiiiiice, looks great 🚀!!

The itest CI check for all individual backends have passed, but the check hasn't reported back though. Is there something additional that needs to be added?

Copy link
Contributor

@bitromortac bitromortac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🏁 ⚡

@@ -216,7 +216,7 @@ type LightningTerminal struct {
middleware *mid.Manager
middlewareStarted bool

accountsStore *accounts.BoltStore
accountsStore accounts.Store
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@ellemouton
Copy link
Member Author

The itest CI check for all individual backends have passed, but the check hasn't reported back though. Is there something additional that needs to be added?

no - it's just an artifact from the previous name (since we now longer use that name). Might mean needing to clear a GH cache or something

@ellemouton ellemouton merged commit ad38fcb into lightninglabs:master Feb 24, 2025
21 checks passed
@ellemouton ellemouton deleted the sql8Accounts8 branch February 24, 2025 13:11
@ellemouton
Copy link
Member Author

@ViktorTigerstrom - turns out the reason was just that GH still had that old CI name listed under branch protection rules as a "Required" step. So just had to remove that and add the "Required" check for the new names :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database Postgres and sql related issues no-changelog This PR is does not require a release notes entry sql-ize tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants