* ci: optimize build workflows
- use go version from go.mod instead of hardcoding
- group platforms by OS for parallel builds
- remove legacy try-build targets
* fix: checkout before setup-go in all workflows
setup-go needs go.mod to be present, so checkout must happen first
* chore: remove deprecated // +build syntax
go 1.17+ uses //go:build, the old syntax is no longer needed
* simplify: remove nofuse tag from CI workflows
- workflows now rely on platform build constraints
- keep make nofuse target for manual builds
- remove unused appveyor.yml
* ci: remove legacy travis variable and fix gateway-conformance
- remove TRAVIS env variable from 4 workflows
- fix gateway-conformance checkout path to match working-directory
- replace deprecated cache-go-action with built-in setup-go caching
* Add MFS command line options, extend existing mount functions for MFS, set defaults.
* Directory listing and file stat.
* Add a read-only MFS view.
* Add mkdir and interface checks.
* Add remove and rename functionality.
* Implement all required write interfaces.
* Adjust mount functions for other architechtures.
* Merge branch 'master' into feat/10710-mfs-fuse-mount
* Write a basic read/write test.
* Write more basic tests, add a mutex to the file object, fix modtime.
* Add a concurrency test, remove mutexes from file and directory structures.
* Refactor naming(mfdir -> mfsdir) and add documentation.
* Add CID retrieval through ipfs_cid xattr.
* Add docs, add xattr listing, fix bugs for mv and stat, refactor.
* Add MFS command line options, extend existing mount functions for MFS, set defaults.
* docs phrasing
* docs: Mounts.MFS
* docs: warn about lazy-loaded DAGs
* test: TEST_FUSE=1 ./t0030-mount.sh -v
---------
Co-authored-by: Guillaume Michel <guillaumemichel@users.noreply.github.com>
Co-authored-by: guillaumemichel <guillaume@michel.id>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
This commit replaces `os.MkdirTemp` with `t.TempDir` in tests. The
directory created by `t.TempDir` is automatically removed when the test
and all its subtests complete.
Prior to this commit, temporary directory created using `os.MkdirTemp`
needs to be removed manually by calling `os.RemoveAll`, which is omitted
in some tests. The error handling boilerplate e.g.
defer func() {
if err := os.RemoveAll(dir); err != nil {
t.Fatal(err)
}
}
is also tedious, but `t.TempDir` handles this for us nicely.
Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
In TestExternalUnmount, the Mount function is called which returns an
error which can be nil. The error type is then used in a comparison
where Error() is called on it. If the error is nil, this results in a
panic.
Added a if err != nil {} guard to make sure that Error() is not called
if the value is nil
On branch go-test-fix
Changes to be committed:
modified: fuse/node/mount_test.go
License: MIT
Signed-off-by: Chris Buesser <christopher.buesser@gmail.com>
This commit fixes the errors resulting from passing a nil pointer to the
core.NewNode function in TestExternalUnmmount and setupIpnsTest.
In the previous nil's place a &core.BuildCfg{} is now passed.
Both changes follow the same pattern:
```diff
- node, err = core.NewNode(context.Background(), nil)
+ node, err = core.NewNode(context.Background(), &core.BuildCfg{})
```
On branch go-test-fix
Changes to be committed:
modified: fuse/ipns/ipns_test.go
modified: fuse/node/mount_test.go
License: MIT
Signed-off-by: Chris Buesser <christopher.buesser@gmail.com>
Instead of trying to export the `errNeedFuseVersion` type, just use string
matching. It's good enough for testing and the alternative was annoying.
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
Switch _back_ to the 0.4.18 style of peer IDs while we figure things out. See
https://github.com/libp2p/specs/issues/138.
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
Loading this at the last minute means we need a bunch of special cases
in *every* command that needs routing, namesys, or even the public key.
If we ever have a case where we don't want to do this, we can add an option to
the (eventual) IPFS constructor. Handling this up-front is going to be
significantly less error prone.
Motivation: https://github.com/ipfs/go-ipfs/pull/5825/files#diff-fe35ea64d478c4f3fb767a3f618e5d01R863
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
Turns out that `pool.Put(buf)` had to *allocate* because we needed to turn
`[]byte` into `interface{}`. Apparently, we've never done this correctly we just
never noticed because we never really used buffer pools extensively.
However, since migrating yamux to a buffer-pool backed buffer, this started
showing up in allocation profiles.
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
* go-datastore and friends: GetSize
* badger: new release, fewer allocations
* go-mplex: send fewer packets
* go-bitswap: pack multiple blocks in a single message, fewer allocations
* go-buffer-pool: replace the buffer pool from go-msgio
* yamux: fixed data race and uses go-buffer-pool for stream read-buffers to
reduce memory and allocations.
* go-libp2p-secio: get rid of a hot-spot allocation
* go-libp2p-peerstore: reduced allocations (at the cost of some memory)
More?
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
Fuse unmount test uses ipfs instead of ipns, because offline nodes dont actually mount ipns.
Factored out GOOS-aware function to determine unmount command in fuse/mount.
fixed#5475
License: MIT
Signed-off-by: Rob Deutsch <rdeutschob@gmail.com>
* Most of our datastores barf on non []byte values.
* We have to have a bunch of "is this a []byte" checks.
* Saves some allocations.
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
This uses a working libp2p-kad-dht and libp2p-record libraries,
reverts the changes that were introduced to support the newer versions
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
This extracts the routing package to its own repository
(https://github.com/ipfs/go-ipfs-routing). History has
been preserved. The new module has been gx'ed and published.
Imports have been rewritten and re-ordered accordingly.
An internal dependency to go-ipfs/repo has been removed
by substituting it with the go-datastore.Batching interface.
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>