Commit Graph

14095 Commits

Author SHA1 Message Date
Gus Eggert
f4d361dd4e
test: fix autoclient flakiness (#9769)
The test trims all whitespace bytes from the output of 'ipfs cat' but
if the random bytes end in a whitespace char then it trims that too,
resulting in random test failure.

Instead this updates the test harness to only trim a single trailing
newline char, so that it doesn't end up chomping legitimate output.
2023-03-29 11:56:25 -04:00
Gus Eggert
6ebbd9d39b
test: skip flaky pubsub test (#9770)
This test flakes very often and we plan on removing this feature
entirely, so disabling this test since its failures are pretty disruptive.
2023-03-29 11:56:11 -04:00
Jorropo
3ab1086f71 chore: migrate go-libipfs to boxo
Resolves #9677, #9676, #9675, #9736
2023-03-28 22:05:25 -04:00
Jorropo
1e3b6c9857 feat: add tracing to the commands client 2023-03-28 22:05:25 -04:00
Jorropo
2bd6d22617 chore: bump sharness-deps for go 1.20 2023-03-28 22:05:25 -04:00
Jorropo
405b1d2dcd chore: update go-libp2p to v0.26.4 2023-03-28 00:49:39 +02:00
Gus Eggert
4c49967d9c feat: add client-side metrics for routing-v1 client 2023-03-27 18:19:28 -04:00
Gus Eggert
60ba0b1821 test: increase max wait time for peering assertion
The peering test is flaky and fails waiting for peers to be connected
to each other, I don't know if this will fix it, but worth trying.
2023-03-27 23:32:04 +02:00
Henrique Dias
88d431c812
feat: remove writable gateway (#9743)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-03-27 15:19:55 +02:00
Piotr Galar
bf7d0fc99d
Merge pull request #9484 from ipfs/process-improvement-v0.18.0
Process Improvement: v0.18.0
2023-03-27 10:50:59 +02:00
Jorropo
bb020ea1ef fix: deadlock while racing ipfs dag import and ipfs repo gc
This fixes a deadlock introduced in 1457b4fd4a.

We can't use the coreapi here because it will try to take the PinLock (RLock) again, so revert this small part of 1457b4fd4a.

This used cause a deadlock when concurrently running `ipfs dag import` concurrently with the GC.

The bug is that `ipfs dag import` takes an RLock with the PinLock.
*the cars are imported, leaving a wide window of time*
Then GC Takes a Lock on that same RWMutex while taking the GC Lock (it  blocks because it waits for the RLock to be released).
Then the car imports are finished and `ipfs dag import` tries to aqcuire the PinLock (doing an RLock) again in `Api().Pin`.

However at this point the RWMutex is starved, the runtime put a fence in front of RLocks if a Lock has been waiting for too lock (else you could have an endless stream of RLock / RUnlock forever delaying a Lock to ever go through).

The issue is that `ipfs dag import`'s original RLock which is blocking everyone will be released once it returns, which only happens when `Api().Pin` completes.

So we have a deadlock (ABA kind ?), because `ipfs dag import` waits on the GC Lock, which waits on `ipfs dag import`.

Calling the Pinner directly does not acquire the PinLock again, and thus does not have this issue.
2023-03-26 05:40:18 +02:00
Michael Muré
1457b4fd4a
feat: improve dag/import (#9721)
- don't bypass the CoreApi
- don't use a goroutine and return channel for `importWorker`, when what's happening is really just a synchronous call
- only `PinLock()` when we are going to pin
- use `cid.Set` instead of an explicit map
- fail the request early if any pinning fail, no need to try to pin more if the request failed already
2023-03-22 03:06:40 +01:00
Piotr Galar
668d0b2fa4
Merge pull request #9687 from ipfs/no-circleci
ci: remove circleci config
2023-03-21 16:34:41 +01:00
galargh
fb80af5180 fix: ensure unique job names across all GHA workflows 2023-03-21 15:50:43 +01:00
galargh
d45d8ecdad ci: simplify codeql worfklow 2023-03-21 15:01:17 +01:00
galargh
64d3c153cb Revert "ci: rename gha workflow files to match workflow names"
This reverts commit d164129258f456fb70dc709b59d743a8aed57cc2.
2023-03-21 14:59:51 +01:00
galargh
a8f2c12f71 ci: rename gha workflow files to match workflow names 2023-03-21 14:59:32 +01:00
galargh
2d65120fd5 ci: standarise gha names 2023-03-21 14:57:36 +01:00
galargh
337ddb1227 ci: remove ci/gh prefix from GHA workflows 2023-03-21 14:57:14 +01:00
galargh
be3bde6df9 ci: remove experimental tags from GHA workflows 2023-03-21 14:57:14 +01:00
galargh
ceed43ea0e chore: clean up after circleci removal 2023-03-21 14:57:14 +01:00
galargh
7b9819e526 ci: remove circleci config 2023-03-21 14:57:11 +01:00
Piotr Galar
1d7976667e
Merge branch 'master' into process-improvement-v0.18.0 2023-03-21 10:27:25 +01:00
Gus Eggert
e0b08ed783
docs: use fx.Decorate instead of fx.Replace in examples (#9725)
In practice there are cases when fx.Replace doesn't work as expected,
so this updates the documentation to recommend using fx.Decorate
instead which is a bit easier to use.
2023-03-20 17:27:45 -04:00
Piotr Galar
08dcb28866
Merge pull request #9742 from ipfs/changelog-v0.20
Create Changelog: v0.20
2023-03-20 19:46:29 +01:00
galargh
1f36e3dbe6 chore: create next changelog 2023-03-20 16:35:00 +00:00
Piotr Galar
77a64f0829
Merge pull request #9741 from ipfs/merge-release-v0.19.0
Merge Release: v0.19.0
2023-03-20 17:34:06 +01:00
Piotr Galar
eb7d6f98df
Merge branch 'master' into merge-release-v0.19.0 2023-03-20 16:48:58 +01:00
Henrique Dias
b975593920
feat(gateway): invalid CID returns 400 Bad Request (#9726) 2023-03-20 14:14:38 +01:00
Piotr Galar
624846fc15
Merge pull request #9739 from Jorropo/fix/changelog
fix: remove outdated changelog part
2023-03-20 13:25:23 +01:00
Piotr Galar
1963219586
Merge pull request #9697 from ipfs/release-v0.19.0
Release: v0.19.0
2023-03-20 12:59:53 +01:00
galargh
13865920d8 docs: update changelog 2023-03-20 12:33:11 +01:00
Jorropo
c9fc10dafc fix: remove outdated changelog part 2023-03-20 12:23:16 +01:00
galargh
822106134a chore: update version 2023-03-20 11:15:40 +00:00
Piotr Galar
754264fc08 Merge pull request #9707 from ipfs/changelog-0.19
docs: 0.19 changelog
2023-03-20 11:45:57 +01:00
Piotr Galar
75998d3b6d
Merge pull request #9707 from ipfs/changelog-0.19
docs: 0.19 changelog
2023-03-20 11:45:02 +01:00
Piotr Galar
7ea6e321fe chore: update go-libp2p to v0.26.3 (#9737) 2023-03-20 10:06:04 +01:00
Henrique Dias
a22db797b9 fix: canonicalize user defined headers 2023-03-20 10:05:58 +01:00
Henrique Dias
6cdc3c8a14 fix: apply API.HTTPHeaders to /webui redirect 2023-03-20 10:05:52 +01:00
Gus Eggert
010e22b508 feat: add heap allocs to 'ipfs diag profile' 2023-03-20 10:05:43 +01:00
Henrique Dias
3c35a0cdea chore: bump go-libipfs@v0.6.2 2023-03-20 10:05:29 +01:00
Jorropo
af79d841dc fix: future proof with > rcmgr.DefaultLimit for new enum rcmgr values 2023-03-20 10:05:23 +01:00
Jorropo
383065397d test: add test for presarvation of unlimited configs for inbound systems 2023-03-20 10:05:17 +01:00
Jorropo
6ff764f9fb fix: preserve Unlimited StreamsInbound in connmgr reconciliation
Fixes #9695
2023-03-20 10:05:11 +01:00
Gus Eggert
c78c9886ad test: fix flaky rcmgr test 2023-03-20 10:05:03 +01:00
Jorropo
cc5e1325b4 chore: deprecate the pubsub api
Fixes #9717
2023-03-20 10:04:53 +01:00
Gus Eggert
b4211be7d6 test: port peering test from sharness to Go
This is the slowest test in the sharness test suite, because it has
very long sleeps. It usually takes 2+ minutes to run.

This new impl runs all peering tests in about 20 seconds, since it
polls for conditions instead of sleeping, and runs the tests in
parallel.

This also has an additional test case for a peer that was never online
and then connects.
2023-03-20 10:03:15 +01:00
Eng Zer Jun
5f766619cf test: use T.TempDir to create temporary test directory
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>
2023-03-20 10:02:53 +01:00
Laurent Senta
d001ed7451 fix: --verify forgets the verified key 2023-03-20 10:02:46 +01:00
Laurent Senta
6bab5ce37c test: name --verify forgets the verified key 2023-03-20 10:02:39 +01:00