Commit Graph

13372 Commits

Author SHA1 Message Date
Marten Seemann
8dffa84d77
chore: update go-libp2p to v0.19.3 (#8990)
(cherry picked from commit f720172a2a)
2022-06-08 14:24:43 -04:00
Antonio Navarro Perez
bf06e54d44
fix(ci): make go-ipfs-as-a-library work without external peers (#8978)
* Do not connect to external nodes on ipfs as a lib example.

It was causing some build timeouts error because CircleCI
was throttling WAN connections.

It closes #8956

* style: rename node vars

since this is example, this should make things easier to follow

Co-authored-by: Marcin Rataj <lidel@lidel.org>
(cherry picked from commit e8f1ce07b3)
2022-06-08 14:24:43 -04:00
Gus Eggert
cb72776dec
feat: log when resource manager limits are exceeded (#8980)
This periodically logs how many times Resource Manager limits were
exceeded. If they aren't exceeded, then nothing is logged. The log
levels are at ERROR log level so that they are shown by default.

The motivation is so that users know when they have exceeded resource
manager limits. To find what is exceeding the limits, they'll need to
turn on debug logging and inspect the errors being logged. This could
collect the specific limits being reached, but that's more complicated
to implement and could result in much longer log messages.

(cherry picked from commit 5615715c55)
2022-06-08 14:24:43 -04:00
Marcin Rataj
4449909b2d
fix: JS caching via Access-Control-Expose-Headers (#8984)
This fix safelists additional headers allowing JS running on websites to
read them when IPFS resource is downloaded via Fetch API.

These headers provide metadata necessary for making smart caching
decisions when IPFS resources are downloaded via Service Worker or a
similar middleware on the edge.

(cherry picked from commit 650bc246ab)
2022-06-08 14:24:43 -04:00
siiky
1adb6eaff2
docs: fix abstractions typo
(cherry picked from commit a72753bade)
2022-06-08 14:24:43 -04:00
Jorropo
57706f218a
fix: hanging goroutine in get fileArchive handler
Fixes #8957

The context was only checked while reading data.
Not while writing data to the http connection.
So since the data flow through an io.Pipe the closing didn't flowed through and left the writer open hanging.

Co-authored-by: Antonio Navarro Perez <antnavper@gmail.com>
(cherry picked from commit 7892cc91f9)
2022-06-08 14:24:42 -04:00
Marcin Rataj
5a1ca27ec6
chore: mark fuse experimental (#8962)
It works only on some platforms, and does not work reliably.
This corrects our error of not setting expectations right.

(cherry picked from commit 53299e84e0)
2022-06-08 14:24:42 -04:00
Lucas Molas
d8d7c215e8
Merge pull request #8965 from ipfs/schomatis/fix/disable-rcmg-checks
fix(node/libp2p): disable rcmgr checkImplicitDefaults

(cherry picked from commit e23a4611d8)
2022-06-08 14:24:42 -04:00
Marcin Rataj
ec6e6f82b9
fix: go-libp2p 0.19.2 with holepunch fixup (#8966)
https://github.com/libp2p/go-libp2p/releases/tag/v0.19.2
(cherry picked from commit 657d4f4dd9)
2022-06-08 14:24:42 -04:00
galargh
93cad3b86f
ci: disable workflows in forks
(cherry picked from commit 4798777377)
2022-06-08 14:24:42 -04:00
Marcin Rataj
a6dc7afe4c
fix(ci): fix flaky t0081-repo-pinning.sh (#8919)
* fix(ci): fix flaky t0081-repo-pinning.sh

Sometimes docker pull fails, this will retry.

* add upper bound on # retries (3)

Co-authored-by: Gus Eggert <gus@gus.dev>
(cherry picked from commit 6a4ee0a8a5)
2022-06-08 14:24:42 -04:00
T Mo
a7048c4551
pubsub multibase encoding (#8933)
* pubsub multibase encoding

Adds clarification for pubsub multibase encoding over HTTP RPC for issue https://github.com/ipfs/ipfs-docs/issues/1007

* Grammatical change

* Moved period

(cherry picked from commit 9a84a4f06e)
2022-06-08 14:24:42 -04:00
Lucas Molas
38c5dba662
Merge pull request #8947 from RubenKelevra/patch-7
'pin rm' helptext: rewrite description as object is not removed from local storage (immediately)

(cherry picked from commit 831c33925f)
2022-06-08 14:24:42 -04:00
Antonio Navarro Perez
51fc526a54
Merge pull request #8934 from ajnavarro/fix/install-on-mac-m1-monterey
(cherry picked from commit ae15e18894)
2022-06-08 14:24:42 -04:00
Daniel Norman
62c64c1566
Add instructions to resolve repo migration error (#8946)
Fixes #8779

Co-authored-by: Daniel N <2color@users.noreply.github.com>
(cherry picked from commit d476f2d6da)
2022-06-08 14:24:42 -04:00
Adin Schmahmann
f6586afa71
fix: use path instead of filepath for asset embeds to support Windows
(cherry picked from commit 1299bcb3fd)
2022-06-08 14:24:41 -04:00
Adin Schmahmann
8c5fefad66 Release v0.13.0-rc1 2022-05-04 16:23:16 -04:00
Adin Schmahmann
00c4a0c120
Merge pull request #8941 from ipfs/docs/0.13.0-changelog
docs: v0.13.0 changelog
2022-05-04 13:10:39 -07:00
Adin Schmahmann
205280934a
Merge pull request #8932 from ipfs/chore/update-go-build-version
chore: build with go 1.18.1
2022-05-04 15:08:42 -04:00
Adin Schmahmann
6d2f790f76 chore: update example deps 2022-05-04 14:56:19 -04:00
Adin Schmahmann
ff832cb992 docker: disable buildvcs for docker builds 2022-05-04 14:53:54 -04:00
Adin Schmahmann
8ec5718c56 chore: build with go 1.18.1 2022-05-04 14:53:54 -04:00
Adin Schmahmann
34aac1ee43 chore: update deps 2022-05-04 14:43:49 -04:00
Gus Eggert
0ab4367160 docs(tracing): update env var docs for new tracing env vars
This should have been updated as part of 967bd6932
2022-05-04 14:38:05 -04:00
Gus Eggert
3d527753ff feat: enable Resource Manager by default 2022-05-04 14:08:37 -04:00
Antonio Navarro Perez
0f8a1a35d2
chore: Update test/dependencies to match go-ipfs dependencies. (#8928) 2022-05-04 11:34:55 -04:00
Antonio Navarro Perez
afd11f1019
chore: fix linting errors (#8930) 2022-05-04 11:02:07 -04:00
Marcin Rataj
cab69276e9 docs: Swarm.ResourceMgr.Limits 2022-05-03 16:21:03 -04:00
Adin Schmahmann
126ebc459d
Merge pull request #8748 from ipfs/feat/dcutr-hole-punching-on-by-default
feat: EnableHolePunching by default
2022-05-03 15:20:19 -04:00
Adin Schmahmann
185971b259 fix: add info log indicating that hole punching has been disabled when it is left as the default but the relay client is disabled. 2022-05-03 14:26:09 -04:00
Adin Schmahmann
346fd9d854 fix: when the relay client is disabled and hole punching is left in its default state silently turn off hole punching instead of panicking 2022-05-03 14:26:09 -04:00
Adin Schmahmann
7ad6447453 feat: enable hole-punching by default 2022-05-03 14:26:09 -04:00
Adin Schmahmann
be1acfa1c5 chore: update go-libp2p 2022-05-03 14:26:09 -04:00
Adin Schmahmann
0d74f322df
Merge pull request #8931 from ipfs/ci/add-more-checks
ci: add more golang strictness checks
2022-05-03 14:19:11 -04:00
Adin Schmahmann
1f37a1481b go fmt 2022-05-03 14:09:38 -04:00
Adin Schmahmann
6f4fc1ae8e ci: add more golang strictness checks 2022-05-03 14:09:38 -04:00
Lucas Molas
25cc85fa93
feat(gateway): Gateway.FastDirIndexThreshold (#8853)
* fix(core/gateway): option to limit directory size listing

* feat(gw): HTMLDirListingLimit

This is alternative take on the way we limit the HTML listing output.
Instead of a hard cut-off, we list up to HTMLDirListingLimit.
When a directory has more items than HTMLDirListingLimit we show
additional header and footer informing user that only $HTMLDirListingLimit
items are listed. This is a better UX.

* fix: 0 disables Gateway.HTMLDirListingLimit

* refactor: Gateway.FastDirIndexThreshold

see explainer in docs/config.md

* refactor: prealoc slices

* docs: Gateway.FastDirIndexThreshold

* refactor: core/corehttp/gateway_handler.go

https://github.com/ipfs/go-ipfs/pull/8853#discussion_r851437088

* docs: apply suggestions from code review

Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>

Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
2022-04-28 19:36:57 +02:00
SukkaW
4f7d4bcc05 docs: replace all git.io links with their actual URLs 2022-04-28 18:06:08 +02:00
Marten Seemann
232ccb4e55
feat: relay v2 discovery (go-libp2p v0.19.0) (#8868)
* update go-libp2p to v0.19.0
* chore: go-namesys v0.5.0
* refactor(config): cleanup relay handling
* docs(config): document updated defaults
* fix(tests): panic during sharness

* fix: t0160-resolve.sh
See https://github.com/ipfs/go-namesys/pull/32

* fix: t0182-circuit-relay.sh
* test: transport encryption

Old tests were no longer working because go-libp2p 0.19 removed
the undocumented 'ls' pseudoprotocol.

This replaces these tests with handshake attempt (name is echoed back on
OK or 'na' is returned when protocol is not available) for tls and noise
variants + adds explicit test that safeguards us against enabling
plaintext by default by a mistake.

* fix: ./t0182-circuit-relay.sh

test is flaky, for now we just restart the testbed when we get
NO_RESERVATION error

* refactor: AutoRelayFeeder with exp. backoff

It starts at feeding peers ever 15s, then backs off each time
until it is done once an hour

Should be acceptable until we have smarter mechanism in go-lib2p 0.20

* feat(AutoRelay): prioritize Peering.Peers

This ensures we feed trusted Peering.Peers in addition to any peers
discovered over DHT.

* docs(CHANGELOG): document breaking changes

Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Gus Eggert <gus@gus.dev>
2022-04-28 17:13:15 +02:00
Lucas Molas
4e2028d19c fix(cmds): add: reject files with different import dir 2022-04-28 16:59:02 +02:00
Marcin Rataj
ae15fcd195 chore&fix: panic/error handling while enumerating pins
switch to version from https://github.com/ipfs/go-pinning-service-http-client/pull/18
to see if CI E2E tests pass
2022-04-28 15:58:38 +02:00
Marcin Rataj
6815293aac
chore: mark 'log tail' experimental (#8912)
Ensuring people are aware the RPC API/CMD may change
Context: https://github.com/ipfs/go-ipfs/pull/8765#issuecomment-1109884874
2022-04-28 15:57:43 +02:00
Gus Eggert
74aff245d2
feat: persist limits to Swarm.ResourceMgr.Limits (#8901)
* feat: persist limit changes to config

This changes the "ipfs swarm limit" command so that when limit changes
are applied via the command line, they are persisted to the repo
config, so that they remain in effect when the daemon restarts.

Any existing limit.json can be dropped into the IPFS config easily
using something like:

cat ~/.ipfs/config | jq ".Swarm.ResourceMgr.Limits = $(cat limit.json)" | sponge ~/.ipfs/config

This also upgrades to Resource Manager v0.3.0, which exports the config
schema so that we don't have to maintain our own copy of it.

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-04-28 15:27:16 +02:00
Gus Eggert
d4879a464b
fix: build after Go 1.17 and Prometheus upgrades (#8916)
* fix: go mod tidy

* fix: update expected prometheus metrics

Go 1.17 includes some new runtime metrics that are automatically
published by the Prometheus client, so this adds them to the expected
metric list so that the tests pass and we don't accidentally drop them
in the future.
2022-04-27 13:38:05 +02:00
Gus Eggert
967bd69320
feat(tracing): use OpenTelemetry env vars where possible (#8875)
This removes some of the env vars added in f855bfe6e, so that go-ipfs
is as consistent with standard OpenTelemetry env vars as possible.
2022-04-25 11:06:22 -04:00
Lucas Molas
d6077b8ac2
Merge pull request #8634 from ipfs/schomatis/feat/cmds/use-custom-config-file-path
feat(cmds): allow to set the configuration file path
2022-04-22 13:13:34 -03:00
Lucas Molas
e172ad23c2 --config-file test in sharness/t0021-config.sh 2022-04-22 13:03:28 -03:00
Lucas Molas
447462b801 use --repo-dir in sharness/t0020-init.sh 2022-04-22 13:03:28 -03:00
Lucas Molas
6817fd4744 feat(cmds): allow to set the configuration file path 2022-04-22 13:03:28 -03:00
Marcin Rataj
7162a63e96
chore: improve new issue links (#8874) 2022-04-22 08:38:47 -07:00