-
Notifications
You must be signed in to change notification settings - Fork 24
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
Added data_dir configuration options. #192
Conversation
I tested both CLI flag and config file, it seems good. Thank you ✨ |
For my particular use case I'm just setting both |
Thank you addressing it. I think that is better! But I found something strange. It seems |
2de6cd0
to
9ecfb0a
Compare
Ah, right, I forgot that |
Ran and everything seems to work and found that we might want to set a broad definition (as I'll need to change the lndk.conf pr #193 too 😓 my bad). First we must separate
Currently they are the same directory, So what would that mean? We might wanna do a breaking change on logs and app data, fix that Enough blabla, we could just go ahead with this PR and maybe a following one addressing the other issues or whatever works best. @orbitalturtle or @dunxen might have a thought on doing breaking changes, but as LNDK is experimental I think it would be just acceptable. |
Yeah, relatively frequent breaking changes are still fine IMO even if it relates to persistence. They'll be documented in the following release. Sorry for the delay here! I'll be attending to a handful of LNDK PRs this weekend! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #192 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 1 1
Lines 128 135 +7
======================================
- Misses 128 135 +7 ☔ View full report in Codecov by Sentry. |
Thanks for the suggestions here, @a-mpch! A few things:
@a-mpch, @kannapoix, and @mhrheaume, what are your feelings on this? tl;dr: Rename |
@dunxen works for me! |
9ecfb0a
to
e21c3c3
Compare
In certain deployment scenarios, we may not want (or be able) to write to the default ~/.lndk data directory. For example, the home directory may be mounted as read-only, or mounted using ephemeral storage. This change adds a new `data_dir` configuration option to specify where LNDK should store data. If this option isn't specified, then falls back to the default ~/.lndk.
a1bb7ce
to
d6c665f
Compare
Ugh, running into some hiccups running the integration tests. Assuming those are from my changes, I'll hopefully be able to reproduce locally shortly. |
Ok, whew! MDM running on my machine didn't like the fact that the itests were downloading and running bitcoind, so I ended up running the tests in a Docker container. I'll post it in a separate PR if there's interest. Anyways, latest revision should pass! |
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.
Thanks! Yeah it would be great if you could open a PR for running those tests in a container as an option, as it would help others in the same situation.
Everything looks good but just a comment on commit ordering.
src/main.rs
Outdated
// The log_dir configuration is actually a file path, not a directory. So if we are | ||
// falling back to data_dir, append the default log file name to get a file path. |
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.
Could we reorder the commits so this renaming one is first? Then we can avoid adding and removing this comment.
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.
Ran some tests and looks good once the commit ordering comment is addressed. Thanks for the PR!
This is expected to be passed in as a file, not a directory, so change the name to reflect that fact.
d6c665f
to
7335927
Compare
In certain deployment scenarios, we may not want (or be able) to write to the default ~/.lndk data directory. For example, the home directory may be mounted as read-only, or mounted using ephemeral storage.
This change adds a new
data_dir
configuration option to specify where LNDK should store data. If this option isn't specified, then falls back to the default ~/.lndk.