From 7e442604ac62ada71400849017f8e41234c0b50e Mon Sep 17 00:00:00 2001 From: gammazero Date: Mon, 22 Mar 2021 18:39:24 -0700 Subject: [PATCH 1/3] Rename migrations from ipfs-x-to-y to fs-repo-x-to-y --- repo/fsrepo/migrations/fetch.go | 4 ++-- repo/fsrepo/migrations/fetcher.go | 2 +- repo/fsrepo/migrations/migrations.go | 2 +- repo/fsrepo/migrations/migrations_test.go | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/repo/fsrepo/migrations/fetch.go b/repo/fsrepo/migrations/fetch.go index 753c9b10b17..8cb6bedde35 100644 --- a/repo/fsrepo/migrations/fetch.go +++ b/repo/fsrepo/migrations/fetch.go @@ -27,8 +27,8 @@ import ( // same name it has inside the archive. Otherwise, the binary file is written // to the file named by out. func FetchBinary(ctx context.Context, fetcher Fetcher, dist, ver, binName, out string) (string, error) { - // The archive file name is the base of dist to support possible subdir in - // dist, for example: "ipfs-repo-migrations/ipfs-11-to-12" + // The archive file name is the base of dist. This is to support a possible subdir in + // dist, for example: "ipfs-repo-migrations/fs-repo-11-to-12" arcName := path.Base(dist) // If binary base name is not specified, then it is same as archive base name. if binName == "" { diff --git a/repo/fsrepo/migrations/fetcher.go b/repo/fsrepo/migrations/fetcher.go index 4bedafb63aa..3278abe420b 100644 --- a/repo/fsrepo/migrations/fetcher.go +++ b/repo/fsrepo/migrations/fetcher.go @@ -8,7 +8,7 @@ import ( const ( // Current dirstibution to fetch migrations from - CurrentIpfsDist = "/ipfs/Qme8pJhBidEUXRdpcWLGR2fkG5kdwVnaMh3kabjfP8zz7Y" + CurrentIpfsDist = "/ipfs/QmczveGA59zFPcf8CPjSVGWrAURjgTWPwchYJJmYQQaytH" // Latest distribution path. Default for fetchers. LatestIpfsDist = "/ipns/dist.ipfs.io" diff --git a/repo/fsrepo/migrations/migrations.go b/repo/fsrepo/migrations/migrations.go index 1833dff3015..0d51c638638 100644 --- a/repo/fsrepo/migrations/migrations.go +++ b/repo/fsrepo/migrations/migrations.go @@ -105,7 +105,7 @@ func ExeName(name string) string { } func migrationName(from, to int) string { - return fmt.Sprintf("ipfs-%d-to-%d", from, to) + return fmt.Sprintf("fs-repo-%d-to-%d", from, to) } // findMigrations returns a list of migrations, ordered from first to last diff --git a/repo/fsrepo/migrations/migrations_test.go b/repo/fsrepo/migrations/migrations_test.go index 089eaa8d83f..6ba02a2f7d4 100644 --- a/repo/fsrepo/migrations/migrations_test.go +++ b/repo/fsrepo/migrations/migrations_test.go @@ -125,7 +125,7 @@ func TestFetchMigrations(t *testing.T) { } defer os.RemoveAll(tmpDir) - needed := []string{"ipfs-1-to-2", "ipfs-2-to-3"} + needed := []string{"fs-repo-1-to-2", "fs-repo-2-to-3"} fetched, err := fetchMigrations(ctx, fetcher, needed, tmpDir) if err != nil { t.Fatal(err) @@ -177,7 +177,7 @@ func TestRunMigrations(t *testing.T) { err = RunMigration(ctx, fetcher, targetVer, fakeIpfs, true) if err != nil { - if !strings.HasPrefix(err.Error(), "migration ipfs-10-to-11 failed") { + if !strings.HasPrefix(err.Error(), "migration fs-repo-10-to-11 failed") { t.Fatal(err) } } From 684b8b5bb7b0568d18db0bfd599fc5cdcb5865b9 Mon Sep 17 00:00:00 2001 From: gammazero Date: Tue, 23 Mar 2021 07:16:57 -0700 Subject: [PATCH 2/3] Use distribution with v2.0.0 migrations --- repo/fsrepo/migrations/fetcher.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repo/fsrepo/migrations/fetcher.go b/repo/fsrepo/migrations/fetcher.go index 3278abe420b..0a436e18110 100644 --- a/repo/fsrepo/migrations/fetcher.go +++ b/repo/fsrepo/migrations/fetcher.go @@ -8,7 +8,7 @@ import ( const ( // Current dirstibution to fetch migrations from - CurrentIpfsDist = "/ipfs/QmczveGA59zFPcf8CPjSVGWrAURjgTWPwchYJJmYQQaytH" + CurrentIpfsDist = "/ipfs/QmdqMERfkEMkkeWcaAWrr7ycnMW637JgtL4LZ4BKM1mRBi" // Latest distribution path. Default for fetchers. LatestIpfsDist = "/ipns/dist.ipfs.io" From b0120ac996de44d52b1f5fd5156324d38e94695d Mon Sep 17 00:00:00 2001 From: gammazero Date: Thu, 25 Mar 2021 00:40:14 -0700 Subject: [PATCH 3/3] update current ipfs dist to one with mogrations v1.0.0 --- repo/fsrepo/migrations/fetcher.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repo/fsrepo/migrations/fetcher.go b/repo/fsrepo/migrations/fetcher.go index 0a436e18110..bf04cb3c093 100644 --- a/repo/fsrepo/migrations/fetcher.go +++ b/repo/fsrepo/migrations/fetcher.go @@ -8,7 +8,7 @@ import ( const ( // Current dirstibution to fetch migrations from - CurrentIpfsDist = "/ipfs/QmdqMERfkEMkkeWcaAWrr7ycnMW637JgtL4LZ4BKM1mRBi" + CurrentIpfsDist = "/ipfs/QmZqzacg5Q8WpDL7SymogoaSZYw6RZT2kgPavymCmMwWse" // Latest distribution path. Default for fetchers. LatestIpfsDist = "/ipns/dist.ipfs.io"