-
Notifications
You must be signed in to change notification settings - Fork 54
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
fix: Resolve handful of CLI issues #1318
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1318 +/- ##
===========================================
+ Coverage 70.53% 70.63% +0.10%
===========================================
Files 184 184
Lines 17786 17784 -2
===========================================
+ Hits 12545 12562 +17
+ Misses 4287 4270 -17
+ Partials 954 952 -2
|
@@ -112,6 +114,12 @@ func (cfg *Config) LoadWithRootdir(withRootdir bool) error { | |||
return err | |||
} | |||
|
|||
// using absolute rootdir for robustness | |||
cfg.Rootdir, err = filepath.Abs(cfg.Rootdir) |
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.
question: Have you tested that this all works on database restart? I.e. to make sure #1293 isnt re-introduced
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 confirm that it works on database restart
7df76b6
to
afbd42d
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.
LGTM - thanks for cleaning up the commits it made it much easier to link issue to code-change :)
One suggestion added that would be good to get a response to before merge.
|
||
datastore: | ||
# Store can be badger | memory | ||
# badger: fast pure Go key-value store optimized for SSDs (https://github.com/dgraph-io/badger) | ||
# memory: in-memory version of badger | ||
store: {{ .Datastore.Store }} | ||
badger: | ||
# The path to the database data file(s), relative paths here will be converted to absolute file paths | ||
# on database start. | ||
# The path to the database data file(s). |
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.
suggestion: I do think it is worth documenting that we will mutate the config file and replace relative paths with absolute paths. I see that as potentially surprising behaviour, and a behaviour that may potentially mess with CI systems (e.g. config files are sometimes directly pulled from source control, and impromptu edits can mess with the next pull)
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.
Currently we don't overwrite the config file. We write a config file when it doesn't exist. For now, the paths written are absolute paths, although what would be nicer is to have relative paths there, but which will probabIy be enabled by a refactor of config.
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.
for future reference - we chatted over discord, and I was wrong here - it doesnt mutate existing files :)
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!
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
Resolves sourcenetwork#1321 Resolves sourcenetwork#1319 Resolves sourcenetwork#1317 Resolves sourcenetwork#1316 Resolves sourcenetwork#1315
Relevant issue(s)
Resolves #1321
Resolves #1319
Resolves #1317
Resolves #1316
Resolves #1315
Description
See resolved issues.
Tasks
How has this been tested?
Manually