Skip to content

Commit

Permalink
Merge pull request #129 from ipfs/chore/latest-migration-lib
Browse files Browse the repository at this point in the history
Update to latest migration lib and ipfs-update. Also, fix fs-repo-migrations to pull from dist.ipfs.io by default
  • Loading branch information
aschmahmann authored Apr 1, 2021
2 parents a4a9851 + 51e34b1 commit 6c9f7fc
Show file tree
Hide file tree
Showing 9 changed files with 467 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*~
cmd/fs-repo-migrations/fs-repo-migrations
fs-repo-migrations/fs-repo-migrations
sharness/bin/fs-repo-migrations
sharness/bin/fs-repo-*-to-*
sharness/bin/go-sleep
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ os:
language: go

go:
- 1.14.x
- "1.16.x"

env:
- TEST_VERBOSE=1
Expand Down
2 changes: 1 addition & 1 deletion fs-repo-migrations/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module github.com/ipfs/fs-repo-migrations/fs-repo-migrations
go 1.15

require (
github.com/ipfs/go-ipfs v0.7.1-0.20210325200014-5ee8710c5806
github.com/ipfs/go-ipfs v0.8.1-0.20210331232424-4cdb67f37daa
github.com/ipfs/go-ipfs-api v0.2.0
)
246 changes: 219 additions & 27 deletions fs-repo-migrations/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion fs-repo-migrations/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func createFetcher(distPath string) migrations.Fetcher {
const userAgent = "fs-repo-migrations"

if distPath == "" {
distPath = migrations.GetDistPathEnv(migrations.CurrentIpfsDist)
distPath = migrations.GetDistPathEnv(migrations.LatestIpfsDist)
}

return migrations.NewMultiFetcher(
Expand Down
2 changes: 1 addition & 1 deletion sharness/dependencies/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.15

require (
github.com/chriscool/go-sleep v0.0.0-20150606204034-743ab5f1bb48
github.com/ipfs/ipfs-update v1.6.1-0.20210323142304-8a5f9eabe3fa
github.com/ipfs/ipfs-update v1.7.1
github.com/ipfs/iptb v1.4.0
github.com/ipfs/iptb-plugins v0.2.1
github.com/jbenet/go-random-files v0.0.0-20190219210431-31b3f20ebded
Expand Down
284 changes: 242 additions & 42 deletions sharness/dependencies/go.sum

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions sharness/lib/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,9 @@ GUEST_TEST_DIR="sharness/$TEST_DIR_BASENAME"

CERTIFS='/etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt'

# TODO: remove this when migrations are availabe one the distributions site
IPFS_DIST_PATH="/ipfs/QmWLyhqWDsWbcWE8vjmHkzGKLGgvHh84cLxM3ceLsojwrx"

# This writes a docker ID on stdout
start_docker() {
docker run --rm -it -d -v "$CERTIFS" -v "$APP_ROOT_DIR:/mnt" -w "/mnt" -e "IPFS_DIST_PATH=$IPFS_DIST_PATH" "$DOCKER_IMG" /bin/bash
docker run --rm -it -d -v "$CERTIFS" -v "$APP_ROOT_DIR:/mnt" -w "/mnt" "$DOCKER_IMG" /bin/bash
}

# This takes a docker ID and a command as arguments
Expand Down
3 changes: 0 additions & 3 deletions sharness/t0030-simple-migration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ test_expect_success "fs-repo-migrations binary is here" '
test -f "$LOCAL_FS_REPO_MIG"
'

# TODO: remove this when migrations are availabe at the distributions site
export IPFS_DIST_PATH="/ipfs/QmWLyhqWDsWbcWE8vjmHkzGKLGgvHh84cLxM3ceLsojwrx"

test_expect_success "'fs-repo-migrations -v' works" '
"$LOCAL_FS_REPO_MIG" -v >actual
'
Expand Down

0 comments on commit 6c9f7fc

Please sign in to comment.