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

feat: integrate ipfs-repo-migrations tool#2527

Merged
alanshaw merged 9 commits into
masterfrom
auhau/feat/repo_migrations
Nov 8, 2019
Merged

feat: integrate ipfs-repo-migrations tool#2527
alanshaw merged 9 commits into
masterfrom
auhau/feat/repo_migrations

Conversation

@AuHau

@AuHau AuHau commented Oct 10, 2019

Copy link
Copy Markdown
Member

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

@daviddias daviddias left a comment

Copy link
Copy Markdown
Member

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

AuHau commented Oct 24, 2019

Copy link
Copy Markdown
Member Author

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

@alanshaw alanshaw left a comment

Copy link
Copy Markdown
Member

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

AuHau commented Oct 29, 2019

Copy link
Copy Markdown
Member Author

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
Copy Markdown
Member

Gotcha, yes that makes perfect sense.

@AuHau

AuHau commented Oct 30, 2019

Copy link
Copy Markdown
Member Author

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

AuHau commented Nov 4, 2019

Copy link
Copy Markdown
Member Author

@alanshaw ping ^

@alanshaw

alanshaw commented Nov 4, 2019

Copy link
Copy Markdown
Member

I just meant we can leave it for now.

@AuHau AuHau force-pushed the auhau/feat/repo_migrations branch from 5b8562d to 78b64e6 Compare November 6, 2019 11:24
@alanshaw

alanshaw commented Nov 6, 2019

Copy link
Copy Markdown
Member

@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

AuHau commented Nov 6, 2019

Copy link
Copy Markdown
Member Author

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

alanshaw commented Nov 7, 2019

Copy link
Copy Markdown
Member

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

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread src/cli/parser.js Outdated
Comment thread src/cli/utils.js Outdated
@alanshaw alanshaw force-pushed the auhau/feat/repo_migrations branch from 8c842c2 to 6a5fbc8 Compare November 7, 2019 16:16
@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

4 participants