Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating to new datastore/blockstore code with contexts #7646

Merged
merged 58 commits into from
Dec 17, 2021

Conversation

whyrusleeping
Copy link
Member

@whyrusleeping whyrusleeping commented Nov 19, 2021

Status

The following deps need to be tagged, as we have go mod versions pointing at unstable things:

  • github.com/drand/drand

The following deps also exist in the lotus-soup go.mod:

  • github.com/drand/drand

@whyrusleeping whyrusleeping requested a review from a team as a code owner November 19, 2021 01:51
@jennijuju jennijuju marked this pull request as draft November 19, 2021 03:31
go.mod Outdated Show resolved Hide resolved
@vyzo vyzo self-assigned this Nov 30, 2021
@vyzo
Copy link
Contributor

vyzo commented Nov 30, 2021

i'll work on finishing this as we need it to upgrade go-libp2p.

@vyzo
Copy link
Contributor

vyzo commented Nov 30, 2021

the go-data-transfer dep is broken:

go: github.com/filecoin-project/go-data-transfer@v1.11.7-0.20211119001436-c0dbfa5fae4d requires
	github.com/ipfs/go-graphsync@v0.10.6-0.20211119000532-c416dad3bd56: invalid version: unknown revision c416dad3bd56

@vyzo
Copy link
Contributor

vyzo commented Nov 30, 2021

@aarshkshah1992 @dirkmc is the go-data-transfer stuff done?

@jennijuju
Copy link
Member

jennijuju commented Dec 1, 2021

this is getting blocked by
filecoin-project/go-data-transfer#283

which is blocked by
filecoin-project/go-ds-versioning#3

which is blocked by a release tag of
https://github.com/filecoin-project/go-statestore

@arajasek
Copy link
Contributor

arajasek commented Dec 7, 2021

@vyzo go-data-transfer thing should be fixed now

@jennijuju jennijuju removed the blocked label Dec 8, 2021
@jennijuju jennijuju added this to the v1.13.3 milestone Dec 8, 2021
@vyzo
Copy link
Contributor

vyzo commented Dec 9, 2021

broken go-ipfs-blockstore:

go: github.com/ipfs/go-ipfs-blockstore@v1.1.0 requires
	github.com/ipfs/go-datastore@v0.4.7-0.20211013204805-28a3721c2e66: invalid version: unknown revision 28a3721c2e66

@vyzo
Copy link
Contributor

vyzo commented Dec 9, 2021

v1.1.1 also broken:

go get github.com/ipfs/go-ipfs-blockstore@v1.1.1
go: github.com/ipfs/go-ipfs-blockstore@v1.1.0 requires
	github.com/ipfs/go-datastore@v0.4.7-0.20211013204805-28a3721c2e66: invalid version: unknown revision 28a3721c2e66

@vyzo
Copy link
Contributor

vyzo commented Dec 9, 2021

This occurs when trying to upgrade go-data-transfer:

$ go get github.com/filecoin-project/go-data-transfer@master

go: github.com/filecoin-project/go-data-transfer@v1.11.7-0.20211207053937-e06a599f202a requires
	github.com/ipfs/go-ipfs-blockstore@v1.1.0 requires
	github.com/ipfs/go-datastore@v0.4.7-0.20211013204805-28a3721c2e66: invalid version: unknown revision 28a3721c2e66

@vyzo
Copy link
Contributor

vyzo commented Dec 9, 2021

seems it was a transient go mod cache error of some sorts.

@vyzo
Copy link
Contributor

vyzo commented Dec 9, 2021

rebased and fixed deps; now the 1M places to add contexts...

@vyzo
Copy link
Contributor

vyzo commented Dec 9, 2021

Blocker in go-fil-markets:

# github.com/filecoin-project/go-fil-markets/shared
../../../../pkg/mod/github.com/filecoin-project/go-fil-markets@v1.13.4/shared/movekey.go:9:20: not enough arguments in call to ds.Has
	have (datastore.Key)
	want (context.Context, datastore.Key)

@vyzo
Copy link
Contributor

vyzo commented Dec 9, 2021

Blocker in go-car:

