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

feat: expose c1 migration cmds #186

Merged

Conversation

smrz2001
Copy link
Collaborator

No description provided.

@smrz2001 smrz2001 self-assigned this Jun 17, 2024
Copy link

linear bot commented Jun 17, 2024

Copy link
Collaborator

@nathanielc nathanielc left a 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

- ipfs:
rust:
migrationCmd:
- from-ipfs -i /data/ipfs/blocks -o /data/ipfs/db.sqlite3 --network dev-unstable
Copy link
Collaborator

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

@smrz2001
Copy link
Collaborator Author

LGTM

Should we wait to merge till the cli changes are merged so we can manually test this? ceramicnetwork/rust-ceramic#326

Yes, that sounds good 👍🏼

@nathanielc nathanielc force-pushed the feature/aes-125-keramik-should-expose-a-migration-cmds-setting branch 2 times, most recently from f32b0f9 to 0dfb94f Compare June 25, 2024 15:07
@nathanielc
Copy link
Collaborator

@smrz2001 I made a new commit (and rebased off main) can you take a look ?

@nathanielc nathanielc force-pushed the feature/aes-125-keramik-should-expose-a-migration-cmds-setting branch from 0dfb94f to 20285ab Compare June 25, 2024 15:09
command: Some(
vec!["/usr/bin/ceramic-one", "migrations"]
.into_iter()
.chain(cmd.iter().map(String::as_str))
Copy link
Collaborator Author

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?

Copy link
Collaborator

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.

Copy link
Collaborator

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah understood, thanks.

@smrz2001
Copy link
Collaborator Author

@smrz2001 I made a new commit (and rebased off main) can you take a look ?

Updates LGTM! :shipit:

@nathanielc nathanielc added this pull request to the merge queue Jun 25, 2024
Merged via the queue into main with commit 4612921 Jun 25, 2024
5 checks passed
samika98 pushed a commit that referenced this pull request Jul 12, 2024
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants