diff --git a/.circleci/config.yml b/.circleci/config.yml index a1388d158..70e435d3b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1017,7 +1017,7 @@ workflows: - build suite: utest-unit-cli target: "./cli/... ./cmd/... ./api/..." - resource-class: 2xlarge + resource_class: 2xlarge get-params: true - test: name: test-unit-node @@ -1031,7 +1031,7 @@ workflows: - build suite: utest-unit-rest target: "./blockstore/... ./build/... ./chain/... ./conformance/... ./gateway/... ./journal/... ./lib/... ./markets/... ./paychmgr/... ./tools/..." - resource-class: 2xlarge + resource_class: 2xlarge - test: name: test-unit-storage requires: diff --git a/.circleci/template.yml b/.circleci/template.yml index d633c0b38..9011f1a86 100644 --- a/.circleci/template.yml +++ b/.circleci/template.yml @@ -570,11 +570,11 @@ workflows: get-params: true [[- end -]] [[- if eq $suite "unit-cli"]] - resource-class: 2xlarge + resource_class: 2xlarge get-params: true [[- end -]] [[- if eq $suite "unit-rest"]] - resource-class: 2xlarge + resource_class: 2xlarge [[- end -]] [[- end]] - test: diff --git a/cmd/lotus-provider/migrate.go b/cmd/lotus-provider/migrate.go index d95b6890a..99569daca 100644 --- a/cmd/lotus-provider/migrate.go +++ b/cmd/lotus-provider/migrate.go @@ -18,7 +18,6 @@ import ( "golang.org/x/xerrors" "github.com/filecoin-project/go-address" - cliutil "github.com/filecoin-project/lotus/cli/util" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" "github.com/filecoin-project/lotus/node/config" @@ -198,6 +197,16 @@ func fromMiner(cctx *cli.Context) (err error) { } } + if cctx.Bool("overwrite") { + i, err := db.Exec(ctx, "DELETE FROM harmony_config WHERE title=$1", name) + if i != 0 { + fmt.Println("Overwriting existing layer") + } + if err != nil { + fmt.Println("Got error while deleting existing layer: " + err.Error()) + } + } + _, err = db.Exec(ctx, "INSERT INTO harmony_config (title, config) VALUES ($1, $2)", name, configTOML.String()) if err != nil { return err