# github.com/ipld/go-car/v2/blockstore
../../../../pkg/mod/github.com/ipld/go-car/v2@v2.1.0/blockstore/readonly.go:24:5: cannot use (*ReadOnly)(nil) (type *ReadOnly) as type blockstore.Blockstore in assignment:
	*ReadOnly does not implement blockstore.Blockstore (wrong type for DeleteBlock method)
		have DeleteBlock(cid.Cid) error
		want DeleteBlock(context.Context, cid.Cid) error

@vyzo
Copy link
Contributor

vyzo commented Dec 9, 2021

Blocker in go-ds-versioning

# github.com/filecoin-project/go-ds-versioning/internal/migrate
../../../../pkg/mod/github.com/filecoin-project/go-ds-versioning@v0.1.0/internal/migrate/migrate.go:24:26: not enough arguments in call to oldDs.Query
	have (query.Query)
	want (context.Context, query.Query)

@vyzo
Copy link
Contributor

vyzo commented Dec 9, 2021

blocker in go-storedcounter:

# github.com/filecoin-project/go-storedcounter
../../../../pkg/mod/github.com/filecoin-project/go-storedcounter@v0.0.0-20200421200003-1c99c62e8a5b/storedcounter.go:28:23: not enough arguments in call to sc.ds.Has
	have (datastore.Key)
	want (context.Context, datastore.Key)

@vyzo
Copy link
Contributor

vyzo commented Dec 9, 2021

blocker in drand:

# github.com/drand/drand/lp2p
../../../../pkg/mod/github.com/drand/drand@v1.2.1/lp2p/ctor.go:92:22: too many arguments in call to libp2p.New
	have (context.Context, ...config.Option)
	want (...config.Option)

@arajasek
Copy link
Contributor

go-storedcounter should be unblocked

@arajasek arajasek marked this pull request as ready for review December 15, 2021 23:33
@arajasek
Copy link
Contributor

This is now ready to be reviewed and merged.

Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

First pass, shouldn't be hard to land.

Was the ffi update intentional?

blockstore/badger/blockstore_test.go Outdated Show resolved Hide resolved
blockstore/badger/blockstore_test_suite.go Outdated Show resolved Hide resolved
chain/store/messages.go Outdated Show resolved Hide resolved
chain/store/snapshot.go Outdated Show resolved Hide resolved
cmd/lotus-bench/import.go Outdated Show resolved Hide resolved
node/modules/genesis.go Outdated Show resolved Hide resolved
node/modules/services.go Outdated Show resolved Hide resolved
node/modules/storageminer.go Outdated Show resolved Hide resolved
node/modules/storageminer.go Outdated Show resolved Hide resolved
@@ -107,6 +108,7 @@ type Meta struct {
// CreateImport initializes a new import, returning its ID and optionally a
// CAR path where to place the data, if requested.
func (m *Manager) CreateImport() (id ID, err error) {
ctx := context.TODO()
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably open a tracking issue about this (in markets?)

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure what it should say and where it should be; what's the problem here?

Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC This Manager struct implements some interface in markets, it would be nice to have contexts plumbed, but I don't think it needs to happen right now - so we could just open an issue saying 'add contexts to this stuff'

Copy link
Contributor

Choose a reason for hiding this comment

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

opened #7813.

@vyzo
Copy link
Contributor

vyzo commented Dec 16, 2021

probably accident, that was not me.

Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

Just one nitpick.

Also skimming through the dependency diff quickly (it's.. 30k lines)

blockstore/badger/blockstore_test_suite.go Outdated Show resolved Hide resolved
@magik6k
Copy link
Contributor

magik6k commented Dec 17, 2021

(also need to merge master into here to sort out conflicts)

@magik6k magik6k merged commit 6806bff into master Dec 17, 2021
@magik6k magik6k deleted the deps/update-ctx-dsbs branch December 17, 2021 12:50
@BigLep BigLep linked an issue Dec 19, 2021 that may be closed by this pull request
@jennijuju jennijuju modified the milestones: v1.13.3, v1.15.0 Jan 2, 2022
jennijuju added a commit that referenced this pull request Jan 14, 2022
… needs more testing before landing

remove ctx datastore from autobatch

testplans go mod tidy

fix ctx
jennijuju added a commit that referenced this pull request Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bubble up changes to ipfs/go-datastore
7 participants