Commit Graph

14101 Commits

Author SHA1 Message Date
Gus Eggert
a09c8df24d
fix: remove timeout on default DHT operations (#9783)
* fix: remove timeout on default DHT operations

This removes the timeout by default for DHT operations. In particular
this causes issues with ProvideMany requests which can take an
indeterminate amount of time, but really these should just respect
context timeouts by default. Users can still specify timeouts here if
they want, but by default they will be set to "0" which means "no
timeout".

This is unlikely to break existing users of custom routing, because
there was previously no utility in configuring a router with timeout=0
because that would cause the router to immediately fail, so it is
unlikely (and incorrect) if anybody was using timeout=0.

* fix: remove 5m timeout on ProvideManyRouter

For context see
5fda291b66

---------

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-03-30 16:08:43 -04:00
Adin Schmahmann
353dd49be2
refactor: switch gateway code to new API from go-libipfs (#9681)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Henrique Dias <hacdias@gmail.com>
2023-03-30 13:20:37 +00:00
Gus Eggert
ebdca5cf02
test: cancel workflows on same branch when new commit is added (#9771)
This is pretty common when working through PRs and ends up causing
tons of in-flight GitHub Actions workflows running because they aren't
currently canceled when a new commit is added. This will cancel
previous runs if a new commit is added on a branch (which is the
behavior we had on CircleCI).
2023-03-30 07:58:12 -04:00
Gus Eggert
a24cfb89a5
test: port remote pinning tests to Go (#9720)
This also means that rb-pinning-service-api is no longer required for
running remote pinning tests. This alone saves at least 3 minutes in
test runtime in CI because we don't need to checkout the repo, build
the Docker image, run it, etc.

Instead this implements a simple pinning service in Go that the test
runs in-process, with a callback that can be used to control the async
behavior of the pinning service (e.g. simulate work happening
asynchronously like transitioning from "queued" -> "pinning" ->
"pinned").

This also adds an environment variable to Kubo to control the MFS
remote pin polling interval, so that we don't have to wait 30 seconds
in the test for MFS changes to be repinned. This is purely for tests
so I don't think we should document this.

This entire test suite runs in around 2.5 sec on my laptop, compared to
the existing 3+ minutes in CI.
2023-03-30 07:46:35 -04:00
Arthur Gavazza
e89cce63fd
feat: add identify option to swarm peers command
Fixes #9578
2023-03-30 04:34:57 +00:00
Gus Eggert
9fb09dd398
test: port routing DHT tests to Go (#9709) 2023-03-29 19:28:55 -04:00
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