Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

feat: integrate ipfs-repo-migrations tool #2527

Merged
merged 9 commits into from
Nov 8, 2019

Conversation

AuHau
Copy link
Member

@AuHau AuHau commented Oct 10, 2019

Resolves: #1115

Supersedes: #2044

Depends on:

@AuHau AuHau force-pushed the auhau/feat/repo_migrations branch 3 times, most recently from d285a12 to 5b8562d Compare October 17, 2019 16:57
Copy link
Member

@daviddias daviddias left a comment

Choose a reason for hiding this comment

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

Can we haz a test here as well (will be similar to js-ipfs-repo).

@achingbrain achingbrain mentioned this pull request Oct 23, 2019
52 tasks
@AuHau
Copy link
Member Author

AuHau commented Oct 24, 2019

@daviddias should it be part of js-ipfs or interface-js-ipfs-core?

Copy link
Member

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

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

How about --migrate option to ipfs daemon like go-ipfs?

@AuHau
Copy link
Member Author

AuHau commented Oct 29, 2019

Hmmm that is a good point, but daemon is a bit too late, it would have to be part of the js-ipfs root command because you can interact with the repo without having daemon on and hence the migrations will run already during for example js-ipfs key list

Is that alright?

@alanshaw
Copy link
Member

Gotcha, yes that makes perfect sense.

@AuHau
Copy link
Member Author

AuHau commented Oct 30, 2019

Although, how it should behave? I believe that go-ipfs ask if you want to migrate your data and --migrate only automatically confirms that right?

Currently, here the migrations are automatically run because of browsers, so should that be --noMigrations instead? Which will propagate to IPFSRepo as autoMigrate=false?

@AuHau
Copy link
Member Author

AuHau commented Nov 4, 2019

@alanshaw ping ^

@alanshaw
Copy link
Member

alanshaw commented Nov 4, 2019

I just meant we can leave it for now.

@alanshaw
Copy link
Member

alanshaw commented Nov 6, 2019

@AuHau and I spoke about this in IRC and decided to default to true for auto migrations in core but when run via the CLI or as a daemon it would be set to false by default, allowing the user to backup their datastore before migrating. A new global option called --migrate will set it to true.

@AuHau AuHau force-pushed the auhau/feat/repo_migrations branch 3 times, most recently from 3271102 to 825a58c Compare November 6, 2019 15:55
@AuHau
Copy link
Member Author

AuHau commented Nov 6, 2019

So it is ready for review. Unfortunately, I did not manage to add any tests. I am now pressed to put time somewhere else, so I don't think I will be able to work on tests anytime soon if they will be needed...

@alanshaw
Copy link
Member

alanshaw commented Nov 7, 2019

No worries, I'll pick this up from here - thanks for all your work on this @AuHau ❤️

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/cli/parser.js Outdated Show resolved Hide resolved
src/cli/utils.js Outdated Show resolved Hide resolved
@alanshaw alanshaw merged commit 1d12ffb into master Nov 8, 2019
@alanshaw alanshaw deleted the auhau/feat/repo_migrations branch November 8, 2019 14:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create an utility for IPFS Repo migrations
3 participants