Commit Graph

1957 Commits

Author SHA1 Message Date
Henrique Dias
6cdc3c8a14 fix: apply API.HTTPHeaders to /webui redirect 2023-03-20 10:05:52 +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
Gus Eggert
c78c9886ad test: fix flaky rcmgr test 2023-03-20 10:05:03 +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
6bab5ce37c test: name --verify forgets the verified key 2023-03-20 10:02:39 +01:00
Gus Eggert
2510f06364 feat: add "autoclient" routing type
This routing type is the same as "auto" but it creates the DHT in
"client" mode and hence does not start a DHT server.
2023-03-20 10:02:06 +01:00
Gus Eggert
840eaa7599 test: parallelize more of rcmgr Go tests 2023-03-20 10:02:00 +01:00
Gus Eggert
bfa425fc67 test: port legacy DHT tests to Go 2023-03-20 10:01:54 +01:00
Piotr Galar
8fe7d779c1 Merge pull request #9696 from ipfs/galargh-patch-2
fix: t0116-gateway-cache.sh
2023-03-20 10:01:38 +01:00
Jorropo
7986196414 feat: Reduce RM code footprint
Co-Authored-By: Antonio Navarro Perez <antnavper@gmail.com>
2023-03-06 12:46:58 +01:00
galargh
fe8f72e707 ci: replace junit html generation with gh action 2023-03-02 10:52:23 +01:00
Gus Eggert
145795b148 test: port rcmgr sharness tests to Go 2023-02-28 15:34:23 +01:00
Marcin Rataj
cf9276db02
Merge pull request #9657 from laurentsenta/test/sharness-with-car-fixtures
test(gateway): use deterministic CAR fixtures
2023-02-28 14:22:40 +01:00
Henrique Dias
1794649bf2
feat(gateway): error handling improvements (500, 502, 504) (#9660)
* fix(gateway): return 500 for all /ip[nf]s/id failures
* fix: replace deprecated structs
* chore: bump go-libipfs to version from main
2023-02-28 02:21:50 +01:00
Laurent Senta
92a068a82b fix: remove leftover fixtures & notes 2023-02-27 12:16:44 +01:00
Laurent Senta
42132f1dfc fix: add versions 2023-02-27 12:16:33 +01:00
Laurent Senta
3ed8f394e0 test: use car fixtures in sharness t0400 2023-02-27 12:16:33 +01:00
Laurent Senta
7f3c0baa5d test: use car fixtures in sharness t0123 2023-02-27 12:16:33 +01:00
Laurent Senta
a57ca965c1 test: use car fixtures in sharness t0122 2023-02-27 12:16:33 +01:00
Laurent Senta
26b493d3c5 test: use car fixtures in sharness t0118 2023-02-27 12:16:33 +01:00
Laurent Senta
284bb8c819 test: use car fixtures in sharness t0116 2023-02-27 12:16:33 +01:00
Laurent Senta
8a3591b860 test: fix prometheus test folder path 2023-02-27 12:16:33 +01:00
Laurent Senta
8641d16a2b test: use car fixtures in sharness t0115 2023-02-27 12:16:33 +01:00
Laurent Senta
771d62c8f4 test: use car fixtures in sharness t0114 2023-02-27 12:16:33 +01:00
Laurent Senta
64ccdbd6f2 test: use car fixtures in sharness t0113 2023-02-27 12:16:33 +01:00
Laurent Senta
0d7c892cec test: use car fixtures in sharness t0117 2023-02-27 12:16:33 +01:00
Marten Seemann
a3366c522a
chore: update go-libp2p to v0.26 (#9656)
Co-authored-by: Henrique Dias <hacdias@gmail.com>
2023-02-24 10:34:10 +01:00
Henrique Dias
4db6ae1772
fix(gateway): return HTTP 500 on ErrResolveFailed (#9589) 2023-02-22 03:22:03 +01:00
ElPaisano
714a968faa
docs: bulk spelling edits (#9544)
Co-authored-by: Jorropo <jorropo.pgm@gmail.com>
Co-authored-by: Steve Loeppky <biglep@protocol.ai>
Co-authored-by: Gus Eggert <gus@gus.dev>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-02-20 23:37:10 +01:00
Jorropo
0ff406170d fix: update rcmgr for go-libp2p v0.25 2023-02-14 22:19:46 +01:00
Henrique Dias
fb7f7b15b3
fix: restore wire format for /api/v0/routing/get|put (#9639)
Closes #9638
2023-02-10 02:41:45 +01:00
Henrique Dias
14649aa8ba
refactor: new go-libipfs/gateway API, deprecate Gateway.Writable (#9616) 2023-02-02 02:50:46 +01:00
Henrique Dias
a3c70a11e6
feat(gateway): IPNS record response format (IPIP-351) (#9399)
* feat(gateway): IPNS record response format
* docs(rpc): mark as experimental: routing provide, get, put

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-01-27 04:46:50 +01:00
Henrique Dias
94e7f79805
fix(ipns): honour --ttl flag in 'ipfs name publish' (#9471)
* fix: honour --ttl flag in 'ipfs name publish'
* docs(cli): ipfs name inspect --help

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-01-27 02:33:13 +01:00
Mohsin Zaidi
9652f24f6c
feat: Pubsub.SeenMessagesStrategy (#9543)
* feat: expire messages from the cache based on last seen time
* docs: Pubsub.SeenMessagesStrategy

Ref. https://github.com/libp2p/go-libp2p-pubsub/pull/513

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-01-27 00:24:35 +01:00
Jorropo
f20c980f2d chore: bump go-libipfs to replace go-block-format
Includes changes from:
- https://github.com/ipfs/go-block-format/pull/37
- https://github.com/ipfs/go-libipfs/pull/58
2023-01-26 16:55:48 +01:00
Henrique Dias
c706c638fc
fix(gateway): undesired conversions to dag-json and friends (#9566)
* fix(gateway): do not convert unixfs/raw into dag-* unless explicit
* fix(gateway): keep only dag-json|dag-cbor handling
* fix: allow requesting dag-json as application/json
- adds bunch of additional tests including JSON file on UnixFS
- fix: dag-json codec (0x0129) can be returned as plain json
- fix: json codec (0x0200) cna be retrurned as plain json
* fix: using ?format|Accept with CID w/ codec works
* docs(changelog): cbor and json on gateway

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-01-21 04:21:18 +01:00
Jorropo
8328bab28d fix: ensure connmgr is smaller then autoscalled ressource limits
Fixes #9545
2023-01-20 19:25:38 +01:00
galargh
c69632d75b fix: update saxon download path 2023-01-19 18:24:09 +01:00
Jorropo
73ebad1892 fix: refuse to start if connmgr is smaller than ressource limits and not using none connmgr
Fixes: #9548
2023-01-19 01:40:48 +01:00
Marcin Rataj
1fa3a789d4 fix: User-Agent sent to HTTP routers
See https://github.com/ipfs/go-libipfs/issues/17
and https://github.com/ipfs/go-libipfs/pull/31
2023-01-19 00:49:46 +01:00
Gus Eggert
5d864faac7 test: port gateway sharness tests to Go tests 2023-01-17 21:27:54 +01:00
galargh
d90a9b5b33 fix: do not download saxon in parallel 2023-01-16 03:00:21 +01:00
Piotr Galar
d4cd414b5e
test: port CircleCI to GH Actions and improve sharness reporting (#9355)
Closes https://github.com/ipfs/kubo/issues/8991
Part of https://github.com/ipfs/kubo/issues/8804
2023-01-14 00:49:52 +01:00
Henrique Dias
255e64e49e
chore: migrate from go-ipfs-files to go-libipfs/files (#9535) 2023-01-13 14:27:03 +01:00
Antonio Navarro Perez
3bc9b675a0
fix: stats dht command when Routing.Type=auto (#9538)
Fixes default auto mode, but Routing.Type=custom needs more work.
Continued in https://github.com/ipfs/kubo/issues/9482
2023-01-13 00:38:38 +01:00
Marcin Rataj
f6825ab662 fix(gateway): JSON when Accept is a list
Block/CAR responses always had single explicit type, and we did not bother
with implementing/testing lists.

With the introduction of JSON people may start passing a list.
This is the most basic fix which will return on the first matching
type (in order). This does not implements weights (can be added in
future, if needed).

Closes #9520
2023-01-11 22:18:52 +01:00
Marcin Rataj
73e6ade109 fix(test): retry flaky t0125-twonode.sh
This makes is clear why test failed, and what were values.

Fixes flaky test: It will re-run flaky advanced test until bitswap stats
match expected value (something team has been doing anyway for the past
year).

It also adds /quic-v1 and /webtransport tests
2023-01-05 22:58:18 +01:00