-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: expose c1 migration cmds #186
feat: expose c1 migration cmds #186
Conversation
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
Should we wait to merge till the cli changes are merged so we can manually test this? ceramicnetwork/rust-ceramic#326
keramik/src/ipfs.md
Outdated
- ipfs: | ||
rust: | ||
migrationCmd: | ||
- from-ipfs -i /data/ipfs/blocks -o /data/ipfs/db.sqlite3 --network dev-unstable |
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, since the cli is not merged yet the api is not stable but this should read:
from-ipfs -i /data/ipfs/blocks -o /data/ipfs/ --network dev-unstable
Yes, that sounds good 👍🏼 |
f32b0f9
to
0dfb94f
Compare
@smrz2001 I made a new commit (and rebased off main) can you take a look ? |
0dfb94f
to
20285ab
Compare
command: Some( | ||
vec!["/usr/bin/ceramic-one", "migrations"] | ||
.into_iter() | ||
.chain(cmd.iter().map(String::as_str)) |
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.
If we moved the chain
below the map
on the next line, could we take out the as_str
mapping?
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.
No, we do not own the strings in cmd
so the as_str
converts from &String
to &str
. We could instead convert directly to String
but that still requires a map
on the cmd
iterator.
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.
So its about the same either way, I don't have a strong reason for one over the other.
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.
Ah understood, thanks.
Updates LGTM! |
* feat: expose c1 migration cmds * chore: build fixes * fix: use list of args for migration_cmd * fix: tests --------- Co-authored-by: Nathaniel Cook <[email protected]>
No description provided.